From 5d66199bb69ea8969daee890b26ea5a70684e49d Mon Sep 17 00:00:00 2001 From: welpo Date: Wed, 28 Aug 2024 02:10:48 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20add=20Mermaid=20diagram=20s?= =?UTF-8?q?upport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Resolves #369. - Implement Mermaid shortcode for diagram rendering - Add configuration options for enabling Mermaid and local/CDN serving - Include documentation for Mermaid usage and configuration - Update copy codeblock to clipboard JS to avoid conflict - Update tabi project and README description to mention the feature --- README.md | 1 + config.toml | 9 + content/blog/javascript/index.ca.md | 3 +- content/blog/javascript/index.es.md | 3 +- content/blog/javascript/index.md | 3 +- .../blog/mastering-tabi-settings/index.ca.md | 14 +- .../blog/mastering-tabi-settings/index.es.md | 14 +- content/blog/mastering-tabi-settings/index.md | 14 +- content/blog/security/index.ca.md | 4 +- content/blog/security/index.es.md | 4 +- content/blog/security/index.md | 4 +- content/blog/shortcodes/index.ca.md | 78 +- content/blog/shortcodes/index.es.md | 78 +- content/blog/shortcodes/index.md | 78 +- content/projects/tabi/index.ca.md | 1 + content/projects/tabi/index.es.md | 1 + content/projects/tabi/index.md | 1 + sass/parts/_misc.scss | 8 + static/js/copyCodeToClipboard.js | 2 +- static/js/copyCodeToClipboard.min.js | 2 +- static/js/mermaid.min.js | 2089 +++++++++++++++++ .../partials/content_security_policy.html | 17 +- templates/partials/extra_features.html | 9 + templates/shortcodes/mermaid.html | 8 + theme.toml | 9 + 25 files changed, 2435 insertions(+), 19 deletions(-) create mode 100644 static/js/mermaid.min.js create mode 100644 templates/shortcodes/mermaid.html diff --git a/README.md b/README.md index 9a20e871f..758e6f598 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ tabi has a perfect score on Google's Lighthouse audit: - [X] [Comprehensive multi-language support](https://welpo.github.io/tabi/blog/faq-languages/#how-does-tabi-handle-multilingual-support). Add as many languages as you wish. - [X] Support for [comments using giscus, utterances, Hyvor Talk, or Isso](https://welpo.github.io/tabi/blog/comments/). - [X] Code syntax highlighting with colours based on [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé. +- [X] [Mermaid support](https://welpo.github.io/tabi/blog/shortcodes/#mermaid-diagrams) to create diagrams and charts with text. - [X] [Local search](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#search) with an accessible, multi-lingual interface. - [X] [Custom Twitter card](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#social-media-cards) and automatic Open Graph tags. - [X] [KaTeX](https://katex.org/) support for mathematical notation. diff --git a/config.toml b/config.toml index db8896740..8486fad12 100644 --- a/config.toml +++ b/config.toml @@ -162,6 +162,15 @@ footnote_backlinks = false # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy katex = false +# Enable Mermaid diagrams. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +mermaid = false + +# Serve Mermaid JavaScript locally. +# If set to false, it will load the latest version from JSDelivr. +# Only relevant when `mermaid = true`. +serve_local_mermaid = true + # Show links to previous and next articles at the bottom of posts. # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy show_previous_next_article_links = false diff --git a/content/blog/javascript/index.ca.md b/content/blog/javascript/index.ca.md index 8875a8291..7361fce8c 100644 --- a/content/blog/javascript/index.ca.md +++ b/content/blog/javascript/index.ca.md @@ -1,7 +1,7 @@ +++ title = "Sense JavaScript obligatori" date = 2023-01-06 -updated = 2024-07-01 +updated = 2024-08-27 description = "JavaScript només s'utilitza quan HTML i CSS no són suficients." [taxonomies] @@ -26,6 +26,7 @@ Aquest tema no requereix JavaScript obligatori. Opcionalment, pot carregar una q Les següents opcions es poden especificar per a publicacions, seccions i globalment, seguint la jerarquia de `pàgina > secció > config.toml`: - [**Suport de KaTeX**](@/blog/markdown/index.ca.md#katex). Habilitat configurant `katex = true` (274 KB). +- [**Diagrames de Mermaid**](@/blog/shortcodes/index.ca.md#diagrames-de-mermaid). Habilitat configurant `mermaid = true` (~2.5 MB). - [**Còpia de blocs de codi amb un sol clic**](@/blog/markdown/index.ca.md#bloc-de-codi). Habilitada configurant `copy_button = true`. (~700 bytes) - [**Mostrar ruta/URL a blocs de codi**](@/blog/shortcodes/index.ca.md#mostrar-ruta-o-url). S'activa configurant `add_src_to_code_block = true`. (~400 bytes) diff --git a/content/blog/javascript/index.es.md b/content/blog/javascript/index.es.md index 8322c5235..52c319e79 100644 --- a/content/blog/javascript/index.es.md +++ b/content/blog/javascript/index.es.md @@ -1,7 +1,7 @@ +++ title = "Sin JavaScript obligatorio" date = 2023-01-06 -updated = 2024-07-01 +updated = 2024-08-27 description = "JavaScript solo se utiliza cuando HTML y CSS no son suficientes." [taxonomies] @@ -26,6 +26,7 @@ Este tema no requiere JavaScript de manera obligatoria. Opcionalmente, puede car Las siguientes opciones pueden especificarse para publicaciones, secciones y a nivel global, siguiendo la jerarquía de `página > sección > config.toml`: - [**Soporte de KaTeX**](@/blog/markdown/index.es.md#katex). Habilitado al configurar `katex = true` (274 KB). +- [**Diagramas de Mermaid**](@/blog/shortcodes/index.es.md#diagramas-de-mermaid). Habilitado al configurar `mermaid = true` (~2.5 MB). - [**Copia de bloques de código con un solo clic**](@/blog/markdown/index.es.md#bloque-de-codigo). Habilitado al configurar `copy_button = true` (~700 bytes). - [**Mostrar ruta/URL en bloques de código**](@/blog/shortcodes/index.es.md#mostrar-ruta-o-url). Se activa configurando `add_src_to_code_block = true`. (~400 bytes) diff --git a/content/blog/javascript/index.md b/content/blog/javascript/index.md index 573617e23..8a815cb5d 100644 --- a/content/blog/javascript/index.md +++ b/content/blog/javascript/index.md @@ -1,7 +1,7 @@ +++ title = "No mandatory JavaScript" date = 2023-01-06 -updated = 2024-07-01 +updated = 2024-08-27 description = "JavaScript is only used when HTML and CSS aren't enough." [taxonomies] @@ -26,6 +26,7 @@ This theme has no mandatory JavaScript. Optionally, it can load a minimal amount The following settings can be specified for posts, sections and globally, following the hierarchy of `page > section > config.toml`: - [**KaTeX support**](@/blog/markdown/index.md#katex). Enabled by setting `katex = true` (274 KB). +- [**Mermaid diagrams**](@/blog/shortcodes/index.md#mermaid-diagrams). Enabled by setting `mermaid = true` (~2.5 MB). - [**One-click copy of code blocks**](@/blog/markdown/index.md#code-block). Enabled by setting `copy_button = true`. (~700 bytes) - [**Showing source (path or URL) in code blocks**](@/blog/shortcodes/index.md#show-source-or-path). Enabled by setting `add_src_to_code_block = true`. (~300 bytes) diff --git a/content/blog/mastering-tabi-settings/index.ca.md b/content/blog/mastering-tabi-settings/index.ca.md index 7783181e4..ddad98b51 100644 --- a/content/blog/mastering-tabi-settings/index.ca.md +++ b/content/blog/mastering-tabi-settings/index.ca.md @@ -1,7 +1,7 @@ +++ title = "Domina la configuració de tabi: guia completa" date = 2023-09-18 -updated = 2024-08-13 +updated = 2024-08-28 description = "Descobreix les múltiples maneres en què pots personalitzar tabi." [taxonomies] @@ -576,6 +576,18 @@ Estableix `add_src_to_code_block = true` per habilitar l'ús del [shortcode `add KaTeX és una biblioteca JavaScript ràpida i fàcil d'usar per a la representació de matemàtiques TeX a la web. Pots habilitar-ho amb `katex = true`. Mira com es veu en tabi [aquí](/ca/blog/markdown/#katex). +### Suport per a Mermaid + +| Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | +|:------:|:------:|:-------------:|:-----------------:|:--------------------:| +| ✅ | ✅ | ✅ | ✅ | ✅ | + +[Mermaid](https://github.com/mermaid-js/mermaid) és una eina de diagramació i gràfics basada en JavaScript. Pots activar-la amb `mermaid = true`. + +Per defecte, la biblioteca Mermaid es serveix localment. Si prefereixes utilitzar un CDN, estableix `serve_local_mermaid = false` a `config.toml`. L'ús d'un CDN servirà la versió més recent de Mermaid; l'opció local servirà la versió inclosa amb tabi. + +Consulta la [documentació de Mermaid](@/blog/shortcodes/index.ca.md#diagrames-de-mermaid) per a instruccions d'ús i exemples. + ### Subconjunt de tipus de lletra personalitzat | Pàgina | Secció | `config.toml` | Segueix la jerarquia | Requereix JavaScript | diff --git a/content/blog/mastering-tabi-settings/index.es.md b/content/blog/mastering-tabi-settings/index.es.md index e52cf460c..2e43baef1 100644 --- a/content/blog/mastering-tabi-settings/index.es.md +++ b/content/blog/mastering-tabi-settings/index.es.md @@ -1,7 +1,7 @@ +++ title = "Domina la configuración de tabi: guía completa" date = 2023-09-18 -updated = 2024-08-13 +updated = 2024-08-28 description = "Descubre las múltiples maneras en que puedes personalizar tabi." [taxonomies] @@ -576,6 +576,18 @@ Establece `add_src_to_code_block = true` para habilitar el uso del [shortcode `a KaTeX es una biblioteca JavaScript rápida y fácil de usar para la representación de matemáticas TeX en la web. Puedes habilitarlo con `katex = true`. Mira cómo se ve en tabi [aquí](/es/blog/markdown/#katex). +### Soporte para Mermaid + +| Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | +|:------:|:-------:|:-------------:|:----------------:|:-------------------:| +| ✅ | ✅ | ✅ | ✅ | ✅ | + +[Mermaid](https://github.com/mermaid-js/mermaid) es una herramienta de diagramación y gráficos basada en JavaScript. Puedes activarla con `mermaid = true`. + +Por defecto, la biblioteca Mermaid se sirve localmente. Si prefieres usar un CDN, establece `serve_local_mermaid = false` en `config.toml`. El uso de un CDN servirá la versión más reciente de Mermaid; la opción local servirá la versión incluida con tabi. + +Consulta la [documentación de Mermaid](@/blog/shortcodes/index.es.md#diagramas-de-mermaid) para instrucciones de uso y ejemplos. + ### Subconjunto de fuente personalizada | Página | Sección | `config.toml` | Sigue la jerarquía | Requiere JavaScript | diff --git a/content/blog/mastering-tabi-settings/index.md b/content/blog/mastering-tabi-settings/index.md index dc5fa3786..91a0a0835 100644 --- a/content/blog/mastering-tabi-settings/index.md +++ b/content/blog/mastering-tabi-settings/index.md @@ -1,7 +1,7 @@ +++ title = "Mastering tabi Settings: A Comprehensive Guide" date = 2023-09-18 -updated = 2024-08-13 +updated = 2024-08-28 description = "Discover the many ways you can customise your tabi site." [taxonomies] @@ -584,6 +584,18 @@ Setting `add_src_to_code_block = true` enables the use of the [`add_src_to_code_ KaTeX is a fast, easy-to-use JavaScript library for TeX math rendering on the web. You can enable it with `katex = true`. See what it looks like in tabi [here](/blog/markdown/#katex). +### Mermaid Support + +| Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | +|:----:|:-------:|:-------------:|:-----------------:|:-------------------:| +| ✅ | ✅ | ✅ | ✅ | ✅ | + +[Mermaid](https://github.com/mermaid-js/mermaid) is a JavaScript-based diagramming and charting tool. You can enable it with `mermaid = true`. + +By default, the Mermaid library is served locally. If you prefer to use a CDN, set `serve_local_mermaid = false` in `config.toml`. Using a CDN will serve the latest version of Mermaid; the local option will serve the version bundled with tabi. + +See the [Mermaid documentation](@/blog/shortcodes/index.md#mermaid-diagrams) for usage instructions and examples. + ### Custom Font Subset | Page | Section | `config.toml` | Follows Hierarchy | Requires JavaScript | diff --git a/content/blog/security/index.ca.md b/content/blog/security/index.ca.md index 1b8bffe51..be1f675ba 100644 --- a/content/blog/security/index.ca.md +++ b/content/blog/security/index.ca.md @@ -1,7 +1,7 @@ +++ title = "Seguretat per defecte" date = 2023-02-22 -updated = 2024-05-30 +updated = 2024-08-28 description = "tabi té una Política de Seguretat de Contingut (CSP) fàcilment personalitzable amb valors segurs per defecte. Obtingues tranquil·litat i un A+ en l'Observatori de Mozilla." [taxonomies] @@ -34,7 +34,7 @@ Pots desactivar les capçaleres (permitint-ho tot) en una pàgina, secció, o gl **Notas**: -- [Habilitar els comentaris](@/blog/comments/index.ca.md) o [les analítiques](@/blog/mastering-tabi-settings/index.ca.md#analisi-web) automàticament permet scripts/frames/estils/connexions en funció del servei habilitat. +- [Habilitar els comentaris](@/blog/comments/index.ca.md), [les analítiques](@/blog/mastering-tabi-settings/index.ca.md#analisi-web), o [els diagrames de mermaid](@/blog/shortcodes/index.ca.md#diagrames-de-mermaid) permet automàticament els scripts/frames/estils/conexions pertinents. - Per utilitzar un [tema de resaltat de sintaxis integrat a Zola](https://www.getzola.org/documentation/getting-started/configuration/#syntax-highlighting), has de permetre `unsafe-inline` a la directiva `style-src`: ``` diff --git a/content/blog/security/index.es.md b/content/blog/security/index.es.md index ec46cdb75..928e03d39 100644 --- a/content/blog/security/index.es.md +++ b/content/blog/security/index.es.md @@ -1,7 +1,7 @@ +++ title = "Seguro por defecto" date = 2023-02-22 -updated = 2024-05-30 +updated = 2024-08-28 description = "tabi tiene una Política de Seguridad de Contenido (CSP) fácilmente personalizable con configuraciones seguras. Obtén tranquilidad y una calificación de A+ en Mozilla Observatory." [taxonomies] @@ -34,7 +34,7 @@ Puedes desactivar las cabeceras (permitiendo todo) en una página, sección, o g **Notas**: -- [Habilitar los comentarios](@/blog/comments/index.es.md) o [las analíticas](@/blog/mastering-tabi-settings/index.es.md#analisis-web) automáticamente permite scripts/frames/estilos/conexiones en función del servicio habilitado. +- [Habilitar los comentarios](@/blog/comments/index.es.md), [las analíticas](@/blog/mastering-tabi-settings/index.es.md#analisis-web), o [los diagramas mermaid](@/blog/shortcodes/index.es.md#diagramas-de-mermaid) permite automáticamente los scripts/frames/estilos/conexiones pertinentes. - Para usar un [tema de resaltado de sintaxis integrado en Zola](https://www.getzola.org/documentation/getting-started/configuration/#syntax-highlighting), has de permitir `unsafe-inline` en la directiva `style-src`: ``` diff --git a/content/blog/security/index.md b/content/blog/security/index.md index a1c99cb88..fb46313f2 100644 --- a/content/blog/security/index.md +++ b/content/blog/security/index.md @@ -1,7 +1,7 @@ +++ title = "Secure by default" date = 2023-02-22 -updated = 2024-05-30 +updated = 2024-08-28 description = "tabi has an easily customizable Content Security Policy (CSP) with safe defaults. Get peace of mind and an A+ on Mozilla Observatory." [taxonomies] @@ -34,7 +34,7 @@ You can disable the CSP (allowing all connections) on a page, section, or global **Notes**: -- [Enabling comments](@/blog/comments/index.md) or [analytics](@/blog/mastering-tabi-settings/index.md#analytics) automatically allows scripts/frames/styles/connections as needed from the respective services. +- [Enabling comments](@/blog/comments/index.md), [analytics](@/blog/mastering-tabi-settings/index.md#analytics), or [mermaid diagrams](@/blog/shortcodes/index.md#mermaid-diagrams) automatically allows scripts/frames/styles/connections as needed. - To use a [Zola built-in syntax highlighting theme](https://www.getzola.org/documentation/getting-started/configuration/#syntax-highlighting), you need to allow `unsafe-inline` in the `style-src` directive: ``` diff --git a/content/blog/shortcodes/index.ca.md b/content/blog/shortcodes/index.ca.md index c9f48474c..cd5c10a26 100644 --- a/content/blog/shortcodes/index.ca.md +++ b/content/blog/shortcodes/index.ca.md @@ -1,7 +1,7 @@ +++ title = "Shortcodes personalitzats" date = 2023-02-19 -updated = 2024-06-27 +updated = 2024-08-28 description = "Aquest tema inclou alguns shortcodes personalitzats útils que pots utilitzar per millorar les teves publicacions. Ja sigui per mostrar imatges que s'adapten als temes clar i fosc, o per donar format a una secció de referències amb un aspecte professional, aquests shortcodes personalitzats t'ajudaran." [taxonomies] @@ -12,9 +12,85 @@ toc = true toc_levels = 2 quick_navigation_buttons = true add_src_to_code_block = true +mermaid = true social_media_card = "social_cards/ca_blog_shortcodes.jpg" +++ +## Shortcodes de diagrames + +### Diagrames de Mermaid + +[Mermaid](https://github.com/mermaid-js/mermaid) és una eina de diagramació i gràfics que utilitza text i codi per generar diagrames. Admet diagrames de flux, diagrames de seqüència, gràfics de Gantt i més. + +Per incloure un diagrama Mermaid a la teva publicació, cal fer dues coses: + +1. Estableix `mermaid = true` a la secció `[extra]` del front matter de la teva pàgina, secció o `config.toml`. Això carregarà el JavaScript necessari per renderitzar els diagrames. + +2. Utilitza el shortcode `mermaid()` per definir el teu diagrama. Per exemple: + +```plaintext +{%/* mermaid() */%} +classDiagram + class DistorsionsCognitives { + +PensamentTotORes() + +Sobregeneralitzacio() + +FiltreMental() + +TreureConclusionsPrecipitades() + } + class PensamentTotORes { + +VeureEnExtrems() + } + class Sobregeneralitzacio { + +GeneralitzarDUnic() + } + class FiltreMental { + +EnfocarseEnNegatiu() + } + class TreureConclusionsPrecipitades { + +FerSuposicions() + } + DistorsionsCognitives *-- PensamentTotORes + DistorsionsCognitives *-- Sobregeneralitzacio + DistorsionsCognitives *-- FiltreMental + DistorsionsCognitives *-- TreureConclusionsPrecipitades +{%/* end */%} +``` + +El diagrama es renderitzarà així: + +{% mermaid() %} +classDiagram + class DistorsionsCognitives { + +PensamentTotORes() + +Sobregeneralitzacio() + +FiltreMental() + +TreureConclusionsPrecipitades() + } + class PensamentTotORes { + +VeureEnExtrems() + } + class Sobregeneralitzacio { + +GeneralitzarDUnic() + } + class FiltreMental { + +EnfocarseEnNegatiu() + } + class TreureConclusionsPrecipitades { + +FerSuposicions() + } + DistorsionsCognitives *-- PensamentTotORes + DistorsionsCognitives *-- Sobregeneralitzacio + DistorsionsCognitives *-- FiltreMental + DistorsionsCognitives *-- TreureConclusionsPrecipitades +{% end %} + +El shortcode de Mermaid admet dos paràmetres: + +- `invertible`: Si s'estableix a `true` (per defecte), el diagrama invertirà els seus colors en mode fosc, igual que les [imatges invertibles](#imatge-invertible). +- `full_width`: Permet que el diagrama ocupi l'amplada de la capçalera. Mira [imatge d'amplada completa](#imatge-d-amplada-completa). + +{{ admonition(type="tip", title="CONSELL", text="Empra l'[editor de Mermaid](https://mermaid.live/) per crear i previsualitzar els teus diagrames.") }} + ## Shortcodes d'imatge Tots els shortcodes d'imatge admeten rutes absolutes, rutes relatives, i fonts remotes en el paràmetre `src`. diff --git a/content/blog/shortcodes/index.es.md b/content/blog/shortcodes/index.es.md index 9170c3723..3975c9619 100644 --- a/content/blog/shortcodes/index.es.md +++ b/content/blog/shortcodes/index.es.md @@ -1,7 +1,7 @@ +++ title = "Shortcodes personalizados" date = 2023-02-19 -updated = 2024-06-27 +updated = 2024-08-28 description = "Este tema incluye algunos shortcodes personalizados útiles que puedes utilizar para mejorar tus publicaciones. Puedes mostrar imágenes que se adapten a los temas claro y oscuro, dar formato a una sección de referencias con un aspecto profesional, y más." [taxonomies] @@ -12,9 +12,85 @@ toc = true toc_levels = 2 quick_navigation_buttons = true add_src_to_code_block = true +mermaid = true social_media_card = "social_cards/es_blog_shortcodes.jpg" +++ +## Shortcodes de diagramas + +### Diagramas de Mermaid + +[Mermaid](https://github.com/mermaid-js/mermaid) es una herramienta de diagramación y gráficos que usa texto y código para generar diagramas. Admite diagramas de flujo, diagramas de secuencia, gráficos de Gantt y más. + +Para incluir un diagrama Mermaid en tu publicación, sigue estos dos pasos: + +1. Establece `mermaid = true` en la sección `[extra]` del front matter de tu página, sección o `config.toml`. Esto cargará el JavaScript necesario para renderizar los diagramas. + +2. Usa el shortcode `mermaid()` para definir tu diagrama. Por ejemplo: + +```plaintext +{%/* mermaid() */%} +classDiagram + class DistorsionesCognitivas { + +PensamientoTodoONada() + +Sobregeneralizacion() + +FiltroMental() + +SacarConclusionesPrecipitadas() + } + class PensamientoTodoONada { + +VerEnExtremos() + } + class Sobregeneralizacion { + +GeneralizarDeUnicoEjemplo() + } + class FiltroMental { + +EnfocarseEnNegativo() + } + class SacarConclusionesPrecipitadas { + +HacerSuposiciones() + } + DistorsionesCognitivas *-- PensamientoTodoONada + DistorsionesCognitivas *-- Sobregeneralizacion + DistorsionesCognitivas *-- FiltroMental + DistorsionesCognitivas *-- SacarConclusionesPrecipitadas +{%/* end */%} +``` + +El diagrama se renderizará así: + +{% mermaid() %} +classDiagram + class DistorsionesCognitivas { + +PensamientoTodoONada() + +Sobregeneralizacion() + +FiltroMental() + +SacarConclusionesPrecipitadas() + } + class PensamientoTodoONada { + +VerEnExtremos() + } + class Sobregeneralizacion { + +GeneralizarDeUnicoEjemplo() + } + class FiltroMental { + +EnfocarseEnNegativo() + } + class SacarConclusionesPrecipitadas { + +HacerSuposiciones() + } + DistorsionesCognitivas *-- PensamientoTodoONada + DistorsionesCognitivas *-- Sobregeneralizacion + DistorsionesCognitivas *-- FiltroMental + DistorsionesCognitivas *-- SacarConclusionesPrecipitadas +{% end %} + +El shortcode de Mermaid admite dos parámetros: + +- `invertible`: Si se establece en `true` (por defecto), el diagrama se invertirá en modo oscuro, igual que las [imágenes invertibles](#imagen-invertible). +- `full_width`: Permite que el diagrama ocupe el ancho del encabezado. Mira [imagen a ancho completo](#imagen-a-ancho-completo). + +{{ admonition(type="tip", title="CONSEJO", text="Puedes usar el [editor de Mermaid](https://mermaid.live/) para crear y previsualizar tus diagramas.") }} + ## Shortcodes de imagen Todos los shortcodes de imagen admiten rutas absolutas, rutas relativas, y fuentes remotas en el parámetro `src`. diff --git a/content/blog/shortcodes/index.md b/content/blog/shortcodes/index.md index b034e174f..a1acb2b40 100644 --- a/content/blog/shortcodes/index.md +++ b/content/blog/shortcodes/index.md @@ -1,7 +1,7 @@ +++ title = "Custom shortcodes" date = 2023-02-19 -updated = 2024-06-27 +updated = 2024-08-28 description = "This theme includes some useful custom shortcodes that you can use to enhance your posts. Whether you want to display images that adapt to light and dark themes, or format a professional-looking reference section, these custom shortcodes have got you covered." [taxonomies] @@ -12,9 +12,85 @@ toc = true toc_levels = 2 quick_navigation_buttons = true add_src_to_code_block = true +mermaid = true social_media_card = "social_cards/blog_shortcodes.jpg" +++ +## Diagram shortcode + +### Mermaid diagrams + +[Mermaid](https://github.com/mermaid-js/mermaid) is a a diagramming and charting tool that uses text and code to generate diagrams. It supports flowcharts, sequence diagrams, Gantt charts, and more. + +To include a Mermaid diagram in your post, there are two steps: + +1. Set `mermaid = true` in the `[extra]` section of the front matter of your page, section or `config.toml`. This will load the JavaScript needed to render the diagrams. + +2. Use the `mermaid()` shortcode to define your diagram in your posts. For example: + +```plaintext +{%/* mermaid() */%} +classDiagram + class CognitiveDistortions { + +AllOrNothingThinking() + +Overgeneralization() + +MentalFilter() + +JumpingToConclusions() + } + class AllOrNothingThinking { + +SeeInExtremes() + } + class Overgeneralization { + +GeneralizeFromSingle() + } + class MentalFilter { + +FocusOnNegative() + } + class JumpingToConclusions { + +MakeAssumptions() + } + CognitiveDistortions *-- AllOrNothingThinking + CognitiveDistortions *-- Overgeneralization + CognitiveDistortions *-- MentalFilter + CognitiveDistortions *-- JumpingToConclusions +{%/* end */%} +``` + +The diagram will be rendered as follows: + +{% mermaid() %} +classDiagram + class CognitiveDistortions { + +AllOrNothingThinking() + +Overgeneralization() + +MentalFilter() + +JumpingToConclusions() + } + class AllOrNothingThinking { + +SeeInExtremes() + } + class Overgeneralization { + +GeneralizeFromSingle() + } + class MentalFilter { + +FocusOnNegative() + } + class JumpingToConclusions { + +MakeAssumptions() + } + CognitiveDistortions *-- AllOrNothingThinking + CognitiveDistortions *-- Overgeneralization + CognitiveDistortions *-- MentalFilter + CognitiveDistortions *-- JumpingToConclusions +{% end %} + +The Mermaid shortcode supports two parameters: + +- `invertible`: If set to `true` (default), the diagram will be inverted in dark mode, just like [invertible images](#invertible-image). +- `full_width`: Allows the diagram to take up the width of the header. See [full-width image](#full-width-image). + +{{ admonition(type="tip", text="You can use the [Mermaid Live Editor](https://mermaid.live/) to create and preview your diagrams.") }} + ## Image shortcodes All image shortcodes support absolute paths, relative paths, and remote sources in the `src` parameter. diff --git a/content/projects/tabi/index.ca.md b/content/projects/tabi/index.ca.md index 4a4786540..d9c885966 100644 --- a/content/projects/tabi/index.ca.md +++ b/content/projects/tabi/index.ca.md @@ -22,6 +22,7 @@ social_media_card = "social_cards/ca_projects_tabi.jpg" - Temes clars i foscos. S'adapta a la configuració del sistema operatiu, amb un interruptor a la barra de navegació. - [Suport multilingüe complet](https://welpo.github.io/tabi/ca/blog/faq-languages/#com-gestiona-tabi-el-suport-multilingue). Afegeix tants idiomes com vulguis i deixa que els teus usuaris triin amb el selector d'idioma. - Puntuació perfecta en Lighthouse (Rendiment, Accessibilitat, Millors Pràctiques i SEO). +- Suport per [diagramas de Mermaid](https://welpo.github.io/tabi/ca/blog/shortcodes/#diagrames-de-mermaid) per a crear diagrames i gràfics amb text. - Ressaltat de sintaxi de codi amb colors basats en [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé. - Suport per a [comentaris usant giscus, utterances, Hyvor Talk o Isso](https://welpo.github.io/tabi/ca/blog/comments/). - [Cerca local](https://welpo.github.io/tabi/ca/blog/mastering-tabi-settings/#cerca) amb una interfície accessible i multilingüe. diff --git a/content/projects/tabi/index.es.md b/content/projects/tabi/index.es.md index 054404e4f..abb091b4e 100644 --- a/content/projects/tabi/index.es.md +++ b/content/projects/tabi/index.es.md @@ -22,6 +22,7 @@ social_media_card = "social_cards/es_projects_tabi.jpg" - [Soporte multilingüe completo](https://welpo.github.io/tabi/es/blog/faq-languages/#como-gestiona-tabi-el-soporte-multilingue). Añade tantos idiomas como desees y deja que tus usuarios elijan con un selector de idioma. - Temas claros y oscuros. Se adapta a la configuración del sistema operativo, con un interruptor en la barra de navegación. - Puntuación perfecta en Lighthouse (Rendimiento, Accesibilidad, Mejores Prácticas y SEO). +- Soporte para [diagramas de Mermaid](https://welpo.github.io/tabi/es/blog/shortcodes/#diagramas-de-mermaid) para crear diagramas y gráficos con texto. - Resaltado de sintaxis de código con colores basados en [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé. - Soporte para [comentarios usando giscus, utterances, Hyvor Talk o Isso](https://welpo.github.io/tabi/es/blog/comments/). - Todo el JavaScript se puede [deshabilitar completamente](https://welpo.github.io/tabi/es/blog/javascript/). diff --git a/content/projects/tabi/index.md b/content/projects/tabi/index.md index 7839d4fa8..a3fa4d611 100644 --- a/content/projects/tabi/index.md +++ b/content/projects/tabi/index.md @@ -24,6 +24,7 @@ social_media_card = "social_cards/projects_tabi.jpg" - [Comprehensive multi-language support](https://welpo.github.io/tabi/blog/faq-languages/#how-does-tabi-handle-multilingual-support). Add as many languages as you wish. - Support for [comments using giscus, utterances, Hyvor Talk, or Isso](https://welpo.github.io/tabi/blog/comments/). - Code syntax highlighting with colours based on [Catppuccin](https://github.com/catppuccin/catppuccin) Frappé. +- [Mermaid support](https://welpo.github.io/tabi/blog/shortcodes/#mermaid-diagrams) to create diagrams and charts with text. - [Local search](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#search) with an accessible, multi-lingual interface. - [Custom Twitter card](https://welpo.github.io/tabi/blog/mastering-tabi-settings/#social-media-cards) and automatic Open Graph tags. - [KaTeX](https://katex.org/) support for mathematical notation. diff --git a/sass/parts/_misc.scss b/sass/parts/_misc.scss index 024a4263b..ebe1c14aa 100644 --- a/sass/parts/_misc.scss +++ b/sass/parts/_misc.scss @@ -238,3 +238,11 @@ details summary { display: inline-block; transform: rotate(270deg); } + +.mermaid p { + font-family: var(--sans-serif-font) !important; +} + +.mermaid .node .label { + max-width: none !important; +} diff --git a/static/js/copyCodeToClipboard.js b/static/js/copyCodeToClipboard.js index e22debef6..805eb59a4 100644 --- a/static/js/copyCodeToClipboard.js +++ b/static/js/copyCodeToClipboard.js @@ -36,7 +36,7 @@ const getTableCode = (block) => { .join(''); }; -document.querySelectorAll('pre').forEach((block) => { +document.querySelectorAll('pre:not(.mermaid)').forEach((block) => { const copyDiv = document.createElement('div'); copyDiv.setAttribute('role', 'button'); copyDiv.setAttribute('aria-label', initCopyText); diff --git a/static/js/copyCodeToClipboard.min.js b/static/js/copyCodeToClipboard.min.js index f27628acf..240d4ff4b 100644 --- a/static/js/copyCodeToClipboard.min.js +++ b/static/js/copyCodeToClipboard.min.js @@ -1 +1 @@ -const copiedText=document.getElementById("copy-success").textContent,initCopyText=document.getElementById("copy-init").textContent,changeIcon=(e,t)=>{e.classList.add(t),e.setAttribute("aria-label",copiedText),setTimeout(()=>{e.classList.remove(t),e.setAttribute("aria-label",initCopyText)},2500)},addCopyEventListenerToDiv=(e,t)=>{e.addEventListener("click",()=>copyCodeAndChangeIcon(e,t))},copyCodeAndChangeIcon=async(t,e)=>{e=(e.querySelector("table")?getTableCode:getNonTableCode)(e);try{await navigator.clipboard.writeText(e),changeIcon(t,"checked")}catch(e){changeIcon(t,"error")}},getNonTableCode=e=>[...e.querySelectorAll("code")].map(e=>e.textContent).join(""),getTableCode=e=>[...e.querySelectorAll("tr")].map(e=>e.querySelector("td:last-child")?.innerText??"").join("");document.querySelectorAll("pre").forEach(e=>{var t=document.createElement("div");t.setAttribute("role","button"),t.setAttribute("aria-label",initCopyText),t.setAttribute("title",initCopyText),t.className="copy-code",e.prepend(t),addCopyEventListenerToDiv(t,e)}); +const copiedText=document.getElementById("copy-success").textContent,initCopyText=document.getElementById("copy-init").textContent,changeIcon=(e,t)=>{e.classList.add(t),e.setAttribute("aria-label",copiedText),setTimeout(()=>{e.classList.remove(t),e.setAttribute("aria-label",initCopyText)},2500)},addCopyEventListenerToDiv=(e,t)=>{e.addEventListener("click",()=>copyCodeAndChangeIcon(e,t))},copyCodeAndChangeIcon=async(t,e)=>{e=(e.querySelector("table")?getTableCode:getNonTableCode)(e);try{await navigator.clipboard.writeText(e),changeIcon(t,"checked")}catch(e){changeIcon(t,"error")}},getNonTableCode=e=>[...e.querySelectorAll("code")].map(e=>e.textContent).join(""),getTableCode=e=>[...e.querySelectorAll("tr")].map(e=>e.querySelector("td:last-child")?.innerText??"").join("");document.querySelectorAll("pre:not(.mermaid)").forEach(e=>{var t=document.createElement("div");t.setAttribute("role","button"),t.setAttribute("aria-label",initCopyText),t.setAttribute("title",initCopyText),t.className="copy-code",e.prepend(t),addCopyEventListenerToDiv(t,e)}); diff --git a/static/js/mermaid.min.js b/static/js/mermaid.min.js new file mode 100644 index 000000000..2df5151fe --- /dev/null +++ b/static/js/mermaid.min.js @@ -0,0 +1,2089 @@ +"use strict";var __esbuild_esm_mermaid=(()=>{var a=Object.create,s=Object.defineProperty,k=Object.getOwnPropertyDescriptor,T=Object.getOwnPropertyNames,E=Object.getPrototypeOf,S=Object.prototype.hasOwnProperty,Ae=(t,e)=>s(t,"name",{value:e,configurable:!0}),C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),A=(t,e)=>{for(var r in e)s(t,r,{get:e[r],enumerable:!0})},N=(e,r,n,i)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let t of T(r))S.call(e,t)||t===n||s(e,t,{get:()=>r[t],enumerable:!(i=k(r,t))||i.enumerable});return e},I=(t,e,r)=>(N(t,e,"default"),r&&N(r,e,"default")),M=(t,e,r)=>(r=null!=t?a(E(t)):{},N(!e&&t&&t.__esModule?r:s(r,"default",{value:t,enumerable:!0}),t));function F(t){for(var e=[],r=1;r()=>e=t?t(t=0):e)(()=>{Ae(F,"dedent")}),Ye=C((t,e)=>{function r(){var i="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",e="Invalid Date",s=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,t={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:Ae(function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"},"ordinal")},n=Ae(function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},"m"),r={s:n,z:Ae(function(t){var t=-t.utcOffset(),e=Math.abs(t),r=Math.floor(e/60),e=e%60;return(t<=0?"+":"-")+n(r,2,"0")+":"+n(e,2,"0")},"z"),m:Ae(function t(e,r){var n,i,a;return e.date(){$=M(Ye(),1),z={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},R={trace:Ae(()=>{},"trace"),debug:Ae(()=>{},"debug"),info:Ae(()=>{},"info"),warn:Ae(()=>{},"warn"),error:Ae(()=>{},"error"),fatal:Ae(()=>{},"fatal")},q=Ae(function(t="fatal"){let e=z.fatal;"string"==typeof t?t.toLowerCase()in z&&(e=z[t]):"number"==typeof t&&(e=t),R.trace=()=>{},R.debug=()=>{},R.info=()=>{},R.warn=()=>{},R.error=()=>{},R.fatal=()=>{},e<=z.fatal&&(R.fatal=console.error?console.error.bind(console,U("FATAL"),"color: orange"):console.log.bind(console,"",U("FATAL"))),e<=z.error&&(R.error=console.error?console.error.bind(console,U("ERROR"),"color: orange"):console.log.bind(console,"",U("ERROR"))),e<=z.warn&&(R.warn=console.warn?console.warn.bind(console,U("WARN"),"color: orange"):console.log.bind(console,"",U("WARN"))),e<=z.info&&(R.info=console.info?console.info.bind(console,U("INFO"),"color: lightblue"):console.log.bind(console,"",U("INFO"))),e<=z.debug&&(R.debug=console.debug?console.debug.bind(console,U("DEBUG"),"color: lightgreen"):console.log.bind(console,"",U("DEBUG"))),e<=z.trace&&(R.trace=console.debug?console.debug.bind(console,U("TRACE"),"color: lightgreen"):console.log.bind(console,"",U("TRACE")))},"setLogLevel"),U=Ae(t=>`%c${(0,$.default)().format("ss.SSS")} : ${t} : `,"format")}),He=i(()=>{H=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,V=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Q=/\s*%%.*\n/gm}),Ve=i(()=>{J=class extends Error{static{Ae(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}}),Xe=i(()=>{t(),He(),Ve(),tt={},et=Ae(function(t,e){t=t.replace(H,"").replace(V,"").replace(Q,` +`);for(var[r,{detector:n}]of Object.entries(tt))if(n(t,e))return r;throw new J("No diagram type detected matching given configuration for text: "+t)},"detectType"),rt=Ae((...t)=>{for(var{id:e,detector:r,loader:n}of t)nt(e,r,n)},"registerLazyLoadedDiagrams"),nt=Ae((t,e,r)=>{tt[t]&&R.warn(`Detector with key ${t} already exists. Overwriting.`),tt[t]={detector:e,loader:r},R.debug(`Detector with key ${t} added`+(r?" with loader":""))},"addDetector"),at=Ae(t=>tt[t].loader,"getDiagramLoader")}),Ke=i(()=>{function B(){this.yy={}}var t=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,24],r=[1,25],F=[1,26],$=[1,27],z=[1,28],n=[1,63],i=[1,64],a=[1,65],s=[1,66],o=[1,67],l=[1,68],h=[1,69],u=[1,29],d=[1,30],p=[1,31],g=[1,32],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],b=[1,38],w=[1,39],k=[1,40],T=[1,41],_=[1,42],E=[1,43],S=[1,44],C=[1,45],A=[1,46],L=[1,47],N=[1,48],I=[1,50],q=[1,51],U=[1,52],j=[1,53],G=[1,54],W=[1,55],Y=[1,56],H=[1,57],V=[1,58],X=[1,59],K=[1,60],Z=[14,42],Q=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],J=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],M=[1,82],R=[1,83],D=[1,84],O=[1,85],P=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],rt=[12,33],nt=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],e={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,direction_tb:6,direction_bt:7,direction_rl:8,direction_lr:9,graphConfig:10,C4_CONTEXT:11,NEWLINE:12,statements:13,EOF:14,C4_CONTAINER:15,C4_COMPONENT:16,C4_DYNAMIC:17,C4_DEPLOYMENT:18,otherStatements:19,diagramStatements:20,otherStatement:21,title:22,accDescription:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,boundaryStatement:29,boundaryStartStatement:30,boundaryStopStatement:31,boundaryStart:32,LBRACE:33,ENTERPRISE_BOUNDARY:34,attributes:35,SYSTEM_BOUNDARY:36,BOUNDARY:37,CONTAINER_BOUNDARY:38,NODE:39,NODE_L:40,NODE_R:41,RBRACE:42,diagramStatement:43,PERSON:44,PERSON_EXT:45,SYSTEM:46,SYSTEM_DB:47,SYSTEM_QUEUE:48,SYSTEM_EXT:49,SYSTEM_EXT_DB:50,SYSTEM_EXT_QUEUE:51,CONTAINER:52,CONTAINER_DB:53,CONTAINER_QUEUE:54,CONTAINER_EXT:55,CONTAINER_EXT_DB:56,CONTAINER_EXT_QUEUE:57,COMPONENT:58,COMPONENT_DB:59,COMPONENT_QUEUE:60,COMPONENT_EXT:61,COMPONENT_EXT_DB:62,COMPONENT_EXT_QUEUE:63,REL:64,BIREL:65,REL_U:66,REL_D:67,REL_L:68,REL_R:69,REL_B:70,REL_INDEX:71,UPDATE_EL_STYLE:72,UPDATE_REL_STYLE:73,UPDATE_LAYOUT_CONFIG:74,attribute:75,STR:76,STR_KEY:77,STR_VALUE:78,ATTRIBUTE:79,ATTRIBUTE_EMPTY:80,$accept:0,$end:1},terminals_:{2:"error",6:"direction_tb",7:"direction_bt",8:"direction_rl",9:"direction_lr",11:"C4_CONTEXT",12:"NEWLINE",14:"EOF",15:"C4_CONTAINER",16:"C4_COMPONENT",17:"C4_DYNAMIC",18:"C4_DEPLOYMENT",22:"title",23:"accDescription",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"LBRACE",34:"ENTERPRISE_BOUNDARY",36:"SYSTEM_BOUNDARY",37:"BOUNDARY",38:"CONTAINER_BOUNDARY",39:"NODE",40:"NODE_L",41:"NODE_R",42:"RBRACE",44:"PERSON",45:"PERSON_EXT",46:"SYSTEM",47:"SYSTEM_DB",48:"SYSTEM_QUEUE",49:"SYSTEM_EXT",50:"SYSTEM_EXT_DB",51:"SYSTEM_EXT_QUEUE",52:"CONTAINER",53:"CONTAINER_DB",54:"CONTAINER_QUEUE",55:"CONTAINER_EXT",56:"CONTAINER_EXT_DB",57:"CONTAINER_EXT_QUEUE",58:"COMPONENT",59:"COMPONENT_DB",60:"COMPONENT_QUEUE",61:"COMPONENT_EXT",62:"COMPONENT_EXT_DB",63:"COMPONENT_EXT_QUEUE",64:"REL",65:"BIREL",66:"REL_U",67:"REL_D",68:"REL_L",69:"REL_R",70:"REL_B",71:"REL_INDEX",72:"UPDATE_EL_STYLE",73:"UPDATE_REL_STYLE",74:"UPDATE_LAYOUT_CONFIG",76:"STR",77:"STR_KEY",78:"STR_VALUE",79:"ATTRIBUTE",80:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[5,1],[5,1],[5,1],[5,1],[4,1],[10,4],[10,4],[10,4],[10,4],[10,4],[13,1],[13,1],[13,2],[19,1],[19,2],[19,3],[21,1],[21,1],[21,2],[21,2],[21,1],[29,3],[30,3],[30,3],[30,4],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[32,2],[31,1],[20,1],[20,2],[20,3],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,1],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[43,2],[35,1],[35,2],[75,1],[75,2],[75,1],[75,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(a[o-3]);break;case 19:n.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:n.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),n.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:n.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:n.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:n.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:n.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:n.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:n.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:n.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:n.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:n.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:n.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:n.addContainer("container",...a[o]),this.$=a[o];break;case 48:n.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:n.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:n.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:n.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:n.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:n.addComponent("component",...a[o]),this.$=a[o];break;case 54:n.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:n.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:n.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:n.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:n.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:n.addRel("rel",...a[o]),this.$=a[o];break;case 61:n.addRel("birel",...a[o]),this.$=a[o];break;case 62:n.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:n.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:n.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:n.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:n.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),n.addRel("rel",...a[o]),this.$=a[o];break;case 68:n.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:n.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:n.updateLayoutConfig("update_layout_config",...a[o]),this.$=a[o];break;case 71:this.$=[a[o]];break;case 72:a[o].unshift(a[o-1]),this.$=a[o];break;case 73:case 75:this.$=a[o].trim();break;case 74:var l={};l[a[o-1].trim()]=a[o].trim(),this.$=l;break;case 76:this.$=""}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:S,60:C,61:A,62:L,63:N,64:I,65:q,66:U,67:j,68:G,69:W,70:Y,71:H,72:V,73:X,74:K},{13:70,19:20,20:21,21:22,22:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:S,60:C,61:A,62:L,63:N,64:I,65:q,66:U,67:j,68:G,69:W,70:Y,71:H,72:V,73:X,74:K},{13:71,19:20,20:21,21:22,22:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:S,60:C,61:A,62:L,63:N,64:I,65:q,66:U,67:j,68:G,69:W,70:Y,71:H,72:V,73:X,74:K},{13:72,19:20,20:21,21:22,22:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:S,60:C,61:A,62:L,63:N,64:I,65:q,66:U,67:j,68:G,69:W,70:Y,71:H,72:V,73:X,74:K},{13:73,19:20,20:21,21:22,22:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:S,60:C,61:A,62:L,63:N,64:I,65:q,66:U,67:j,68:G,69:W,70:Y,71:H,72:V,73:X,74:K},{14:[1,74]},t(Z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:i,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:S,60:C,61:A,62:L,63:N,64:I,65:q,66:U,67:j,68:G,69:W,70:Y,71:H,72:V,73:X,74:K}),t(Z,[2,14]),t(Q,[2,16],{12:[1,76]}),t(Z,[2,36],{12:[1,77]}),t(J,[2,19]),t(J,[2,20]),{25:[1,78]},{27:[1,79]},t(J,[2,23]),{35:80,75:81,76:M,77:R,79:D,80:O},{35:86,75:81,76:M,77:R,79:D,80:O},{35:87,75:81,76:M,77:R,79:D,80:O},{35:88,75:81,76:M,77:R,79:D,80:O},{35:89,75:81,76:M,77:R,79:D,80:O},{35:90,75:81,76:M,77:R,79:D,80:O},{35:91,75:81,76:M,77:R,79:D,80:O},{35:92,75:81,76:M,77:R,79:D,80:O},{35:93,75:81,76:M,77:R,79:D,80:O},{35:94,75:81,76:M,77:R,79:D,80:O},{35:95,75:81,76:M,77:R,79:D,80:O},{35:96,75:81,76:M,77:R,79:D,80:O},{35:97,75:81,76:M,77:R,79:D,80:O},{35:98,75:81,76:M,77:R,79:D,80:O},{35:99,75:81,76:M,77:R,79:D,80:O},{35:100,75:81,76:M,77:R,79:D,80:O},{35:101,75:81,76:M,77:R,79:D,80:O},{35:102,75:81,76:M,77:R,79:D,80:O},{35:103,75:81,76:M,77:R,79:D,80:O},{35:104,75:81,76:M,77:R,79:D,80:O},t(P,[2,59]),{35:105,75:81,76:M,77:R,79:D,80:O},{35:106,75:81,76:M,77:R,79:D,80:O},{35:107,75:81,76:M,77:R,79:D,80:O},{35:108,75:81,76:M,77:R,79:D,80:O},{35:109,75:81,76:M,77:R,79:D,80:O},{35:110,75:81,76:M,77:R,79:D,80:O},{35:111,75:81,76:M,77:R,79:D,80:O},{35:112,75:81,76:M,77:R,79:D,80:O},{35:113,75:81,76:M,77:R,79:D,80:O},{35:114,75:81,76:M,77:R,79:D,80:O},{35:115,75:81,76:M,77:R,79:D,80:O},{20:116,29:49,30:61,32:62,34:n,36:i,37:a,38:s,39:o,40:l,41:h,43:23,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:S,60:C,61:A,62:L,63:N,64:I,65:q,66:U,67:j,68:G,69:W,70:Y,71:H,72:V,73:X,74:K},{12:[1,118],33:[1,117]},{35:119,75:81,76:M,77:R,79:D,80:O},{35:120,75:81,76:M,77:R,79:D,80:O},{35:121,75:81,76:M,77:R,79:D,80:O},{35:122,75:81,76:M,77:R,79:D,80:O},{35:123,75:81,76:M,77:R,79:D,80:O},{35:124,75:81,76:M,77:R,79:D,80:O},{35:125,75:81,76:M,77:R,79:D,80:O},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Z,[2,15]),t(Q,[2,17],{21:22,19:130,22:e,23:r,24:F,26:$,28:z}),t(Z,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:F,26:$,28:z,34:n,36:i,37:a,38:s,39:o,40:l,41:h,44:u,45:d,46:p,47:g,48:f,49:m,50:y,51:v,52:x,53:b,54:w,55:k,56:T,57:_,58:E,59:S,60:C,61:A,62:L,63:N,64:I,65:q,66:U,67:j,68:G,69:W,70:Y,71:H,72:V,73:X,74:K}),t(J,[2,21]),t(J,[2,22]),t(P,[2,39]),t(tt,[2,71],{75:81,35:132,76:M,77:R,79:D,80:O}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(P,[2,40]),t(P,[2,41]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(P,[2,52]),t(P,[2,53]),t(P,[2,54]),t(P,[2,55]),t(P,[2,56]),t(P,[2,57]),t(P,[2,58]),t(P,[2,60]),t(P,[2,61]),t(P,[2,62]),t(P,[2,63]),t(P,[2,64]),t(P,[2,65]),t(P,[2,66]),t(P,[2,67]),t(P,[2,68]),t(P,[2,69]),t(P,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(rt,[2,28]),t(rt,[2,29]),t(rt,[2,30]),t(rt,[2,31]),t(rt,[2,32]),t(rt,[2,33]),t(rt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Q,[2,18]),t(Z,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(P,[2,24]),t(P,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[2,27])],defaultActions:{2:[2,1],3:[2,2],4:[2,7],5:[2,3],6:[2,4],7:[2,5],8:[2,6],74:[2,8],126:[2,9],127:[2,10],128:[2,11],129:[2,12]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0{lt=Ae((e,r,{depth:n=2,clobber:i=!1}={})=>{let a={depth:n,clobber:i};return Array.isArray(r)&&!Array.isArray(e)?(r.forEach(t=>lt(e,t,a)),e):Array.isArray(r)&&Array.isArray(e)?(r.forEach(t=>{e.includes(t)||e.push(t)}),e):void 0===e||n<=0?null!=e&&"object"==typeof e&&"object"==typeof r?Object.assign(e,r):r:(void 0!==r&&"object"==typeof e&&"object"==typeof r&&Object.keys(r).forEach(t=>{"object"!=typeof r[t]||void 0!==e[t]&&"object"!=typeof e[t]?(i||"object"!=typeof e[t]&&"object"!=typeof r[t])&&(e[t]=r[t]):(void 0===e[t]&&(e[t]=Array.isArray(r[t])?[]:{}),e[t]=lt(e[t],r[t],{depth:n-1,clobber:i}))}),e)},"assignWithDepth"),ct=lt}),Qe=i(()=>{ht={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:Ae(t=>255<=t?255:t<0?0:t,"r"),g:Ae(t=>255<=t?255:t<0?0:t,"g"),b:Ae(t=>255<=t?255:t<0?0:t,"b"),h:Ae(t=>t%360,"h"),s:Ae(t=>100<=t?100:t<0?0:t,"s"),l:Ae(t=>100<=t?100:t<0?0:t,"l"),a:Ae(t=>1<=t?1:t<0?0:t,"a")},toLinear:Ae(t=>{var e=t/255;return.03928(r<0&&(r+=1),1{if(!e)return 2.55*r;t/=360,e/=100;var i=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return 255*ht.hue2rgb(a,i,t+.3333333333333333);case"g":return 255*ht.hue2rgb(a,i,t);case"b":return 255*ht.hue2rgb(a,i,t-.3333333333333333)}},"hsl2rgb"),rgb2hsl:Ae(({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;var i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if("l"===n)return 100*s;if(i===a)return 0;var o=i-a;if("s"===n)return 100*(.5{dt={clamp:Ae((t,e,r)=>rMath.round(1e10*t)/1e10,"round")},pt=dt}),tr=i(()=>{gt={dec2hex:Ae(t=>1<(t=Math.round(t).toString(16)).length?t:"0"+t,"dec2hex")},ft=gt}),er=i(()=>{Qe(),Je(),tr(),mt={channel:ut,lang:pt,unit:ft}}),rr=i(()=>{er(),yt={};for(let t=0;t<=255;t++)yt[t]=mt.unit.dec2hex(t);vt={ALL:0,RGB:1,HSL:2}}),nr=i(()=>{rr(),xt=class{static{Ae(this,"Type")}constructor(){this.type=vt.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=vt.ALL}is(t){return this.type===t}},bt=xt}),ir=i(()=>{er(),nr(),rr(),wt=class{static{Ae(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new bt}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=vt.ALL,this}_ensureHSL(){var t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=mt.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=mt.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=mt.channel.rgb2hsl(t,"l"))}_ensureRGB(){var t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=mt.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=mt.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=mt.channel.hsl2rgb(t,"b"))}get r(){var t=this.data,e=t.r;return this.type.is(vt.HSL)||void 0===e?(this._ensureHSL(),mt.channel.hsl2rgb(t,"r")):e}get g(){var t=this.data,e=t.g;return this.type.is(vt.HSL)||void 0===e?(this._ensureHSL(),mt.channel.hsl2rgb(t,"g")):e}get b(){var t=this.data,e=t.b;return this.type.is(vt.HSL)||void 0===e?(this._ensureHSL(),mt.channel.hsl2rgb(t,"b")):e}get h(){var t=this.data,e=t.h;return this.type.is(vt.RGB)||void 0===e?(this._ensureRGB(),mt.channel.rgb2hsl(t,"h")):e}get s(){var t=this.data,e=t.s;return this.type.is(vt.RGB)||void 0===e?(this._ensureRGB(),mt.channel.rgb2hsl(t,"s")):e}get l(){var t=this.data,e=t.l;return this.type.is(vt.RGB)||void 0===e?(this._ensureRGB(),mt.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(vt.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(vt.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(vt.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(vt.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(vt.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(vt.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},kt=wt}),ar=i(()=>{ir(),Tt=new kt({r:0,g:0,b:0,a:0},"transparent"),_t=Tt}),sr=i(()=>{ar(),rr(),Et={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:Ae(t=>{if(35===t.charCodeAt(0)){var e,r,n,i,a,s=t.match(Et.re);if(s)return s=s[1],e=parseInt(s,16),s=s.length,_t.set({r:(e>>(n=(r=4>n*(2+i)&a)*r,b:(e>>n*(1+i)&a)*r,a:s?(e&a)*r/255:1},t)}},"parse"),stringify:Ae(t=>{var{r:t,g:e,b:r,a:n}=t;return n<1?"#"+yt[Math.round(t)]+yt[Math.round(e)]+yt[Math.round(r)]+yt[Math.round(255*n)]:"#"+yt[Math.round(t)]+yt[Math.round(e)]+yt[Math.round(r)]},"stringify")},St=Et}),or=i(()=>{er(),ar(),Ct={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:Ae(t=>{if(r=t.match(Ct.hueRe)){var[,e,r]=r;switch(r){case"grad":return mt.channel.clamp.h(.9*parseFloat(e));case"rad":return mt.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return mt.channel.clamp.h(360*parseFloat(e))}}return mt.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:Ae(t=>{var e,r,n,i,a=t.charCodeAt(0);if((104===a||72===a)&&(a=t.match(Ct.re)))return[,a,e,r,n,i]=a,_t.set({h:Ct._hue2deg(a),s:mt.channel.clamp.s(parseFloat(e)),l:mt.channel.clamp.l(parseFloat(r)),a:n?mt.channel.clamp.a(i?parseFloat(n)/100:parseFloat(n)):1},t)},"parse"),stringify:Ae(t=>{var{h:t,s:e,l:r,a:n}=t;return n<1?`hsla(${mt.lang.round(t)}, ${mt.lang.round(e)}%, ${mt.lang.round(r)}%, ${n})`:`hsl(${mt.lang.round(t)}, ${mt.lang.round(e)}%, ${mt.lang.round(r)}%)`},"stringify")},At=Ct}),lr=i(()=>{sr(),Lt={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:Ae(t=>{if(t=t.toLowerCase(),t=Lt.colors[t])return St.parse(t)},"parse"),stringify:Ae(t=>{var e,r=St.stringify(t);for(e in Lt.colors)if(Lt.colors[e]===r)return e},"stringify")},Nt=Lt}),cr=i(()=>{er(),ar(),It={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:Ae(t=>{var e,r,n,i,a,s,o,l=t.charCodeAt(0);if((114===l||82===l)&&(l=t.match(It.re)))return[,l,e,r,n,i,a,s,o]=l,_t.set({r:mt.channel.clamp.r(e?2.55*parseFloat(l):parseFloat(l)),g:mt.channel.clamp.g(n?2.55*parseFloat(r):parseFloat(r)),b:mt.channel.clamp.b(a?2.55*parseFloat(i):parseFloat(i)),a:s?mt.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},"parse"),stringify:Ae(t=>{var{r:t,g:e,b:r,a:n}=t;return n<1?`rgba(${mt.lang.round(t)}, ${mt.lang.round(e)}, ${mt.lang.round(r)}, ${mt.lang.round(n)})`:`rgb(${mt.lang.round(t)}, ${mt.lang.round(e)}, ${mt.lang.round(r)})`},"stringify")},Mt=It}),hr=i(()=>{sr(),or(),lr(),cr(),rr(),Rt={format:{keyword:Nt,hex:St,rgb:Mt,rgba:Mt,hsl:At,hsla:At},parse:Ae(t=>{if("string"!=typeof t)return t;var e=St.parse(t)||Mt.parse(t)||At.parse(t)||Nt.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:Ae(t=>!t.changed&&t.color?t.color:(t.type.is(vt.HSL)||void 0===t.data.r?At:t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Mt:St).stringify(t),"stringify")},Dt=Rt}),ur=i(()=>{er(),hr(),Ot=Ae((t,e)=>{var r,n=Dt.parse(t);for(r in e)n[r]=mt.channel.clamp[r](e[r]);return Dt.stringify(n)},"change"),Pt=Ot}),dr=i(()=>{er(),ar(),hr(),ur(),Bt=Ae((t,e,r=0,n=1)=>"number"!=typeof t?Pt(t,{a:e}):(t=_t.set({r:mt.channel.clamp.r(t),g:mt.channel.clamp.g(e),b:mt.channel.clamp.b(r),a:mt.channel.clamp.a(n)}),Dt.stringify(t)),"rgba"),Ft=Bt}),pr=i(()=>{er(),hr(),$t=Ae((t,e)=>mt.lang.round(Dt.parse(t)[e]),"channel"),zt=$t}),gr=i(()=>{er(),hr(),qt=Ae(t=>{var{r:t,g:e,b:r}=Dt.parse(t),t=.2126*mt.channel.toLinear(t)+.7152*mt.channel.toLinear(e)+.0722*mt.channel.toLinear(r);return mt.lang.round(t)},"luminance"),Ut=qt}),fr=i(()=>{gr(),jt=Ae(t=>.5<=Ut(t),"isLight"),Gt=jt}),mr=i(()=>{fr(),Wt=Ae(t=>!Gt(t),"isDark"),Yt=Wt}),yr=i(()=>{er(),hr(),Ht=Ae((t,e,r)=>{var n=(t=Dt.parse(t))[e];return n!==(r=mt.channel.clamp[e](n+r))&&(t[e]=r),Dt.stringify(t)},"adjustChannel"),Vt=Ht}),vr=i(()=>{yr(),Xt=Ae((t,e)=>Vt(t,"l",e),"lighten"),Kt=Xt}),xr=i(()=>{yr(),Zt=Ae((t,e)=>Vt(t,"l",-e),"darken"),Qt=Zt}),br=i(()=>{hr(),ur(),Jt=Ae((t,e)=>{var r,n=Dt.parse(t),i={};for(r in e)e[r]&&(i[r]=n[r]+e[r]);return Pt(t,i)},"adjust"),r=Jt}),wr=i(()=>{hr(),dr(),te=Ae((t,e,r=50)=>{var{r:t,g:n,b:i,a}=Dt.parse(t),{r:e,g:s,b:o,a:l}=Dt.parse(e),c=2*(r/=100)-1,h=a-l;return Ft(t*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+e*(h=1-c),n*c+s*h,i*c+o*h,a*r+l*(1-r))},"mix"),ee=te}),kr=i(()=>{hr(),wr(),re=Ae((t,e=100)=>{var r=Dt.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,ee(r,t,e)},"invert"),n=re}),Tr=i(()=>{dr(),pr(),mr(),vr(),xr(),br(),kr()}),_r=i(()=>{Tr()}),Er=i(()=>{ne="#ffffff",ie="#f2f2f2"}),Sr=i(()=>{_r(),ae=Ae((t,e)=>r(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),Cr=i(()=>{_r(),Er(),Sr(),se=class{static{Ae(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ae(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ae(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||n(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||n(this.tertiaryColor),this.lineColor=this.lineColor||n(this.background),this.arrowheadColor=this.arrowheadColor||n(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?Qt(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Qt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||n(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Kt(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},oe=Ae(t=>{var e=new se;return e.calculate(t),e},"getThemeVariables")}),Ar=i(()=>{_r(),Sr(),le=class{static{Ae(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Kt(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=n(this.background),this.secondaryBorderColor=ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Kt(n("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ft(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Qt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Qt(this.sectionBkgColor,10),this.taskBorderColor=Ft(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ft(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=Kt(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Kt(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Kt(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330});for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},ce=Ae(t=>{var e=new le;return e.calculate(t),e},"getThemeVariables")}),Lr=i(()=>{_r(),Sr(),Er(),he=class{static{Ae(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=r(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Ft(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Qt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Qt(this.tertiaryColor,40);for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},ue=Ae(t=>{var e=new he;return e.calculate(t),e},"getThemeVariables")}),Nr=i(()=>{_r(),Er(),Sr(),de=class{static{Ae(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Kt("#cde498",10),this.primaryBorderColor=ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.primaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=Qt(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Qt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Qt(this.tertiaryColor,40);for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},pe=Ae(t=>{var e=new de;return e.calculate(t),e},"getThemeVariables")}),Ir=i(()=>{_r(),Sr(),Er(),ge=class{static{Ae(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Kt(this.contrast,55),this.background="#ffffff",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=ae(this.primaryColor,this.darkMode),this.secondaryBorderColor=ae(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ae(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=Kt(this.contrast,55),this.border2=this.contrast,this.actorBorder=Kt(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},fe=Ae(t=>{var e=new ge;return e.calculate(t),e},"getThemeVariables")}),Mr=i(()=>{Cr(),Ar(),Lr(),Nr(),Ir(),ye={base:{getThemeVariables:oe},dark:{getThemeVariables:ce},default:{getThemeVariables:ue},forest:{getThemeVariables:pe},neutral:{getThemeVariables:fe}}}),Rr=i(()=>{ve={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1}}),Dr=i(()=>{Mr(),Rr(),xe={...ve,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"SIMPLE"},themeCSS:void 0,themeVariables:ye.default.getThemeVariables(),sequence:{...ve.sequence,messageFont:Ae(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:Ae(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:Ae(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},gantt:{...ve.gantt,tickInterval:void 0,useWidth:void 0},c4:{...ve.c4,useWidth:void 0,personFont:Ae(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),external_personFont:Ae(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:Ae(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:Ae(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:Ae(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:Ae(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:Ae(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:Ae(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:Ae(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:Ae(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:Ae(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:Ae(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:Ae(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:Ae(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:Ae(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:Ae(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:Ae(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:Ae(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:Ae(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:Ae(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:Ae(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:Ae(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...ve.pie,useWidth:984},xyChart:{...ve.xyChart,useWidth:void 0},requirement:{...ve.requirement,useWidth:void 0},packet:{...ve.packet}},be=Ae((r,n="")=>Object.keys(r).reduce((t,e)=>Array.isArray(r[e])?t:"object"==typeof r[e]&&null!==r[e]?[...t,n+e,...be(r[e],"")]:[...t,n+e],[]),"keyify"),we=new Set(be(xe,"")),ke=xe}),Or=i(()=>{Dr(),t(),Te=Ae(t=>{if(R.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>Te(t));else{for(var e of Object.keys(t)){var r;if(R.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!we.has(e)||null==t[e])R.debug("sanitize deleting key: ",e),delete t[e];else if("object"==typeof t[e])R.debug("sanitizing object",e),Te(t[e]);else for(r of["themeCSS","fontFamily","altFontFamily"])e.includes(r)&&(R.debug("sanitizing css option",e),t[e]=_e(t[e]))}if(t.themeVariables)for(var n of Object.keys(t.themeVariables)){var i=t.themeVariables[n];i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[n]="")}R.debug("After sanitization",t)}},"sanitizeDirective"),_e=Ae(t=>{let e=0,r=0;for(var n of t){if(e{Ze(),t(),Mr(),Dr(),Or(),Ee=Object.freeze(ke),Se=ct({},Ee),Le=[],Ne=ct({},Ee),Ie=Ae((t,e)=>{let r=ct({},t),n={};for(var i of e)Fe(i),n=ct(n,i);return r=ct(r,n),n.theme&&n.theme in ye&&(t=ct({},Ce),e=ct(t.themeVariables||{},n.themeVariables),r.theme)&&r.theme in ye&&(r.themeVariables=ye[r.theme].getThemeVariables(e)),Ge(Ne=r),Ne},"updateCurrentConfig"),Me=Ae(t=>(Se=ct({},Ee),Se=ct(Se,t),t.theme&&ye[t.theme]&&(Se.themeVariables=ye[t.theme].getThemeVariables(t.themeVariables)),Ie(Se,Le),Se),"setSiteConfig"),Re=Ae(t=>{Ce=ct({},t)},"saveConfigFromInitialize"),De=Ae(t=>(Se=ct(Se,t),Ie(Se,Le),Se),"updateSiteConfig"),Oe=Ae(()=>ct({},Se),"getSiteConfig"),Pe=Ae(t=>(Ge(t),ct(Ne,t),Be()),"setConfig"),Be=Ae(()=>ct({},Ne),"getConfig"),Fe=Ae(e=>{e&&(["secure",...Se.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(R.debug("Denied attempt to modify a secure key "+t,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{"string"==typeof e[t]&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],"object"==typeof e[t]&&Fe(e[t])}))},"sanitize"),$e=Ae(t=>{Te(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Le.push(t),Ie(Se,Le)},"addDirective"),ze=Ae((t=Se)=>{Ie(t,Le=[])},"reset"),qe={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Ue={},je=Ae(t=>{Ue[t]||(R.warn(qe[t]),Ue[t]=!0)},"issueWarning"),Ge=Ae(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&je("LAZY_LOAD_DEPRECATED")},"checkConfig")}),Br=C((t,e)=>{function r(){let{entries:Yt,setPrototypeOf:t,isFrozen:l,getPrototypeOf:c,getOwnPropertyDescriptor:h}=Object,{freeze:Ht,seal:e,create:Vt}=Object,{apply:a,construct:i}=typeof Reflect<"u"&&Reflect,Xt=(Ht=Ht||Ae(function(t){return t},"freeze"),e=e||Ae(function(t){return t},"seal"),a=a||Ae(function(t,e,r){return t.apply(e,r)},"apply"),i=i||Ae(function(t,e){return new t(...e)},"construct"),s(Array.prototype.forEach)),Kt=s(Array.prototype.pop),Zt=s(Array.prototype.push),Qt=s(String.prototype.toLowerCase),Jt=s(String.prototype.toString),te=s(String.prototype.match),ee=s(String.prototype.replace),we=s(String.prototype.indexOf),ke=s(String.prototype.trim),re=s(Object.prototype.hasOwnProperty),ne=s(RegExp.prototype.test),ie=r(TypeError);function s(i){return function(t){for(var e=arguments.length,r=new Array(1/gm),d=e(/\${[\w\W]*}/gm),p=e(/^data-[\-\w.\u00B7-\uFFFF]/),g=e(/^aria-[\-\w]+$/),ye=e(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),f=e(/^(?:\w+script|data):/i),m=e(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ve=e(/^html$/i),y=e(/^[a-z][.\w]*(-[.\w]+)+$/i);var Ee=Object.freeze({__proto__:null,MUSTACHE_EXPR:n,ERB_EXPR:u,TMPLIT_EXPR:d,DATA_ATTR:p,ARIA_ATTR:g,IS_ALLOWED_URI:ye,IS_SCRIPT_OR_DATA:f,ATTR_WHITESPACE:m,DOCTYPE_NAME:ve,CUSTOM_ELEMENT:y});let xe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Se=Ae(function(){return"u"be(t),"DOMPurify");if(u.version="3.1.6",u.removed=[],!t||!t.document||t.document.nodeType!==xe.document)return u.isSupported=!1,u;let i=t.document,c=i,O=c.currentScript,{DocumentFragment:P,HTMLTemplateElement:B,Node:h,Element:F,NodeFilter:e,NamedNodeMap:$=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:z,DOMParser:q,trustedTypes:d}=t,r=F.prototype,U=oe(r,"cloneNode"),j=oe(r,"remove"),G=oe(r,"nextSibling"),W=oe(r,"childNodes"),s=oe(r,"parentNode");var n;"function"==typeof B&&(n=i.createElement("template")).content&&n.content.ownerDocument&&(i=n.content.ownerDocument);let p,g="",{implementation:Y,createNodeIterator:H,createDocumentFragment:V,getElementsByTagName:X}=i,K=c.importNode,a={},{MUSTACHE_EXPR:Z,ERB_EXPR:Q,TMPLIT_EXPR:J,DATA_ATTR:tt,ARIA_ATTR:et,IS_SCRIPT_OR_DATA:rt,ATTR_WHITESPACE:nt,CUSTOM_ELEMENT:it}=(u.isSupported="function"==typeof Yt&&"function"==typeof s&&Y&&void 0!==Y.createHTMLDocument,Ee),at=Ee.IS_ALLOWED_URI,f=null,st=ae({},[...le,...ce,...he,...ue,...de]),m=null,ot=ae({},[...pe,...ge,...fe,...me]),o=Object.seal(Vt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),y=null,lt=null,ct=!0,ht=!0,ut=!1,dt=!0,v=!1,pt=!0,x=!1,gt=!1,ft=!1,b=!1,w=!1,k=!1,mt=!0,yt=!1,vt=!0,T=!1,l,_=null,xt=ae({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),bt=null,wt=ae({},["audio","video","img","source","image","track"]),kt=null,Tt=ae({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),E="http://www.w3.org/1998/Math/MathML",S="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml",A=C,_t=!1,Et=null,St=ae({},[E,S,C],Jt),L=null,Ct=["application/xhtml+xml","text/html"],N=null,I=null,At=i.createElement("form"),Lt=Ae(function(t){return t instanceof RegExp||t instanceof Function},"isRegexOrFunction"),Nt=Ae(function(){var t=0"+t:(n=te(t,/^[\r\n\t ]+/),r=n&&n[0]),"application/xhtml+xml"===L&&A===C&&(t=''+t+"");var n=p?p.createHTML(t):t;if(A===C)try{e=(new q).parseFromString(n,L)}catch{}if(!e||!e.documentElement){e=Y.createDocument(A,"template",null);try{e.documentElement.innerHTML=_t?g:n}catch{}}return n=e.body||e.documentElement,t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),A===C?X.call(e,x?"html":"body")[0]:x?e.documentElement:n},"_initDocument"),Ft=Ae(function(t){return H.call(t.ownerDocument||t,t,e.SHOW_ELEMENT|e.SHOW_COMMENT|e.SHOW_TEXT|e.SHOW_PROCESSING_INSTRUCTION|e.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),$t=Ae(function(t){return t instanceof z&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof $)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},"_isClobbered"),zt=Ae(function(t){return"function"==typeof h&&t instanceof h},"_isNode"),D=Ae(function(t,e,r){a[t]&&Xt(a[t],t=>{t.call(u,e,r,I)})},"_executeHook"),qt=Ae(function(e){let r=null;if(D("beforeSanitizeElements",e,null),!$t(e)){var t=N(e.nodeName);if(D("uponSanitizeElement",e,{tagName:t,allowedTags:f}),!(e.hasChildNodes()&&!zt(e.firstElementChild)&&ne(/<[/\w]/g,e.innerHTML)&&ne(/<[/\w]/g,e.textContent)||e.nodeType===xe.progressingInstruction||pt&&e.nodeType===xe.comment&&ne(/<[/\w]/g,e.data))){if(f[t]&&!y[t])return e instanceof F&&!Pt(e)||("noscript"===t||"noembed"===t||"noframes"===t)&&ne(/<\/no(script|embed|frames)/i,e.innerHTML)?(M(e),!0):(v&&e.nodeType===xe.text&&(r=e.textContent,Xt([Z,Q,J],t=>{r=ee(r,t," ")}),e.textContent!==r)&&(Zt(u.removed,{element:e.cloneNode()}),e.textContent=r),D("afterSanitizeElements",e,null),!1);if(!y[t]&&jt(t)&&(o.tagNameCheck instanceof RegExp&&ne(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t)))return!1;if(vt&&!_[t]){var n=s(e)||e.parentNode,i=W(e)||e.childNodes;if(i&&n)for(let t=i.length-1;0<=t;--t){var a=U(i[t],!0);a.__removalCount=(e.__removalCount||0)+1,n.insertBefore(a,G(e))}}}}return M(e),!0},"_sanitizeElements"),Ut=Ae(function(t,e,r){if(mt&&("id"===e||"name"===e)&&(r in i||r in At))return!1;if((!ht||lt[e]||!ne(tt,e))&&(!ct||!ne(et,e)))if(!m[e]||lt[e]){if(!(jt(t)&&(o.tagNameCheck instanceof RegExp&&ne(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t))&&(o.attributeNameCheck instanceof RegExp&&ne(o.attributeNameCheck,e)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(e))||"is"===e&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&ne(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!kt[e]&&!ne(at,ee(r,nt,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==we(r,"data:")||!bt[t])&&(!ut||ne(rt,ee(r,nt,"")))&&r)return!1;return!0},"_isValidAttribute"),jt=Ae(function(t){return"annotation-xml"!==t&&te(t,it)},"_isBasicCustomElement"),Gt=Ae(function(l){D("beforeSanitizeAttributes",l,null);var c=l.attributes;if(c){let s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m},o=c.length;for(;o--;){let t=c[o],{name:e,namespaceURI:r,value:n}=t,i=N(e),a="value"===e?n:ke(n);if(s.attrName=i,s.attrValue=a,s.keepAttr=!0,s.forceKeepAttr=void 0,D("uponSanitizeAttribute",l,s),a=s.attrValue,pt&&ne(/((--!?|])>)|<\/(style|title)/i,a))R(e,l);else if(!s.forceKeepAttr&&(R(e,l),s.keepAttr))if(!dt&&ne(/\/>/i,a))R(e,l);else{v&&Xt([Z,Q,J],t=>{a=ee(a,t," ")});var h=N(l.nodeName);if(Ut(h,i,a)){if(!yt||"id"!==i&&"name"!==i||(R(e,l),a="user-content-"+a),p&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(h,i)){case"TrustedHTML":a=p.createHTML(a);break;case"TrustedScriptURL":a=p.createScriptURL(a)}try{r?l.setAttributeNS(r,e,a):l.setAttribute(e,a),$t(l)?M(l):Kt(u.removed)}catch{}}}}D("afterSanitizeAttributes",l,null)}},"_sanitizeAttributes"),Wt=Ae(function t(e){var r,n=Ft(e);for(D("beforeSanitizeShadowDOM",e,null);r=n.nextNode();)D("uponSanitizeShadowNode",r,null),qt(r)||(r.content instanceof P&&t(r.content),Gt(r));D("afterSanitizeShadowDOM",e,null)},"_sanitizeShadowDOM");return u.sanitize=function(t){let e=1 +`+l),v&&Xt([Z,Q,J],t=>{l=ee(l,t," ")}),p&&k?p.createHTML(l):l},u.setConfig=function(){var t=0vn[t])}function zr(t){if(t.default)return t.default;if(t=t.type,"string"!=typeof(t=Array.isArray(t)?t[0]:t))return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function qr(t){for(var e=0;e=i[0]&&t<=i[1])return r.name}return null}function Ur(t){for(var e=0;e but got "+String(t)+".")}function e(t,e,r,n,i,a){xi[t][i]={font:e,group:r,replace:n},a&&n&&(xi[t][n]=xi[t][i])}function o(t){for(var{type:t,names:e,props:r,handler:n,htmlBuilder:i,mathmlBuilder:a}=t,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:void 0===r.allowedInMath||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:n},o=0;oAV".indexOf(c)))throw new X('Expected one of "<>AV=|." after @',s[l]);for(var u=0;u<2;u++){for(var d=!0,p=l+1;pTo});var fn,mn,X,yn,vn,xn,bn,wn,kn,Tn,_n,En,Sn,Cn,An,Ln,Nn,In,Mn,Rn,Dn,On,Pn,Bn,Fn,$n,zn,qn,Un,jn,Gn,Wn,Yn,Hn,Vn,Xn,Kn,Zn,Qn,Jn,ti,ei,ri,ni,ii,K,ai,si,oi,li,ci,hi,ui,di,pi,gi,fi,mi,yi,vi,xi,h,u,d,bi,p,wi,ki,Ti,_i,Ei,Si,Ci,Ai,Li,Ni,Ii,Mi,Ri,Di,Oi,Pi,Bi,Fi,$i,zi,qi,Ui,ji,Gi,Wi,Yi,Hi,Vi,Xi,Ki,Zi,Qi,Ji,Z,ta,ea,ra,na,ia,aa,sa,oa,la,ca,ha,ua,da,pa,ga,fa,ma,ya,va,xa,ba,_,wa,ka,Ta,_a,Ea,Sa,Ca,Aa,La,Na,Ia,Ma,Ra,Da,Oa,Pa,Ba,Fa,$a,za,qa,Ua,ja,Ga,Wa,Ya,Ha,Va,Xa,Ka,Za,Qa,Ja,ts,es,rs,ns,is,as,ss,os,ls,cs,hs,us,ds,ps,gs,fs,ms,ys,vs,xs,bs,ws,ks,Ts,_s,Es,Ss,Cs,As,Ls,Ns,Is,Ms,Rs,Ds,Os,Ps,Bs,Fs,$s,zs,qs,Us,js,Gs,Ws,Ys,Hs,Vs,Xs,Ks,Zs,Qs,Js,g,to,eo,ro,no,io,ao,so,oo,lo,co,ho,uo,po,go,fo,mo,yo,vo,f,xo,bo,wo,ko,m,To,_o=i(()=>{for(fn=class r{static{Ae(this,"SourceLocation")}constructor(t,e,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=e,this.end=r}static range(t,e){return e?t&&t.loc&&e.loc&&t.loc.lexer===e.loc.lexer?new r(t.loc.lexer,t.loc.start,e.loc.end):null:t&&t.loc}},mn=class n{static{Ae(this,"Token")}constructor(t,e){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=e}range(t,e){return new n(e,fn.range(this,t))}},(X=class s{static{Ae(this,"ParseError")}constructor(t,e){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,n,i,a="KaTeX parse error: "+t;return(e=e&&e.loc)&&e.start<=e.end&&(r=e.lexer.input,n=e.start,i=e.end,n===r.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ",e=r.slice(n,i).replace(/[^]/g,"$&̲"),a+=(15":">","<":"<",'"':""","'":"'"},xn=/[&><"']/g,Ae($r,"escape"),bn=Ae(function t(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?t(e.body[0]):e:"font"===e.type?t(e.body):e},"getBaseElem"),f=Ae(function(t){return"mathord"===(t=bn(t)).type||"textord"===t.type||"atom"===t.type},"isCharacterBox"),wn=Ae(function(t){if(t)return t;throw new Error("Expected non-null, but got "+String(t))},"assert"),Os=Ae(function(t){return(t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t))?":"===t[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"},"protocolFromUrl"),kn={contains:qs,deflt:m,escape:$r,hyphenate:co,getBaseElem:bn,isCharacterBox:f,protocolFromUrl:Os},Tn={displayMode:{type:"boolean",description:"Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format "},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color ",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:Ae(t=>"#"+t,"cliProcessor")},macros:{type:"object",cli:"-m, --macro ",cliDescription:"Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:Ae((t,e)=>(e.push(t),e),"cliProcessor")},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:Ae(t=>Math.max(0,t),"processor"),cli:"--min-rule-thickness ",cliProcessor:parseFloat},colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, enabling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:Ae(t=>Math.max(0,t),"processor"),cli:"-s, --max-size ",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.",processor:Ae(t=>Math.max(0,t),"processor"),cli:"-e, --max-expand ",cliProcessor:Ae(t=>"Infinity"===t?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},Ae(zr,"getDefaultValue"),_n=class{static{Ae(this,"Settings")}constructor(t){for(var e in this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,t=t||{},Tn){var r;Tn.hasOwnProperty(e)&&(r=Tn[e],this[e]=void 0!==t[e]?r.processor?r.processor(t[e]):t[e]:zr(r))}}reportNonstrict(t,e,r){var n=this.strict;if((n="function"==typeof n?n(t,e,r):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",r);"warn"===n?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]")}}useStrictBehavior(t,e,r){var n=this.strict;if("function"==typeof n)try{n=n(t,e,r)}catch{n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]"),1))}isTrusted(t){if(t.url&&!t.protocol){var e=kn.protocolFromUrl(t.url);if(null==e)return!1;t.protocol=e}return!!("function"==typeof this.trust?this.trust(t):this.trust)}},qs=class{static{Ae(this,"Style")}constructor(t,e,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=e,this.cramped=r}sup(){return En[Sn[this.id]]}sub(){return En[Cn[this.id]]}fracNum(){return En[An[this.id]]}fracDen(){return En[Ln[this.id]]}cramp(){return En[Nn[this.id]]}text(){return En[In[this.id]]}isTight(){return 2<=this.size}},En=[new qs(0,0,!1),new qs(1,0,!0),new qs(2,1,!1),new qs(3,1,!0),new qs(4,2,!1),new qs(5,2,!0),new qs(6,3,!1),new qs(7,3,!0)],Sn=[4,5,4,5,6,7,6,7],Cn=[5,5,5,5,7,7,7,7],An=[2,3,4,5,6,7,6,7],Ln=[3,3,5,5,7,7,7,7],Nn=[1,1,3,3,5,5,7,7],In=[0,1,2,3,2,3,2,3],Mn={DISPLAY:En[0],TEXT:En[2],SCRIPT:En[4],SCRIPTSCRIPT:En[6]},Rn=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}],Ae(qr,"scriptFromCodepoint"),Dn=[],Rn.forEach(t=>t.blocks.forEach(t=>Dn.push(...t))),Ae(Ur,"supportedCodepoint"),On=Ae(function(t,e){return"M95,"+(622+t+e)+` +c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14 +c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54 +c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10 +s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429 +c69,-144,104.5,-217.7,106.5,-221 +l`+t/2.075+" -"+t+` +c5.3,-9.3,12,-14,20,-14 +H400000v`+(40+t)+`H845.2724 +s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7 +c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z +M`+(834+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtMain"),Pn=Ae(function(t,e){return"M263,"+(601+t+e)+`c0.7,0,18,39.7,52,119 +c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120 +c340,-704.7,510.7,-1060.3,512,-1067 +l`+t/2.084+" -"+t+` +c4.7,-7.3,11,-11,19,-11 +H40000v`+(40+t)+`H1012.3 +s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232 +c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1 +s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26 +c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z +M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize1"),Bn=Ae(function(t,e){return"M983 "+(10+t+e)+` +l`+t/3.13+" -"+t+` +c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` +H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7 +s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744 +c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30 +c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722 +c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5 +c53.7,-170.3,84.5,-266.8,92.5,-289.5z +M`+(1001+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize2"),Fn=Ae(function(t,e){return"M424,"+(2398+t+e)+` +c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514 +c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20 +s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121 +s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081 +l`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 +v`+(40+t)+`H1014.6 +s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185 +c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2z M`+(1001+t)+" "+e+` +h400000v`+(40+t)+"h-400000z"},"sqrtSize3"),$n=Ae(function(t,e){return"M473,"+(2713+t+e)+` +c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` +c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 +s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9 +c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200 +c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26 +s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104, +606zM`+(1001+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"},"sqrtSize4"),zn=Ae(function(t){return"M400000 "+t+" H0 L"+t/2+" 0 l65 45 L145 "+(t-80)+" H400000z"},"phasePath"),qn=Ae(function(t,e,r){return"M702 "+(t+e)+"H400000"+(40+t)+` +H742v`+(r-54-e-t)+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1 +h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170 +c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667 +219 661 l218 661zM702 `+e+"H400000v"+(40+t)+"H742z"},"sqrtTall"),Un=Ae(function(t,e,r){e*=1e3;var n="";switch(t){case"sqrtMain":n=On(e,80);break;case"sqrtSize1":n=Pn(e,80);break;case"sqrtSize2":n=Bn(e,80);break;case"sqrtSize3":n=Fn(e,80);break;case"sqrtSize4":n=$n(e,80);break;case"sqrtTall":n=qn(e,80,r)}return n},"sqrtPath"),jn=Ae(function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"∣":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}},"innerPath"),Gn={doubleleftarrow:`M262 157 +l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3 + 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28 + 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5 +c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5 + 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87 +-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7 +-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z +m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l +-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5 + 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88 +-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68 +-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18 +-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782 +c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3 +-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120 + 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8 +-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247 +c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208 + 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3 + 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202 + l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117 +-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7 + 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80 +H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0 + 435 0h399565z`,leftgroupunder:`M400000 262 +H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219 + 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3 +-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5 +-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7 +-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5 + 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3 +-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7 +-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z +m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333 + 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5 + 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667 +-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12 + 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7 +-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0 +v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 +-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 +-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z +M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z +M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 +-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 +c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z +M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334 +c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 +-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 + 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 + 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6 +-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z +m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8 +60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8 +-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z +m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2 +c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6 +-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z +m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0 +85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8 +-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z +m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1 +c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128 +-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 + 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 + 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85 +-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 + 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l +-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5 +s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1 +c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0 + 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18 + 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3 +-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2 +-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 + 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11 +-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7 + 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z +m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8 + 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5 +-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95 +-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8 + 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 + 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3 +-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z +m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 + 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 +-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z +M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 +-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 +-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 + 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69 +-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3 +-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19 +-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101 + 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167 +c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 + 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42 + 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333 +-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70 + 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7 +-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0 + 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0 + 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128 +-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418 +-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9 + 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114 +c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751 + 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457 +-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0 + 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697 + 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696 + -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345 +-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409 + 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9 + 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409 + -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5 +3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11 +10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63 +-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1 +-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59 +H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359 +c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22 +c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10 +-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1, +-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10, +-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202 +c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5 +c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130 +s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47 +121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6 +s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11 +c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z +M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32 +-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0 +13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39 +-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5 +-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5 +-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67 +151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17 +c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21 +c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40 +c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z +M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11 +c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9, +1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7, +-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z +M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0 +c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199, +-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6 +c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Wn=Ae(function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v1759 h347 v-84 +H403z M403 1759 V0 H319 V1759 v`+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v1759 H0 v84 H347z +M347 1759 V0 H263 V1759 v`+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+` v585 h43z +M367 15 v585 v`+e+` v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+` v1715 h263 v84 H319z +MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+` v1799 H0 v-84 H319z +MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v602 h84z +M403 1759 V0 H319 V1759 v`+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v602 h84z +M347 1759 V0 h-84 V1759 v`+e+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1 +c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349, +-36,557 l0,`+(e+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9 +c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5, +-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189 +l0,-`+(e+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3, +63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5 +c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(e+9)+` +c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664 +c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11 +c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17 +c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558 +l0,-`+(e+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, +-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}},"tallDelim"),Yn=class{static{Ae(this,"DocumentFragment")}constructor(t){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return kn.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),e=0;et.toText(),"toText");return this.children.map(t).join("")}},Hn={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Vn={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Xn={"Å":"A","Ð":"D","Þ":"o","å":"a","ð":"d","þ":"o","А":"A","Б":"B","В":"B","Г":"F","Д":"A","Е":"E","Ж":"K","З":"3","И":"N","Й":"N","К":"K","Л":"N","М":"M","Н":"H","О":"O","П":"N","Р":"P","С":"C","Т":"T","У":"y","Ф":"O","Х":"X","Ц":"U","Ч":"h","Ш":"W","Щ":"W","Ъ":"B","Ы":"X","Ь":"B","Э":"3","Ю":"X","Я":"R","а":"a","б":"b","в":"a","г":"r","д":"y","е":"e","ж":"m","з":"e","и":"n","й":"n","к":"n","л":"n","м":"m","н":"n","о":"o","п":"n","р":"p","с":"c","т":"o","у":"y","ф":"b","х":"x","ц":"n","ч":"n","ш":"w","щ":"w","ъ":"a","ы":"m","ь":"a","э":"e","ю":"m","я":"r"},Ae(jr,"setFontMetrics"),Ae(Gr,"getCharacterMetrics"),Kn={},Ae(Wr,"getGlobalMetrics"),Zn=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Qn=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Jn=Ae(function(t,e){return e.size<2?t:Zn[t-1][e.size-1]},"sizeAtStyle"),(ti=class i{static{Ae(this,"Options")}constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||i.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=Qn[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var e,r={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(e in t)t.hasOwnProperty(e)&&(r[e]=t[e]);return new i(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Jn(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:Qn[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=Jn(i.BASESIZE,t);return this.size===e&&this.textSize===i.BASESIZE&&this.style===t?this:this.extend({style:t,size:e})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==i.BASESIZE?["sizing","reset-size"+this.size,"size"+i.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Wr(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,ei={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:1.00375,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:1.00375},ri={ex:!0,em:!0,mu:!0},ni=Ae(function(t){return(t="string"!=typeof t?t.unit:t)in ei||t in ri||"ex"===t},"validUnit"),ii=Ae(function(t,e){var r;if(t.unit in ei)r=ei[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)r=e.fontMetrics().cssEmPerMu;else{var n=e.style.isTight()?e.havingStyle(e.style.text()):e;if("ex"===t.unit)r=n.fontMetrics().xHeight;else{if("em"!==t.unit)throw new X("Invalid unit: '"+t.unit+"'");r=n.fontMetrics().quad}n!==e&&(r*=n.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*r,e.maxSize)},"calculateSize"),K=Ae(function(t){return+t.toFixed(4)+"em"},"makeEm"),ai=Ae(function(t){return t.filter(t=>t).join(" ")},"createClass"),si=Ae(function(t,e,r){this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},e&&(e.style.isTight()&&this.classes.push("mtight"),t=e.getColor())&&(this.style.color=t)},"initNode"),oi=Ae(function(t){var e,r,n=document.createElement(t);for(e in n.className=ai(this.classes),this.style)this.style.hasOwnProperty(e)&&(n.style[e]=this.style[e]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i"},"toMarkup"),ci=class{static{Ae(this,"Span")}constructor(t,e,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,si.call(this,t,r,n),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return kn.contains(this.classes,t)}toNode(){return oi.call(this,"span")}toMarkup(){return li.call(this,"span")}},hi=class{static{Ae(this,"Anchor")}constructor(t,e,r,n){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,si.call(this,e,n),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return kn.contains(this.classes,t)}toNode(){return oi.call(this,"a")}toMarkup(){return li.call(this,"a")}},ui=class{static{Ae(this,"Img")}constructor(t,e,r){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=e,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return kn.contains(this.classes,t)}toNode(){var t,e=document.createElement("img");for(t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var t,e=''+kn.escape(this.alt)+'"}},di={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},pi=class{static{Ae(this,"SymbolNode")}constructor(t,e,r,n,i,a,s,o){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=t,this.height=e||0,this.depth=r||0,this.italic=n||0,this.skew=i||0,this.width=a||0,this.classes=s||[],this.style=o||{},this.maxFontSize=0,(t=qr(this.text.charCodeAt(0)))&&this.classes.push(t+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=di[this.text])}hasClass(t){return kn.contains(this.classes,t)}toNode(){var t,e=document.createTextNode(this.text),r=null;for(t in 0":i}},gi=class{static{Ae(this,"SvgNode")}constructor(t,e){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=e||{}}toNode(){var t,e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r"}},fi=class{static{Ae(this,"PathNode")}constructor(t,e){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=e}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",Gn[this.pathName]),t}toMarkup(){return this.alternate?'':''}},mi=class{static{Ae(this,"LineNode")}constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t,e=document.createElementNS("http://www.w3.org/2000/svg","line");for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var t,e=""}},Ae(Yr,"assertSymbolDomNode"),Ae(Hr,"assertSpan"),yi={bin:1,close:1,inner:1,open:1,punct:1,rel:1},vi={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},xi={math:{},text:{}},Ae(e,"defineSymbol"),u="text",m="ams",co="accent-token",f="bin",Os="close",qs="inner",bi="mathord",lo="op-token",bo="open",$s="punct",xo="spacing",p="textord",e(h="math",d="main",g="rel","≡","\\equiv",!0),e(h,d,g,"≺","\\prec",!0),e(h,d,g,"≻","\\succ",!0),e(h,d,g,"∼","\\sim",!0),e(h,d,g,"⊥","\\perp"),e(h,d,g,"⪯","\\preceq",!0),e(h,d,g,"⪰","\\succeq",!0),e(h,d,g,"≃","\\simeq",!0),e(h,d,g,"∣","\\mid",!0),e(h,d,g,"≪","\\ll",!0),e(h,d,g,"≫","\\gg",!0),e(h,d,g,"≍","\\asymp",!0),e(h,d,g,"∥","\\parallel"),e(h,d,g,"⋈","\\bowtie",!0),e(h,d,g,"⌣","\\smile",!0),e(h,d,g,"⊑","\\sqsubseteq",!0),e(h,d,g,"⊒","\\sqsupseteq",!0),e(h,d,g,"≐","\\doteq",!0),e(h,d,g,"⌢","\\frown",!0),e(h,d,g,"∋","\\ni",!0),e(h,d,g,"∝","\\propto",!0),e(h,d,g,"⊢","\\vdash",!0),e(h,d,g,"⊣","\\dashv",!0),e(h,d,g,"∋","\\owns"),e(h,d,$s,".","\\ldotp"),e(h,d,$s,"⋅","\\cdotp"),e(h,d,p,"#","\\#"),e(u,d,p,"#","\\#"),e(h,d,p,"&","\\&"),e(u,d,p,"&","\\&"),e(h,d,p,"ℵ","\\aleph",!0),e(h,d,p,"∀","\\forall",!0),e(h,d,p,"ℏ","\\hbar",!0),e(h,d,p,"∃","\\exists",!0),e(h,d,p,"∇","\\nabla",!0),e(h,d,p,"♭","\\flat",!0),e(h,d,p,"ℓ","\\ell",!0),e(h,d,p,"♮","\\natural",!0),e(h,d,p,"♣","\\clubsuit",!0),e(h,d,p,"℘","\\wp",!0),e(h,d,p,"♯","\\sharp",!0),e(h,d,p,"♢","\\diamondsuit",!0),e(h,d,p,"ℜ","\\Re",!0),e(h,d,p,"♡","\\heartsuit",!0),e(h,d,p,"ℑ","\\Im",!0),e(h,d,p,"♠","\\spadesuit",!0),e(h,d,p,"§","\\S",!0),e(u,d,p,"§","\\S"),e(h,d,p,"¶","\\P",!0),e(u,d,p,"¶","\\P"),e(h,d,p,"†","\\dag"),e(u,d,p,"†","\\dag"),e(u,d,p,"†","\\textdagger"),e(h,d,p,"‡","\\ddag"),e(u,d,p,"‡","\\ddag"),e(u,d,p,"‡","\\textdaggerdbl"),e(h,d,Os,"⎱","\\rmoustache",!0),e(h,d,bo,"⎰","\\lmoustache",!0),e(h,d,Os,"⟯","\\rgroup",!0),e(h,d,bo,"⟮","\\lgroup",!0),e(h,d,f,"∓","\\mp",!0),e(h,d,f,"⊖","\\ominus",!0),e(h,d,f,"⊎","\\uplus",!0),e(h,d,f,"⊓","\\sqcap",!0),e(h,d,f,"∗","\\ast"),e(h,d,f,"⊔","\\sqcup",!0),e(h,d,f,"◯","\\bigcirc",!0),e(h,d,f,"∙","\\bullet",!0),e(h,d,f,"‡","\\ddagger"),e(h,d,f,"≀","\\wr",!0),e(h,d,f,"⨿","\\amalg"),e(h,d,f,"&","\\And"),e(h,d,g,"⟵","\\longleftarrow",!0),e(h,d,g,"⇐","\\Leftarrow",!0),e(h,d,g,"⟸","\\Longleftarrow",!0),e(h,d,g,"⟶","\\longrightarrow",!0),e(h,d,g,"⇒","\\Rightarrow",!0),e(h,d,g,"⟹","\\Longrightarrow",!0),e(h,d,g,"↔","\\leftrightarrow",!0),e(h,d,g,"⟷","\\longleftrightarrow",!0),e(h,d,g,"⇔","\\Leftrightarrow",!0),e(h,d,g,"⟺","\\Longleftrightarrow",!0),e(h,d,g,"↦","\\mapsto",!0),e(h,d,g,"⟼","\\longmapsto",!0),e(h,d,g,"↗","\\nearrow",!0),e(h,d,g,"↩","\\hookleftarrow",!0),e(h,d,g,"↪","\\hookrightarrow",!0),e(h,d,g,"↘","\\searrow",!0),e(h,d,g,"↼","\\leftharpoonup",!0),e(h,d,g,"⇀","\\rightharpoonup",!0),e(h,d,g,"↙","\\swarrow",!0),e(h,d,g,"↽","\\leftharpoondown",!0),e(h,d,g,"⇁","\\rightharpoondown",!0),e(h,d,g,"↖","\\nwarrow",!0),e(h,d,g,"⇌","\\rightleftharpoons",!0),e(h,m,g,"≮","\\nless",!0),e(h,m,g,"","\\@nleqslant"),e(h,m,g,"","\\@nleqq"),e(h,m,g,"⪇","\\lneq",!0),e(h,m,g,"≨","\\lneqq",!0),e(h,m,g,"","\\@lvertneqq"),e(h,m,g,"⋦","\\lnsim",!0),e(h,m,g,"⪉","\\lnapprox",!0),e(h,m,g,"⊀","\\nprec",!0),e(h,m,g,"⋠","\\npreceq",!0),e(h,m,g,"⋨","\\precnsim",!0),e(h,m,g,"⪹","\\precnapprox",!0),e(h,m,g,"≁","\\nsim",!0),e(h,m,g,"","\\@nshortmid"),e(h,m,g,"∤","\\nmid",!0),e(h,m,g,"⊬","\\nvdash",!0),e(h,m,g,"⊭","\\nvDash",!0),e(h,m,g,"⋪","\\ntriangleleft"),e(h,m,g,"⋬","\\ntrianglelefteq",!0),e(h,m,g,"⊊","\\subsetneq",!0),e(h,m,g,"","\\@varsubsetneq"),e(h,m,g,"⫋","\\subsetneqq",!0),e(h,m,g,"","\\@varsubsetneqq"),e(h,m,g,"≯","\\ngtr",!0),e(h,m,g,"","\\@ngeqslant"),e(h,m,g,"","\\@ngeqq"),e(h,m,g,"⪈","\\gneq",!0),e(h,m,g,"≩","\\gneqq",!0),e(h,m,g,"","\\@gvertneqq"),e(h,m,g,"⋧","\\gnsim",!0),e(h,m,g,"⪊","\\gnapprox",!0),e(h,m,g,"⊁","\\nsucc",!0),e(h,m,g,"⋡","\\nsucceq",!0),e(h,m,g,"⋩","\\succnsim",!0),e(h,m,g,"⪺","\\succnapprox",!0),e(h,m,g,"≆","\\ncong",!0),e(h,m,g,"","\\@nshortparallel"),e(h,m,g,"∦","\\nparallel",!0),e(h,m,g,"⊯","\\nVDash",!0),e(h,m,g,"⋫","\\ntriangleright"),e(h,m,g,"⋭","\\ntrianglerighteq",!0),e(h,m,g,"","\\@nsupseteqq"),e(h,m,g,"⊋","\\supsetneq",!0),e(h,m,g,"","\\@varsupsetneq"),e(h,m,g,"⫌","\\supsetneqq",!0),e(h,m,g,"","\\@varsupsetneqq"),e(h,m,g,"⊮","\\nVdash",!0),e(h,m,g,"⪵","\\precneqq",!0),e(h,m,g,"⪶","\\succneqq",!0),e(h,m,g,"","\\@nsubseteqq"),e(h,m,f,"⊴","\\unlhd"),e(h,m,f,"⊵","\\unrhd"),e(h,m,g,"↚","\\nleftarrow",!0),e(h,m,g,"↛","\\nrightarrow",!0),e(h,m,g,"⇍","\\nLeftarrow",!0),e(h,m,g,"⇏","\\nRightarrow",!0),e(h,m,g,"↮","\\nleftrightarrow",!0),e(h,m,g,"⇎","\\nLeftrightarrow",!0),e(h,m,g,"△","\\vartriangle"),e(h,m,p,"ℏ","\\hslash"),e(h,m,p,"▽","\\triangledown"),e(h,m,p,"◊","\\lozenge"),e(h,m,p,"Ⓢ","\\circledS"),e(h,m,p,"®","\\circledR"),e(u,m,p,"®","\\circledR"),e(h,m,p,"∡","\\measuredangle",!0),e(h,m,p,"∄","\\nexists"),e(h,m,p,"℧","\\mho"),e(h,m,p,"Ⅎ","\\Finv",!0),e(h,m,p,"⅁","\\Game",!0),e(h,m,p,"‵","\\backprime"),e(h,m,p,"▲","\\blacktriangle"),e(h,m,p,"▼","\\blacktriangledown"),e(h,m,p,"■","\\blacksquare"),e(h,m,p,"⧫","\\blacklozenge"),e(h,m,p,"★","\\bigstar"),e(h,m,p,"∢","\\sphericalangle",!0),e(h,m,p,"∁","\\complement",!0),e(h,m,p,"ð","\\eth",!0),e(u,d,p,"ð","ð"),e(h,m,p,"╱","\\diagup"),e(h,m,p,"╲","\\diagdown"),e(h,m,p,"□","\\square"),e(h,m,p,"□","\\Box"),e(h,m,p,"◊","\\Diamond"),e(h,m,p,"¥","\\yen",!0),e(u,m,p,"¥","\\yen",!0),e(h,m,p,"✓","\\checkmark",!0),e(u,m,p,"✓","\\checkmark"),e(h,m,p,"ℶ","\\beth",!0),e(h,m,p,"ℸ","\\daleth",!0),e(h,m,p,"ℷ","\\gimel",!0),e(h,m,p,"ϝ","\\digamma",!0),e(h,m,p,"ϰ","\\varkappa"),e(h,m,bo,"┌","\\@ulcorner",!0),e(h,m,Os,"┐","\\@urcorner",!0),e(h,m,bo,"└","\\@llcorner",!0),e(h,m,Os,"┘","\\@lrcorner",!0),e(h,m,g,"≦","\\leqq",!0),e(h,m,g,"⩽","\\leqslant",!0),e(h,m,g,"⪕","\\eqslantless",!0),e(h,m,g,"≲","\\lesssim",!0),e(h,m,g,"⪅","\\lessapprox",!0),e(h,m,g,"≊","\\approxeq",!0),e(h,m,f,"⋖","\\lessdot"),e(h,m,g,"⋘","\\lll",!0),e(h,m,g,"≶","\\lessgtr",!0),e(h,m,g,"⋚","\\lesseqgtr",!0),e(h,m,g,"⪋","\\lesseqqgtr",!0),e(h,m,g,"≑","\\doteqdot"),e(h,m,g,"≓","\\risingdotseq",!0),e(h,m,g,"≒","\\fallingdotseq",!0),e(h,m,g,"∽","\\backsim",!0),e(h,m,g,"⋍","\\backsimeq",!0),e(h,m,g,"⫅","\\subseteqq",!0),e(h,m,g,"⋐","\\Subset",!0),e(h,m,g,"⊏","\\sqsubset",!0),e(h,m,g,"≼","\\preccurlyeq",!0),e(h,m,g,"⋞","\\curlyeqprec",!0),e(h,m,g,"≾","\\precsim",!0),e(h,m,g,"⪷","\\precapprox",!0),e(h,m,g,"⊲","\\vartriangleleft"),e(h,m,g,"⊴","\\trianglelefteq"),e(h,m,g,"⊨","\\vDash",!0),e(h,m,g,"⊪","\\Vvdash",!0),e(h,m,g,"⌣","\\smallsmile"),e(h,m,g,"⌢","\\smallfrown"),e(h,m,g,"≏","\\bumpeq",!0),e(h,m,g,"≎","\\Bumpeq",!0),e(h,m,g,"≧","\\geqq",!0),e(h,m,g,"⩾","\\geqslant",!0),e(h,m,g,"⪖","\\eqslantgtr",!0),e(h,m,g,"≳","\\gtrsim",!0),e(h,m,g,"⪆","\\gtrapprox",!0),e(h,m,f,"⋗","\\gtrdot"),e(h,m,g,"⋙","\\ggg",!0),e(h,m,g,"≷","\\gtrless",!0),e(h,m,g,"⋛","\\gtreqless",!0),e(h,m,g,"⪌","\\gtreqqless",!0),e(h,m,g,"≖","\\eqcirc",!0),e(h,m,g,"≗","\\circeq",!0),e(h,m,g,"≜","\\triangleq",!0),e(h,m,g,"∼","\\thicksim"),e(h,m,g,"≈","\\thickapprox"),e(h,m,g,"⫆","\\supseteqq",!0),e(h,m,g,"⋑","\\Supset",!0),e(h,m,g,"⊐","\\sqsupset",!0),e(h,m,g,"≽","\\succcurlyeq",!0),e(h,m,g,"⋟","\\curlyeqsucc",!0),e(h,m,g,"≿","\\succsim",!0),e(h,m,g,"⪸","\\succapprox",!0),e(h,m,g,"⊳","\\vartriangleright"),e(h,m,g,"⊵","\\trianglerighteq"),e(h,m,g,"⊩","\\Vdash",!0),e(h,m,g,"∣","\\shortmid"),e(h,m,g,"∥","\\shortparallel"),e(h,m,g,"≬","\\between",!0),e(h,m,g,"⋔","\\pitchfork",!0),e(h,m,g,"∝","\\varpropto"),e(h,m,g,"◀","\\blacktriangleleft"),e(h,m,g,"∴","\\therefore",!0),e(h,m,g,"∍","\\backepsilon"),e(h,m,g,"▶","\\blacktriangleright"),e(h,m,g,"∵","\\because",!0),e(h,m,g,"⋘","\\llless"),e(h,m,g,"⋙","\\gggtr"),e(h,m,f,"⊲","\\lhd"),e(h,m,f,"⊳","\\rhd"),e(h,m,g,"≂","\\eqsim",!0),e(h,d,g,"⋈","\\Join"),e(h,m,g,"≑","\\Doteq",!0),e(h,m,f,"∔","\\dotplus",!0),e(h,m,f,"∖","\\smallsetminus"),e(h,m,f,"⋒","\\Cap",!0),e(h,m,f,"⋓","\\Cup",!0),e(h,m,f,"⩞","\\doublebarwedge",!0),e(h,m,f,"⊟","\\boxminus",!0),e(h,m,f,"⊞","\\boxplus",!0),e(h,m,f,"⋇","\\divideontimes",!0),e(h,m,f,"⋉","\\ltimes",!0),e(h,m,f,"⋊","\\rtimes",!0),e(h,m,f,"⋋","\\leftthreetimes",!0),e(h,m,f,"⋌","\\rightthreetimes",!0),e(h,m,f,"⋏","\\curlywedge",!0),e(h,m,f,"⋎","\\curlyvee",!0),e(h,m,f,"⊝","\\circleddash",!0),e(h,m,f,"⊛","\\circledast",!0),e(h,m,f,"⋅","\\centerdot"),e(h,m,f,"⊺","\\intercal",!0),e(h,m,f,"⋒","\\doublecap"),e(h,m,f,"⋓","\\doublecup"),e(h,m,f,"⊠","\\boxtimes",!0),e(h,m,g,"⇢","\\dashrightarrow",!0),e(h,m,g,"⇠","\\dashleftarrow",!0),e(h,m,g,"⇇","\\leftleftarrows",!0),e(h,m,g,"⇆","\\leftrightarrows",!0),e(h,m,g,"⇚","\\Lleftarrow",!0),e(h,m,g,"↞","\\twoheadleftarrow",!0),e(h,m,g,"↢","\\leftarrowtail",!0),e(h,m,g,"↫","\\looparrowleft",!0),e(h,m,g,"⇋","\\leftrightharpoons",!0),e(h,m,g,"↶","\\curvearrowleft",!0),e(h,m,g,"↺","\\circlearrowleft",!0),e(h,m,g,"↰","\\Lsh",!0),e(h,m,g,"⇈","\\upuparrows",!0),e(h,m,g,"↿","\\upharpoonleft",!0),e(h,m,g,"⇃","\\downharpoonleft",!0),e(h,d,g,"⊶","\\origof",!0),e(h,d,g,"⊷","\\imageof",!0),e(h,m,g,"⊸","\\multimap",!0),e(h,m,g,"↭","\\leftrightsquigarrow",!0),e(h,m,g,"⇉","\\rightrightarrows",!0),e(h,m,g,"⇄","\\rightleftarrows",!0),e(h,m,g,"↠","\\twoheadrightarrow",!0),e(h,m,g,"↣","\\rightarrowtail",!0),e(h,m,g,"↬","\\looparrowright",!0),e(h,m,g,"↷","\\curvearrowright",!0),e(h,m,g,"↻","\\circlearrowright",!0),e(h,m,g,"↱","\\Rsh",!0),e(h,m,g,"⇊","\\downdownarrows",!0),e(h,m,g,"↾","\\upharpoonright",!0),e(h,m,g,"⇂","\\downharpoonright",!0),e(h,m,g,"⇝","\\rightsquigarrow",!0),e(h,m,g,"⇝","\\leadsto"),e(h,m,g,"⇛","\\Rrightarrow",!0),e(h,m,g,"↾","\\restriction"),e(h,d,p,"‘","`"),e(h,d,p,"$","\\$"),e(u,d,p,"$","\\$"),e(u,d,p,"$","\\textdollar"),e(h,d,p,"%","\\%"),e(u,d,p,"%","\\%"),e(h,d,p,"_","\\_"),e(u,d,p,"_","\\_"),e(u,d,p,"_","\\textunderscore"),e(h,d,p,"∠","\\angle",!0),e(h,d,p,"∞","\\infty",!0),e(h,d,p,"′","\\prime"),e(h,d,p,"△","\\triangle"),e(h,d,p,"Γ","\\Gamma",!0),e(h,d,p,"Δ","\\Delta",!0),e(h,d,p,"Θ","\\Theta",!0),e(h,d,p,"Λ","\\Lambda",!0),e(h,d,p,"Ξ","\\Xi",!0),e(h,d,p,"Π","\\Pi",!0),e(h,d,p,"Σ","\\Sigma",!0),e(h,d,p,"Υ","\\Upsilon",!0),e(h,d,p,"Φ","\\Phi",!0),e(h,d,p,"Ψ","\\Psi",!0),e(h,d,p,"Ω","\\Omega",!0),e(h,d,p,"A","Α"),e(h,d,p,"B","Β"),e(h,d,p,"E","Ε"),e(h,d,p,"Z","Ζ"),e(h,d,p,"H","Η"),e(h,d,p,"I","Ι"),e(h,d,p,"K","Κ"),e(h,d,p,"M","Μ"),e(h,d,p,"N","Ν"),e(h,d,p,"O","Ο"),e(h,d,p,"P","Ρ"),e(h,d,p,"T","Τ"),e(h,d,p,"X","Χ"),e(h,d,p,"¬","\\neg",!0),e(h,d,p,"¬","\\lnot"),e(h,d,p,"⊤","\\top"),e(h,d,p,"⊥","\\bot"),e(h,d,p,"∅","\\emptyset"),e(h,m,p,"∅","\\varnothing"),e(h,d,bi,"α","\\alpha",!0),e(h,d,bi,"β","\\beta",!0),e(h,d,bi,"γ","\\gamma",!0),e(h,d,bi,"δ","\\delta",!0),e(h,d,bi,"ϵ","\\epsilon",!0),e(h,d,bi,"ζ","\\zeta",!0),e(h,d,bi,"η","\\eta",!0),e(h,d,bi,"θ","\\theta",!0),e(h,d,bi,"ι","\\iota",!0),e(h,d,bi,"κ","\\kappa",!0),e(h,d,bi,"λ","\\lambda",!0),e(h,d,bi,"μ","\\mu",!0),e(h,d,bi,"ν","\\nu",!0),e(h,d,bi,"ξ","\\xi",!0),e(h,d,bi,"ο","\\omicron",!0),e(h,d,bi,"π","\\pi",!0),e(h,d,bi,"ρ","\\rho",!0),e(h,d,bi,"σ","\\sigma",!0),e(h,d,bi,"τ","\\tau",!0),e(h,d,bi,"υ","\\upsilon",!0),e(h,d,bi,"ϕ","\\phi",!0),e(h,d,bi,"χ","\\chi",!0),e(h,d,bi,"ψ","\\psi",!0),e(h,d,bi,"ω","\\omega",!0),e(h,d,bi,"ε","\\varepsilon",!0),e(h,d,bi,"ϑ","\\vartheta",!0),e(h,d,bi,"ϖ","\\varpi",!0),e(h,d,bi,"ϱ","\\varrho",!0),e(h,d,bi,"ς","\\varsigma",!0),e(h,d,bi,"φ","\\varphi",!0),e(h,d,f,"∗","*",!0),e(h,d,f,"+","+"),e(h,d,f,"−","-",!0),e(h,d,f,"⋅","\\cdot",!0),e(h,d,f,"∘","\\circ",!0),e(h,d,f,"÷","\\div",!0),e(h,d,f,"±","\\pm",!0),e(h,d,f,"×","\\times",!0),e(h,d,f,"∩","\\cap",!0),e(h,d,f,"∪","\\cup",!0),e(h,d,f,"∖","\\setminus",!0),e(h,d,f,"∧","\\land"),e(h,d,f,"∨","\\lor"),e(h,d,f,"∧","\\wedge",!0),e(h,d,f,"∨","\\vee",!0),e(h,d,p,"√","\\surd"),e(h,d,bo,"⟨","\\langle",!0),e(h,d,bo,"∣","\\lvert"),e(h,d,bo,"∥","\\lVert"),e(h,d,Os,"?","?"),e(h,d,Os,"!","!"),e(h,d,Os,"⟩","\\rangle",!0),e(h,d,Os,"∣","\\rvert"),e(h,d,Os,"∥","\\rVert"),e(h,d,g,"=","="),e(h,d,g,":",":"),e(h,d,g,"≈","\\approx",!0),e(h,d,g,"≅","\\cong",!0),e(h,d,g,"≥","\\ge"),e(h,d,g,"≥","\\geq",!0),e(h,d,g,"←","\\gets"),e(h,d,g,">","\\gt",!0),e(h,d,g,"∈","\\in",!0),e(h,d,g,"","\\@not"),e(h,d,g,"⊂","\\subset",!0),e(h,d,g,"⊃","\\supset",!0),e(h,d,g,"⊆","\\subseteq",!0),e(h,d,g,"⊇","\\supseteq",!0),e(h,m,g,"⊈","\\nsubseteq",!0),e(h,m,g,"⊉","\\nsupseteq",!0),e(h,d,g,"⊨","\\models"),e(h,d,g,"←","\\leftarrow",!0),e(h,d,g,"≤","\\le"),e(h,d,g,"≤","\\leq",!0),e(h,d,g,"<","\\lt",!0),e(h,d,g,"→","\\rightarrow",!0),e(h,d,g,"→","\\to"),e(h,m,g,"≱","\\ngeq",!0),e(h,m,g,"≰","\\nleq",!0),e(h,d,xo," ","\\ "),e(h,d,xo," ","\\space"),e(h,d,xo," ","\\nobreakspace"),e(u,d,xo," ","\\ "),e(u,d,xo," "," "),e(u,d,xo," ","\\space"),e(u,d,xo," ","\\nobreakspace"),e(h,d,xo,null,"\\nobreak"),e(h,d,xo,null,"\\allowbreak"),e(h,d,$s,",",","),e(h,d,$s,";",";"),e(h,m,f,"⊼","\\barwedge",!0),e(h,m,f,"⊻","\\veebar",!0),e(h,d,f,"⊙","\\odot",!0),e(h,d,f,"⊕","\\oplus",!0),e(h,d,f,"⊗","\\otimes",!0),e(h,d,p,"∂","\\partial",!0),e(h,d,f,"⊘","\\oslash",!0),e(h,m,f,"⊚","\\circledcirc",!0),e(h,m,f,"⊡","\\boxdot",!0),e(h,d,f,"△","\\bigtriangleup"),e(h,d,f,"▽","\\bigtriangledown"),e(h,d,f,"†","\\dagger"),e(h,d,f,"⋄","\\diamond"),e(h,d,f,"⋆","\\star"),e(h,d,f,"◃","\\triangleleft"),e(h,d,f,"▹","\\triangleright"),e(h,d,bo,"{","\\{"),e(u,d,p,"{","\\{"),e(u,d,p,"{","\\textbraceleft"),e(h,d,Os,"}","\\}"),e(u,d,p,"}","\\}"),e(u,d,p,"}","\\textbraceright"),e(h,d,bo,"{","\\lbrace"),e(h,d,Os,"}","\\rbrace"),e(h,d,bo,"[","\\lbrack",!0),e(u,d,p,"[","\\lbrack",!0),e(h,d,Os,"]","\\rbrack",!0),e(u,d,p,"]","\\rbrack",!0),e(h,d,bo,"(","\\lparen",!0),e(h,d,Os,")","\\rparen",!0),e(u,d,p,"<","\\textless",!0),e(u,d,p,">","\\textgreater",!0),e(h,d,bo,"⌊","\\lfloor",!0),e(h,d,Os,"⌋","\\rfloor",!0),e(h,d,bo,"⌈","\\lceil",!0),e(h,d,Os,"⌉","\\rceil",!0),e(h,d,p,"\\","\\backslash"),e(h,d,p,"∣","|"),e(h,d,p,"∣","\\vert"),e(u,d,p,"|","\\textbar",!0),e(h,d,p,"∥","\\|"),e(h,d,p,"∥","\\Vert"),e(u,d,p,"∥","\\textbardbl"),e(u,d,p,"~","\\textasciitilde"),e(u,d,p,"\\","\\textbackslash"),e(u,d,p,"^","\\textasciicircum"),e(h,d,g,"↑","\\uparrow",!0),e(h,d,g,"⇑","\\Uparrow",!0),e(h,d,g,"↓","\\downarrow",!0),e(h,d,g,"⇓","\\Downarrow",!0),e(h,d,g,"↕","\\updownarrow",!0),e(h,d,g,"⇕","\\Updownarrow",!0),e(h,d,lo,"∐","\\coprod"),e(h,d,lo,"⋁","\\bigvee"),e(h,d,lo,"⋀","\\bigwedge"),e(h,d,lo,"⨄","\\biguplus"),e(h,d,lo,"⋂","\\bigcap"),e(h,d,lo,"⋃","\\bigcup"),e(h,d,lo,"∫","\\int"),e(h,d,lo,"∫","\\intop"),e(h,d,lo,"∬","\\iint"),e(h,d,lo,"∭","\\iiint"),e(h,d,lo,"∏","\\prod"),e(h,d,lo,"∑","\\sum"),e(h,d,lo,"⨂","\\bigotimes"),e(h,d,lo,"⨁","\\bigoplus"),e(h,d,lo,"⨀","\\bigodot"),e(h,d,lo,"∮","\\oint"),e(h,d,lo,"∯","\\oiint"),e(h,d,lo,"∰","\\oiiint"),e(h,d,lo,"⨆","\\bigsqcup"),e(h,d,lo,"∫","\\smallint"),e(u,d,qs,"…","\\textellipsis"),e(h,d,qs,"…","\\mathellipsis"),e(u,d,qs,"…","\\ldots",!0),e(h,d,qs,"…","\\ldots",!0),e(h,d,qs,"⋯","\\@cdots",!0),e(h,d,qs,"⋱","\\ddots",!0),e(h,d,p,"⋮","\\varvdots"),e(h,d,co,"ˊ","\\acute"),e(h,d,co,"ˋ","\\grave"),e(h,d,co,"¨","\\ddot"),e(h,d,co,"~","\\tilde"),e(h,d,co,"ˉ","\\bar"),e(h,d,co,"˘","\\breve"),e(h,d,co,"ˇ","\\check"),e(h,d,co,"^","\\hat"),e(h,d,co,"⃗","\\vec"),e(h,d,co,"˙","\\dot"),e(h,d,co,"˚","\\mathring"),e(h,d,bi,"","\\@imath"),e(h,d,bi,"","\\@jmath"),e(h,d,p,"ı","ı"),e(h,d,p,"ȷ","ȷ"),e(u,d,p,"ı","\\i",!0),e(u,d,p,"ȷ","\\j",!0),e(u,d,p,"ß","\\ss",!0),e(u,d,p,"æ","\\ae",!0),e(u,d,p,"œ","\\oe",!0),e(u,d,p,"ø","\\o",!0),e(u,d,p,"Æ","\\AE",!0),e(u,d,p,"Œ","\\OE",!0),e(u,d,p,"Ø","\\O",!0),e(u,d,co,"ˊ","\\'"),e(u,d,co,"ˋ","\\`"),e(u,d,co,"ˆ","\\^"),e(u,d,co,"˜","\\~"),e(u,d,co,"ˉ","\\="),e(u,d,co,"˘","\\u"),e(u,d,co,"˙","\\."),e(u,d,co,"¸","\\c"),e(u,d,co,"˚","\\r"),e(u,d,co,"ˇ","\\v"),e(u,d,co,"¨",'\\"'),e(u,d,co,"˝","\\H"),e(u,d,co,"◯","\\textcircled"),wi={"--":!0,"---":!0,"``":!0,"''":!0},e(u,d,p,"–","--",!0),e(u,d,p,"–","\\textendash"),e(u,d,p,"—","---",!0),e(u,d,p,"—","\\textemdash"),e(u,d,p,"‘","`",!0),e(u,d,p,"‘","\\textquoteleft"),e(u,d,p,"’","'",!0),e(u,d,p,"’","\\textquoteright"),e(u,d,p,"“","``",!0),e(u,d,p,"“","\\textquotedblleft"),e(u,d,p,"”","''",!0),e(u,d,p,"”","\\textquotedblright"),e(h,d,p,"°","\\degree",!0),e(u,d,p,"°","\\degree"),e(u,d,p,"°","\\textdegree",!0),e(h,d,p,"£","\\pounds"),e(h,d,p,"£","\\mathsterling",!0),e(u,d,p,"£","\\pounds"),e(u,d,p,"£","\\textsterling",!0),e(h,m,p,"✠","\\maltese"),e(u,m,p,"✠","\\maltese"),ki='0123456789/@."',_i=0;_i{if(ai(t.classes)!==ai(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(1===t.classes.length){var r=t.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},"canCombine"),f=Ae(t=>{for(var e=0;ee&&(e=a.height),a.depth>r&&(r=a.depth),a.maxFontSize>n&&(n=a.maxFontSize)}t.height=e,t.depth=r,t.maxFontSize=n},"sizeElementFromChildren"),Hi=Ae(function(t,e,r,n){return t=new ci(t,e,r,n),Yi(t),t},"makeSpan"),Vi=Ae((t,e,r,n)=>new ci(t,e,r,n),"makeSvgSpan"),bo=Ae(function(t,e,r){return(t=Hi([t],[],e)).height=Math.max(r||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),t.style.borderBottomWidth=K(t.height),t.maxFontSize=1,t},"makeLineSpan"),Os=Ae(function(t,e,r,n){return t=new hi(t,e,r,n),Yi(t),t},"makeAnchor"),Xi=Ae(function(t){return t=new Yn(t),Yi(t),t},"makeFragment"),g=Ae(function(t,e){return t instanceof Yn?Hi([],[t],e):t},"wrapFragment"),Ki=Ae(function(t){if("individualShift"===t.positionType){for(var e=t.children,r=[e[0]],n=-e[0].shift-e[0].elem.depth,i=n,a=1;a{var r=Hi(["mspace"],[],e),t=ii(t,e);return r.style.marginRight=K(t),r},"makeGlue"),Zi=Ae(function(t,e,r){var n="";switch(t){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=t}return n+"-"+("textbf"===e&&"textit"===r?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")},"retrieveTextFontName"),Qi={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Ji={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},co=Ae(function(t,e){var[t,r,n]=Ji[t],t=new fi(t),t=new gi([t],{width:K(r),height:K(n),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(t=Vi(["overlay"],[t],e)).height=n,t.style.height=K(n),t.style.width=K(r),t},"staticSvg"),Z={fontMap:Qi,makeSymbol:ji,mathsym:xo,makeSpan:Hi,makeSvgSpan:Vi,makeLineSpan:bo,makeAnchor:Os,makeFragment:Xi,wrapFragment:g,makeVList:lo,makeOrd:$s,makeGlue:qs,staticSvg:co,svgData:Ji,tryCombineChars:f},ta={mord:{mop:m={number:3,unit:"mu"},mbin:xo={number:4,unit:"mu"},mrel:bo={number:5,unit:"mu"},minner:m},mop:{mord:m,mop:m,mrel:bo,minner:m},mbin:{mord:xo,mop:xo,mopen:xo,minner:xo},mrel:{mord:bo,mop:bo,mopen:bo,minner:bo},mopen:{},mclose:{mop:m,mbin:xo,mrel:bo,minner:m},mpunct:{mord:m,mop:m,mrel:bo,mopen:m,mclose:m,mpunct:m,minner:m},minner:{mord:m,mop:m,mbin:xo,mrel:bo,mopen:m,mpunct:m,minner:m}},ea={mord:{mop:m},mop:{mord:m,mop:m},mbin:{},mrel:{},mopen:{},mclose:{mop:m},mpunct:{},minner:{mop:m}},ra={},na={},ia={},Ae(o,"defineFunction"),Ae(Vr,"defineFunctionBuilders"),aa=Ae(function(t){return"ordgroup"===t.type&&1===t.body.length?t.body[0]:t},"normalizeArgument"),sa=Ae(function(t){return"ordgroup"===t.type?t.body:[t]},"ordargument"),oa=Z.makeSpan,la=["leftmost","mbin","mopen","mrel","mop","mpunct"],ca=["rightmost","mrel","mclose","mpunct"],ha={display:Mn.DISPLAY,text:Mn.TEXT,script:Mn.SCRIPT,scriptscript:Mn.SCRIPTSCRIPT},ua={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},da=Ae(function(t,e,r,n){void 0===n&&(n=[null,null]);for(var i,a,s=[],o=0;o{var r=e.classes[0],n=t.classes[0];"mbin"===r&&kn.contains(ca,n)?e.classes[0]="mord":"mbin"===n&&kn.contains(la,r)&&(t.classes[0]="mord")},{node:a},n,r="root"===r),pa(s,(t,e)=>{var e=ma(e),r=ma(t);if(t=e&&r?(t.hasClass("mtight")?ea:ta)[e][r]:null)return Z.makeGlue(t,i)},{node:a},n,r)),s},"buildExpression"),pa=Ae(function t(r,e,n,i,a){i&&r.push(i);for(var s=0;st=>{r.splice(e+1,0,t),s++})(s))}i&&r.pop()},"traverseNonSpaceNodes"),ga=Ae(function(t){return t instanceof Yn||t instanceof hi||t instanceof ci&&t.hasClass("enclosing")?t:null},"checkPartialGroup"),fa=Ae(function t(e,r){var n=ga(e);if(n&&(n=n.children).length){if("right"===r)return t(n[n.length-1],"right");if("left"===r)return t(n[0],"left")}return e},"getOutermostNode"),ma=Ae(function(t,e){return t&&(e&&(t=fa(t,e)),ua[t.classes[0]])||null},"getTypeOfDomTree"),ya=Ae(function(t,e){return t=["nulldelimiter"].concat(t.baseSizingClasses()),oa(e.concat(t))},"makeNullDelimiter"),va=Ae(function(t,e,r){if(!t)return oa();var n;if(na[t.type])return n=na[t.type](t,e),r&&e.size!==r.size&&(n=oa(e.sizingClasses(r),[n],e),e=e.sizeMultiplier/r.sizeMultiplier,n.height*=e,n.depth*=e),n;throw new X("Got group of unknown type: '"+t.type+"'")},"buildGroup"),Ae(Xr,"buildHTMLUnbreakable"),Ae(Kr,"buildHTML"),Ae(Zr,"newDocumentFragment"),xa=class{static{Ae(this,"MathNode")}constructor(t,e,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=e||[],this.classes=r||[]}setAttribute(t,e){this.attributes[t]=e}getAttribute(t){return this.attributes[t]}toNode(){var t,e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);0"}toText(){return this.children.map(t=>t.toText()).join("")}},ba=class{static{Ae(this,"TextNode")}constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return kn.escape(this.toText())}toText(){return this.text}},Os=class{static{Ae(this,"SpaceNode")}constructor(t){this.width=void 0,this.character=void 0,this.width=t,this.character=.05555<=t&&t<=.05556?" ":.1666<=t&&t<=.1667?" ":.2222<=t&&t<=.2223?" ":.2777<=t&&t<=.2778?"  ":-.05556<=t&&t<=-.05555?" ⁣":-.1667<=t&&t<=-.1666?" ⁣":-.2223<=t&&t<=-.2222?" ⁣":-.2778<=t&&t<=-.2777?" ⁣":null}toNode(){var t;return this.character?document.createTextNode(this.character):((t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",K(this.width)),t)}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character||" "}},_={MathNode:xa,TextNode:ba,SpaceNode:Os,newDocumentFragment:Zr},wa=Ae(function(t,e,r){return!xi[e][t]||!xi[e][t].replace||55349===t.charCodeAt(0)||wi.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(t=xi[e][t].replace),new _.TextNode(t)},"makeText"),ka=Ae(function(t){return 1===t.length?t[0]:new _.MathNode("mrow",t)},"makeRow"),Ta=Ae(function(t,e){var r;return"texttt"===e.fontFamily?"monospace":"textsf"===e.fontFamily?"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif":"textit"===e.fontShape&&"textbf"===e.fontWeight?"bold-italic":"textit"===e.fontShape?"italic":"textbf"===e.fontWeight?"bold":(e=e.font)&&"mathnormal"!==e?(r=t.mode,"mathit"===e?"italic":"boldsymbol"===e?"textord"===t.type?"bold":"bold-italic":"mathbf"===e?"bold":"mathbb"===e?"double-struck":"mathfrak"===e?"fraktur":"mathscr"===e||"mathcal"===e?"script":"mathsf"===e?"sans-serif":"mathtt"===e?"monospace":(t=t.text,!kn.contains(["\\imath","\\jmath"],t)&&Gr(t=xi[r][t]&&xi[r][t].replace?xi[r][t].replace:t,Z.fontMap[e].fontName,r)?Z.fontMap[e].variant:null)):null},"getVariant"),_a=Ae(function(t,e,r){var n;if(1===t.length)return n=Sa(t[0],e),r&&n instanceof xa&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n];for(var i,a=[],s=0;s{t&&"supsub"===t.type?(o=(r=Jr(t.base,"accent")).base,t.base=o,n=Hr(va(t,e)),t.base=r):o=(r=Jr(t,"accent")).base;var r,n,i,a,t=va(o,e.havingCrampedStyle()),s=0,o=(r.isShifty&&kn.isCharacterBox(o)&&(o=kn.getBaseElem(o),s=Yr(va(o,e.havingCrampedStyle())).skew),"\\c"===r.label),l=o?t.height+t.depth:Math.min(t.height,e.fontMetrics().xHeight),c=r.isStretchy?(c=Da.svgSpan(r,e),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0{var r=t.isStretchy?Da.mathMLnode(t.label):new _.MathNode("mo",[wa(t.label,t.mode)]);return(t=new _.MathNode("mover",[Sa(t.base,e),r])).setAttribute("accent","true"),t},"mathmlBuilder$9"),Pa=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|")),o({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:Ae((t,e)=>{var e=aa(e[0]),r=!Pa.test(t.funcName),n=!r||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:n,base:e}},"handler"),htmlBuilder:Oa,mathmlBuilder:qs}),o({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:Ae((t,e)=>{var e=e[0],r=t.parser.mode;return"math"===r&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:e}},"handler"),htmlBuilder:Oa,mathmlBuilder:qs}),o({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:Ae((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"accentUnder",mode:t.mode,label:r,base:e}},"handler"),htmlBuilder:Ae((t,e)=>{var r=va(t.base,e),n=Da.svgSpan(t,e),t="\\utilde"===t.label?.12:0,n=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:t},{type:"elem",elem:r}]},e);return Z.makeSpan(["mord","accentunder"],[n],e)},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>{var r=Da.mathMLnode(t.label);return(t=new _.MathNode("munder",[Sa(t.base,e),r])).setAttribute("accentunder","true"),t},"mathmlBuilder")}),Ba=Ae(t=>((t=new _.MathNode("mpadded",t?[t]:[])).setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t),"paddedNode"),o({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:t,funcName:n}=t;return{type:"xArrow",mode:t.mode,label:n,body:e[0],below:r[0]}},htmlBuilder(t,e){var r,n=e.style,i=e.havingStyle(n.sup()),a=Z.wrapFragment(va(t.body,i,e),e),s="\\x"===t.label.slice(0,2)?"x":"cd",n=(a.classes.push(s+"-arrow-pad"),t.below&&(i=e.havingStyle(n.sub()),(r=Z.wrapFragment(va(t.below,i,e),e)).classes.push(s+"-arrow-pad")),Da.svgSpan(t,e)),i=-e.fontMetrics().axisHeight+.5*n.height,s=-e.fontMetrics().axisHeight-.5*n.height-.111;return(.25"atom"!==(t="ordgroup"===t.type&&t.body.length?t.body[0]:t).type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family,"binrelClass"),o({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){return{type:"mclass",mode:(t=t.parser).mode,mclass:$a(e[0]),body:sa(e[1]),isCharacterBox:kn.isCharacterBox(e[1])}}}),o({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:t,funcName:r}=t,n=e[1],e=e[0],i="\\stackrel"!==r?$a(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:sa(n)},n={type:"supsub",mode:e.mode,base:n,sup:"\\underset"===r?null:e,sub:"\\underset"===r?e:null};return{type:"mclass",mode:t.mode,mclass:i,body:[n],isCharacterBox:kn.isCharacterBox(n)}},htmlBuilder:rn,mathmlBuilder:nn}),o({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"pmb",mode:(t=t.parser).mode,mclass:$a(e[0]),body:sa(e[0])}},htmlBuilder(t,e){var r=da(t.body,e,!0);return(t=Z.makeSpan([t.mclass],r,e)).style.textShadow="0.02em 0.01em 0.04px",t},mathmlBuilder(t,e){return t=_a(t.body,e),(e=new _.MathNode("mstyle",t)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),e}}),za={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},qa=Ae(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),Ua=Ae(t=>"textord"===t.type&&"@"===t.text,"isStartOfArrow"),ja=Ae((t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e,"isLabelEnd"),Ae(an,"cdArrow"),Ae(sn,"parseCD"),o({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup());return(r=Z.wrapFragment(va(t.label,r,e),e)).classes.push("cd-label-"+t.side),r.style.bottom=K(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){return e=new _.MathNode("mrow",[Sa(t.label,e)]),(e=new _.MathNode("mpadded",[e])).setAttribute("width","0"),"left"===t.side&&e.setAttribute("lspace","-1width"),e.setAttribute("voffset","0.7em"),(e=new _.MathNode("mstyle",[e])).setAttribute("displaystyle","false"),e.setAttribute("scriptlevel","1"),e}}),o({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){return{type:"cdlabelparent",mode:(t=t.parser).mode,fragment:e[0]}},htmlBuilder(t,e){return(t=Z.wrapFragment(va(t.fragment,e),e)).classes.push("cd-vert-arrow"),t},mathmlBuilder(t,e){return new _.MathNode("mrow",[Sa(t.fragment,e)])}}),o({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var t=t.parser,r=Jr(e[0],"ordgroup").body,n="",i=0;i>10),56320+(1023&e))),{type:"textord",mode:t.mode,text:e}}}),co=Ae((t,e)=>(e=da(t.body,e.withColor(t.color),!1),Z.makeFragment(e)),"htmlBuilder$8"),f=Ae((t,e)=>(e=_a(t.body,e.withColor(t.color)),(e=new _.MathNode("mstyle",e)).setAttribute("mathcolor",t.color),e),"mathmlBuilder$7"),o({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var t=t.parser,r=Jr(e[0],"color-token").color,e=e[1];return{type:"color",mode:t.mode,color:r,body:sa(e)}},htmlBuilder:co,mathmlBuilder:f}),o({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:t,breakOnTokenText:r}=t,e=Jr(e[0],"color-token").color,r=(t.gullet.macros.set("\\current@color",e),t.parseExpression(!0,r));return{type:"color",mode:t.mode,color:e,body:r}},htmlBuilder:co,mathmlBuilder:f}),o({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var n="["===(t=t.parser).gullet.future().text?t.parseSizeGroup(!0):null,i=!t.settings.displayMode||!t.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:t.mode,newLine:i,size:n&&Jr(n,"size").value}},htmlBuilder(t,e){var r=Z.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size)&&(r.style.marginTop=K(ii(t.size,e))),r},mathmlBuilder(t,e){var r=new _.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size)&&r.setAttribute("height",K(ii(t.size,e))),r}}),Ga={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Wa=Ae(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new X("Expected a control sequence",t);return e},"checkControlSequence"),Ya=Ae(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text?t.gullet.popToken():e},"getRHS"),Ha=Ae((t,e,r,n)=>{var i=t.gullet.macros.get(r.text);null==i&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)},"letCommand"),o({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:t,funcName:e}=t,r=(t.consumeSpaces(),t.fetch());if(Ga[r.text])return"\\global"!==e&&"\\\\globallong"!==e||(r.text=Ga[r.text]),Jr(t.parseFunction(),"internal");throw new X("Invalid token after macro prefix",r)}}),o({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:t}=t,r=e.gullet.popToken(),n=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new X("Expected a control sequence",r);for(var i,a=0,s=[[]];"{"!==e.gullet.future().text;)if("#"===(r=e.gullet.popToken()).text){if("{"===e.gullet.future().text){i=e.gullet.future(),s[a].push("{");break}if(r=e.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new X('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==a+1)throw new X('Argument number "'+r.text+'" out of order');a++,s.push([])}else{if("EOF"===r.text)throw new X("Expected a macro definition");s[a].push(r.text)}var o=e.gullet.consumeArg().tokens;return i&&o.unshift(i),"\\edef"!==t&&"\\xdef"!==t||(o=e.gullet.expandTokens(o)).reverse(),e.gullet.macros.set(n,{tokens:o,numArgs:a,delimiters:s},t===Ga[t]),{type:"internal",mode:e.mode}}}),o({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:t,funcName:e}=t,r=Wa(t.gullet.popToken()),n=(t.gullet.consumeSpaces(),Ya(t));return Ha(t,r,n,"\\\\globallet"===e),{type:"internal",mode:t.mode}}}),o({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:t,funcName:e}=t,r=Wa(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return Ha(t,r,i,"\\\\globalfuture"===e),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}}),Va=Ae(function(t,e,r){if(r=Gr(xi.math[t]&&xi.math[t].replace||t,e,r))return r;throw new Error("Unsupported symbol "+t+" and font size "+e+".")},"getMetrics"),Xa=Ae(function(t,e,r,n){return e=r.havingBaseStyle(e),n=Z.makeSpan(n.concat(e.sizingClasses(r)),[t],r),t=e.sizeMultiplier/r.sizeMultiplier,n.height*=t,n.depth*=t,n.maxFontSize=e.sizeMultiplier,n},"styleWrap"),Ka=Ae(function(t,e,r){r=e.havingBaseStyle(r),r=(1-e.sizeMultiplier/r.sizeMultiplier)*e.fontMetrics().axisHeight,t.classes.push("delimcenter"),t.style.top=K(r),t.height-=r,t.depth+=r},"centerSpan"),Za=Ae(function(t,e,r,n,i,a){return t=Z.makeSymbol(t,"Main-Regular",i,n),i=Xa(t,e,n,a),r&&Ka(i,n,e),i},"makeSmallDelim"),Qa=Ae(function(t,e,r,n){return Z.makeSymbol(t,"Size"+e+"-Regular",r,n)},"mathrmSize"),Ja=Ae(function(t,e,r,n,i,a){return t=Qa(t,e,i,n),i=Xa(Z.makeSpan(["delimsizing","size"+e],[t],n),Mn.TEXT,n,a),r&&Ka(i,n,Mn.TEXT),i},"makeLargeDelim"),ts=Ae(function(t,e,r){return{type:"elem",elem:Z.makeSpan(["delimsizinginner","Size1-Regular"===e?"delim-size1":"delim-size4"],[Z.makeSpan([],[Z.makeSymbol(t,e,r)])])}},"makeGlyphSpan"),es=Ae(function(t,e,r){var n=(Hn["Size4-Regular"][t.charCodeAt(0)]?Hn["Size4-Regular"]:Hn["Size1-Regular"])[t.charCodeAt(0)][4],t=new fi("inner",jn(t,Math.round(1e3*e))),t=new gi([t],{width:K(n),height:K(e),style:"width:"+K(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"});return(t=Z.makeSvgSpan([],[t],r)).height=e,t.style.height=K(e),t.style.width=K(n),{type:"elem",elem:t}},"makeInner"),rs={type:"kern",size:-.008},ns=["|","\\lvert","\\rvert","\\vert"],is=["\\|","\\lVert","\\rVert","\\Vert"],as=Ae(function(t,e,r,n,i,a){var s,o,l,c="",h=0,u=s=o=t,d=null,p="Size1-Regular",t=("\\uparrow"===t?s=o="⏐":"\\Uparrow"===t?s=o="‖":"\\downarrow"===t?u=s="⏐":"\\Downarrow"===t?u=s="‖":"\\updownarrow"===t?(u="\\uparrow",s="⏐",o="\\downarrow"):"\\Updownarrow"===t?(u="\\Uparrow",s="‖",o="\\Downarrow"):kn.contains(ns,t)?(s="∣",c="vert",h=333):kn.contains(is,t)?(s="∥",c="doublevert",h=556):"["===t||"\\lbrack"===t?(u="⎡",s="⎢",o="⎣",p="Size4-Regular",c="lbrack",h=667):"]"===t||"\\rbrack"===t?(u="⎤",s="⎥",o="⎦",p="Size4-Regular",c="rbrack",h=667):"\\lfloor"===t||"⌊"===t?(s=u="⎢",o="⎣",p="Size4-Regular",c="lfloor",h=667):"\\lceil"===t||"⌈"===t?(u="⎡",s=o="⎢",p="Size4-Regular",c="lceil",h=667):"\\rfloor"===t||"⌋"===t?(s=u="⎥",o="⎦",p="Size4-Regular",c="rfloor",h=667):"\\rceil"===t||"⌉"===t?(u="⎤",s=o="⎥",p="Size4-Regular",c="rceil",h=667):"("===t||"\\lparen"===t?(u="⎛",s="⎜",o="⎝",p="Size4-Regular",c="lparen",h=875):")"===t||"\\rparen"===t?(u="⎞",s="⎟",o="⎠",p="Size4-Regular",c="rparen",h=875):"\\{"===t||"\\lbrace"===t?(u="⎧",d="⎨",o="⎩",s="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(u="⎫",d="⎬",o="⎭",s="⎪",p="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(u="⎧",o="⎩",s="⎪",p="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(u="⎫",o="⎭",s="⎪",p="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(u="⎧",o="⎭",s="⎪",p="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(u="⎫",o="⎩",s="⎪",p="Size4-Regular"),(t=Va(u,p,i)).height+t.depth),g=(g=Va(s,p,i)).height+g.depth,f=(f=Va(o,p,i)).height+f.depth,m=0,y=1,e=(null!==d&&(m=(v=Va(d,p,i)).height+v.depth,y=2),(v=t+f+m)+Math.max(0,Math.ceil((e-v)/(y*g)))*y*g),v=n.fontMetrics().axisHeight,y=(r&&(v*=n.sizeMultiplier),e/2-v),g=[],v=(0","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],hs=[0,1.2,1.8,2.4,3],bo=Ae(function(t,e,r,n,i){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),kn.contains(os,t)||kn.contains(cs,t))return Ja(t,e,!1,r,n,i);if(kn.contains(ls,t))return as(t,hs[e],!1,r,n,i);throw new X("Illegal delimiter: '"+t+"'")},"makeSizedDelim"),us=[{type:"small",style:Mn.SCRIPTSCRIPT},{type:"small",style:Mn.SCRIPT},{type:"small",style:Mn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],ds=[{type:"small",style:Mn.SCRIPTSCRIPT},{type:"small",style:Mn.SCRIPT},{type:"small",style:Mn.TEXT},{type:"stack"}],ps=[{type:"small",style:Mn.SCRIPTSCRIPT},{type:"small",style:Mn.SCRIPT},{type:"small",style:Mn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],gs=Ae(function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},"delimTypeToFont"),fs=Ae(function(t,e,r,n){for(var i=Math.min(2,3-n.style.size);i"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle");var s=kn.contains(cs,t)?us:kn.contains(os,t)?ps:ds;return"small"===(s=fs(t,e,s,n)).type?Za(t,s.style,r,n,i,a):"large"===s.type?Ja(t,s.size,r,n,i,a):as(t,e,r,n,i,a)},"makeCustomSizedDelim"),m=Ae(function(t,e,r,n,i,a){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,o=5/n.fontMetrics().ptPerEm,e=Math.max(e-s,r+s),r=Math.max(e/500*901,2*e-o);return ms(t,r,!0,n,i,a)},"makeLeftRightDelim"),ys={sqrtImage:xo,sizedDelim:bo,sizeToMaxHeight:hs,customSizedDelim:ms,leftRightDelim:m},vs={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},xs=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."],Ae(on,"checkDelimiter"),o({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:["primitive"]},handler:Ae((t,e)=>(e=on(e[0],t),{type:"delimsizing",mode:t.parser.mode,size:vs[t.funcName].size,mclass:vs[t.funcName].mclass,delim:e.text}),"handler"),htmlBuilder:Ae((t,e)=>"."===t.delim?Z.makeSpan([t.mclass]):ys.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:Ae(t=>{var e=[],e=("."!==t.delim&&e.push(wa(t.delim,t.mode)),new _.MathNode("mo",e)),t=("mopen"===t.mclass||"mclose"===t.mclass?e.setAttribute("fence","true"):e.setAttribute("fence","false"),e.setAttribute("stretchy","true"),K(ys.sizeToMaxHeight[t.size]));return e.setAttribute("minsize",t),e.setAttribute("maxsize",t),e},"mathmlBuilder")}),Ae(ln,"assertParsed"),o({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:Ae((t,e)=>{var r=t.parser.gullet.macros.get("\\current@color");if(r&&"string"!=typeof r)throw new X("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:t.parser.mode,delim:on(e[0],t).text,color:r}},"handler")}),o({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:Ae((t,e)=>{var e=on(e[0],t),r=(++(t=t.parser).leftrightDepth,t.parseExpression(!1)),n=(--t.leftrightDepth,t.expect("\\right",!1),Jr(t.parseFunction(),"leftright-right"));return{type:"leftright",mode:t.mode,body:r,left:e.text,right:n.delim,rightColor:n.color}},"handler"),htmlBuilder:Ae((t,e)=>{ln(t);for(var r,n=da(t.body,e,!0,["mopen","mclose"]),i=0,a=0,s=!1,o=0;o{ln(t);var r,e=_a(t.body,e);return"."!==t.left&&((r=new _.MathNode("mo",[wa(t.left,t.mode)])).setAttribute("fence","true"),e.unshift(r)),"."!==t.right&&((r=new _.MathNode("mo",[wa(t.right,t.mode)])).setAttribute("fence","true"),t.rightColor&&r.setAttribute("mathcolor",t.rightColor),e.push(r)),ka(e)},"mathmlBuilder")}),o({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:Ae((t,e)=>{if(e=on(e[0],t),t.parser.leftrightDepth)return{type:"middle",mode:t.parser.mode,delim:e.text};throw new X("\\middle without preceding \\left",e)},"handler"),htmlBuilder:Ae((t,e)=>{var r;return"."===t.delim?r=ya(e,[]):(r=ys.sizedDelim(t.delim,1,e,t.mode,[]),t={delim:t.delim,options:e},r.isMiddle=t),r},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(t="\\vert"===t.delim||"|"===t.delim?wa("|","text"):wa(t.delim,t.mode),(t=new _.MathNode("mo",[t])).setAttribute("fence","true"),t.setAttribute("lspace","0.05em"),t.setAttribute("rspace","0.05em"),t),"mathmlBuilder")}),Os=Ae((t,e)=>{var r,n,i,a,s,o=Z.wrapFragment(va(t.body,e),e),l=t.label.slice(1),c=e.sizeMultiplier,h=0,u=kn.isCharacterBox(t.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/c,h=-.5*e.fontMetrics().xHeight):"phase"===l?(a=ii({number:.6,unit:"pt"},e),s=ii({number:.35,unit:"ex"},e),c/=e.havingBaseSizing().sizeMultiplier,n=o.height+o.depth+a+s,o.style.paddingLeft=K(n/2+a),c=Math.floor(1e3*n*c),i=zn(c),i=new gi([new fi("phase",i)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[i],e)).style.height=K(n),h=o.depth+a+s):(/cancel/.test(l)?u||o.classes.push("cancel-pad"):"angl"===l?o.classes.push("anglpad"):o.classes.push("boxpad"),n=i=c=0,i=/box/.test(l)?(n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),c=e.fontMetrics().fboxsep+("colorbox"===l?0:n)):"angl"===l?(c=4*(n=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness)),Math.max(0,.25-o.depth)):c=u?.2:0,r=Da.encloseSpan(o,l,c,i,e),/fbox|boxed|fcolorbox/.test(l)?(r.style.borderStyle="solid",r.style.borderWidth=K(n)):"angl"===l&&.049!==n&&(r.style.borderTopWidth=K(n),r.style.borderRightWidth=K(n)),h=o.depth+i,t.backgroundColor&&(r.style.backgroundColor=t.backgroundColor,t.borderColor)&&(r.style.borderColor=t.borderColor)),s=t.backgroundColor?Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:0}]},e):(a=/cancel|phase/.test(l)?["svg-align"]:[],Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:o,shift:0},{type:"elem",elem:r,shift:h,wrapperClasses:a}]},e)),/cancel/.test(l)&&(s.height=o.height,s.depth=o.depth),/cancel/.test(l)&&!u?Z.makeSpan(["mord","cancel-lap"],[s],e):Z.makeSpan(["mord"],[s],e)},"htmlBuilder$7"),$s=Ae((t,e)=>{var r=new _.MathNode(-1{if(!t.parser.settings.displayMode)throw new X("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),Ae(un,"getAutoTag"),Ae(dn,"parseArray"),Ae(pn,"dCellStyle"),g=Ae(function(t,e){var r=t.body.length,P=t.hLinesBeforeRow,n=0,i=new Array(r),a=[],s=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),o=1/e.fontMetrics().ptPerEm,l=5*o,c=(t.colSeparationType&&"small"===t.colSeparationType&&(l=e.havingStyle(Mn.SCRIPT).sizeMultiplier/e.sizeMultiplier*.2778),"CD"===t.colSeparationType?ii({number:3,unit:"ex"},e):12*o),B=3*o,F=.7*(o=t.arraystretch*c),$=.3*o,h=0;function u(t){for(var e=0;et))for(R=0;Rt.length)),i.cols=new Array(n).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:g,mathmlBuilder:lo}),cn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){return(t=dn(t.parser,{arraystretch:.5},"script")).colSeparationType="small",t},htmlBuilder:g,mathmlBuilder:lo}),cn({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){if(1<(e=(en(e[0])?[e[0]]:Jr(e[0],"ordgroup").body).map(function(t){var e=tn(t).text;if(-1!=="lc".indexOf(e))return{type:"align",align:e};throw new X("Unknown column alignment: "+e,t)})).length)throw new X("{subarray} can contain only one column");if(0<(t=dn(t.parser,{cols:e,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1{var r=t.font,e=e.withFont(r);return va(t.body,e)},"htmlBuilder$5"),f=Ae((t,e)=>{var r=t.font,e=e.withFont(r);return Sa(t.body,e)},"mathmlBuilder$4"),Es={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},o({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:Ae((t,e)=>{var{parser:t,funcName:r}=t,e=aa(e[0]);return{type:"font",mode:t.mode,font:(r=r in Es?Es[r]:r).slice(1),body:e}},"handler"),htmlBuilder:co,mathmlBuilder:f}),o({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:Ae((t,e)=>{var t=t.parser,e=e[0],r=kn.isCharacterBox(e);return{type:"mclass",mode:t.mode,mclass:$a(e),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:e}],isCharacterBox:r}},"handler")}),o({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:Ae((t,e)=>{var{parser:t,funcName:r,breakOnTokenText:n}=t,i=t.mode,n=t.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:n}}},"handler"),htmlBuilder:co,mathmlBuilder:f}),Ss=Ae((t,e)=>("display"===t?e=e.id>=Mn.SCRIPT.id?e.text():Mn.DISPLAY:"text"===t&&e.size===Mn.DISPLAY.size?e=Mn.TEXT:"script"===t?e=Mn.SCRIPT:"scriptscript"===t&&(e=Mn.SCRIPTSCRIPT),e),"adjustStyle"),xo=Ae((t,e)=>{var r,n,i,a,s=Ss(t.size,e.style),o=s.fracNum(),l=s.fracDen(),o=e.havingStyle(o),c=va(t.numer,o,e),h=(t.continued&&(h=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm,c.height=c.height{var r=new _.MathNode("mfrac",[Sa(t.numer,e),Sa(t.denom,e)]),n=(t.hasBarLine?t.barSize&&(n=ii(t.barSize,e),r.setAttribute("linethickness",K(n))):r.setAttribute("linethickness","0px"),Ss(t.size,e.style));return n.size!==e.style.size&&(r=new _.MathNode("mstyle",[r]),e=n.size===Mn.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")),null!=t.leftDelim||null!=t.rightDelim?(n=[],null!=t.leftDelim&&((e=new _.MathNode("mo",[new _.TextNode(t.leftDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(e)),n.push(r),null!=t.rightDelim&&((e=new _.MathNode("mo",[new _.TextNode(t.rightDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(e)),ka(n)):r},"mathmlBuilder$3"),o({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:Ae((t,e)=>{var r,{parser:t,funcName:n}=t,i=e[0],e=e[1],a=null,s=null,o="auto";switch(n){case"\\dfrac":case"\\frac":case"\\tfrac":r=!0;break;case"\\\\atopfrac":r=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":r=!1,a="(",s=")";break;case"\\\\bracefrac":r=!1,a="\\{",s="\\}";break;case"\\\\brackfrac":r=!1,a="[",s="]";break;default:throw new Error("Unrecognized genfrac command")}switch(n){case"\\dfrac":case"\\dbinom":o="display";break;case"\\tfrac":case"\\tbinom":o="text"}return{type:"genfrac",mode:t.mode,continued:!1,numer:i,denom:e,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:xo,mathmlBuilder:bo}),o({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:Ae((t,e)=>{var t=t.parser,r=e[0],e=e[1];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:e,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")}),o({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var e,{parser:t,funcName:r,token:n}=t;switch(r){case"\\over":e="\\frac";break;case"\\choose":e="\\binom";break;case"\\atop":e="\\\\atopfrac";break;case"\\brace":e="\\\\bracefrac";break;case"\\brack":e="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:e,token:n}}}),Cs=["display","text","script","scriptscript"],As=Ae(function(t){var e=null;return 0{var t=t.parser,r=e[0],n=wn(Jr(e[1],"infix").size),e=e[2],i=0{var r,n,i=e.style,i="supsub"===t.type?(r=t.sup?va(t.sup,e.havingStyle(i.sup()),e):va(t.sub,e.havingStyle(i.sub()),e),Jr(t.base,"horizBrace")):Jr(t,"horizBrace"),t=va(i.base,e.havingBaseStyle(Mn.DISPLAY)),a=Da.svgSpan(i,e);return(i.isOver?(n=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:.1},{type:"elem",elem:a}]},e)).children[0].children[0].children[1]:(n=Z.makeVList({positionType:"bottom",positionData:t.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:t}]},e)).children[0].children[0].children[0]).classes.push("svg-align"),r&&(a=Z.makeSpan(["mord",i.isOver?"mover":"munder"],[n],e),n=i.isOver?Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:r}]},e):Z.makeVList({positionType:"bottom",positionData:a.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:a}]},e)),Z.makeSpan(["mord",i.isOver?"mover":"munder"],[n],e)},"htmlBuilder$3"),m=Ae((t,e)=>{var r=Da.mathMLnode(t.label);return new _.MathNode(t.isOver?"mover":"munder",[Sa(t.base,e),r])},"mathmlBuilder$2"),o({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t;return{type:"horizBrace",mode:t.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:Ls,mathmlBuilder:m}),o({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:Ae((t,e)=>{var t=t.parser,r=e[1],e=Jr(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:e})?{type:"href",mode:t.mode,href:e,body:sa(r)}:t.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:Ae((t,e)=>{var r=da(t.body,e,!1);return Z.makeAnchor(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>((e=(e=Ea(t.body,e))instanceof xa?e:new xa("mrow",[e])).setAttribute("href",t.href),e),"mathmlBuilder")}),o({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:Ae((t,e)=>{var t=t.parser,r=Jr(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var n=[],i=0;i{var{parser:t,funcName:r}=t,n=Jr(e[0],"raw").string,e=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var i,a={};switch(r){case"\\htmlClass":i={command:"\\htmlClass",class:a.class=n};break;case"\\htmlId":i={command:"\\htmlId",id:a.id=n};break;case"\\htmlStyle":i={command:"\\htmlStyle",style:a.style=n};break;case"\\htmlData":for(var s=n.split(","),o=0;o{var r,n=da(t.body,e,!1),i=["enclosing"],a=(t.attributes.class&&i.push(...t.attributes.class.trim().split(/\s+/)),Z.makeSpan(i,n,e));for(r in t.attributes)"class"!==r&&t.attributes.hasOwnProperty(r)&&a.setAttribute(r,t.attributes[r]);return a},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>Ea(t.body,e),"mathmlBuilder")}),o({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:Ae((t,e)=>({type:"htmlmathml",mode:(t=t.parser).mode,html:sa(e[0]),mathml:sa(e[1])}),"handler"),htmlBuilder:Ae((t,e)=>(t=da(t.html,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:Ae((t,e)=>Ea(t.mathml,e),"mathmlBuilder")}),Ns=Ae(function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new X("Invalid size: '"+t+"' in \\includegraphics");if(t={number:+(e[1]+e[2]),unit:e[3]},ni(t))return t;throw new X("Invalid unit: '"+t.unit+"' in \\includegraphics.")},"sizeData"),o({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:Ae((t,e,r)=>{var t=t.parser,n={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(r[0])for(var o=Jr(r[0],"raw").string.split(","),l=0;l{var r=ii(t.height,e),n=0,i=(0{var r=new _.MathNode("mglyph",[]),n=(r.setAttribute("alt",t.alt),ii(t.height,e)),i=0;return 0{var{parser:t,funcName:r}=t,e=e[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:e}},"handler"),htmlBuilder:Ae((t,e)=>{var r="clap"===t.alignment?(r=Z.makeSpan([],[va(t.body,e)]),Z.makeSpan(["inner"],[r],e)):Z.makeSpan(["inner"],[va(t.body,e)]),n=Z.makeSpan(["fix"],[]),t=Z.makeSpan([t.alignment],[r,n],e);return(r=Z.makeSpan(["strut"])).style.height=K(t.height+t.depth),t.depth&&(r.style.verticalAlign=K(-t.depth)),t.children.unshift(r),t=Z.makeSpan(["thinbox"],[t],e),Z.makeSpan(["mord","vbox"],[t],e)},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(e=new _.MathNode("mpadded",[Sa(t.body,e)]),"rlap"!==t.alignment&&(t="llap"===t.alignment?"-1":"-0.5",e.setAttribute("lspace",t+"width")),e.setAttribute("width","0px"),e),"mathmlBuilder")}),o({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:t,parser:r}=t,n=r.mode,t=(r.switchMode("math"),"\\("===t?"\\)":"$"),i=r.parseExpression(!1,t);return r.expect(t),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:i}}}),o({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new X("Mismatched "+t.funcName)}}),Is=Ae((t,e)=>{switch(e.style.size){case Mn.DISPLAY.size:return t.display;case Mn.TEXT.size:return t.text;case Mn.SCRIPT.size:return t.script;case Mn.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}},"chooseMathStyle"),o({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:Ae((t,e)=>({type:"mathchoice",mode:(t=t.parser).mode,display:sa(e[0]),text:sa(e[1]),script:sa(e[2]),scriptscript:sa(e[3])}),"handler"),htmlBuilder:Ae((t,e)=>(t=Is(t,e),t=da(t,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(t=Is(t,e),Ea(t,e)),"mathmlBuilder")}),Ms=Ae((t,e,r,n,i,a,s)=>{t=Z.makeSpan([],[t]);var o,l,c=r&&kn.isCharacterBox(r);if(e&&(o={elem:e=va(e,n.havingStyle(i.sup()),n),kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}),r&&(l={elem:e=va(r,n.havingStyle(i.sub()),n),kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}),o&&l)var r=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+s,h=Z.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n);else if(l)i=t.height-s,h=Z.makeVList({positionType:"top",positionData:i,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n);else{if(!o)return t;e=t.depth+s,h=Z.makeVList({positionType:"bottom",positionData:e,children:[{type:"elem",elem:t},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}return r=[h],l&&0!==a&&!c&&((i=Z.makeSpan(["mspace"],[],n)).style.marginRight=K(a),r.unshift(i)),Z.makeSpan(["mop","op-limits"],r,n)},"assembleSupSub"),Rs=["\\smallint"],Ds=Ae((t,e)=>{var r,n,i,a=!1,s=("supsub"===t.type?(r=t.sup,n=t.sub,i=Jr(t.base,"op"),a=!0):i=Jr(t,"op"),!1);if((t=e.style).size===Mn.DISPLAY.size&&i.symbol&&!kn.contains(Rs,i.name)&&(s=!0),i.symbol){var o,l=s?"Size2-Regular":"Size1-Regular",c="";"\\oiint"!==i.name&&"\\oiiint"!==i.name||(c=i.name.slice(1),i.name="oiint"===c?"\\iint":"\\iiint"),l=Z.makeSymbol(i.name,l,"math",e,["mop","op-symbol",s?"large-op":"small-op"]),0{var r;return t.symbol?(r=new xa("mo",[wa(t.name,t.mode)]),kn.contains(Rs,t.name)&&r.setAttribute("largeop","false")):r=t.body?new xa("mo",_a(t.body,e)):(r=new xa("mi",[new ba(t.name.slice(1))]),e=new xa("mo",[wa("⁡","text")]),t.parentIsSupSub?new xa("mrow",[r,e]):Zr([r,e])),r},"mathmlBuilder$1"),Ps={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},o({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:Ae((t,e)=>{var{parser:t,funcName:r}=t;return 1===r.length&&(r=Ps[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Ds,mathmlBuilder:Os}),o({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:Ae((t,e)=>(t=t.parser,e=e[0],{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:sa(e)}),"handler"),htmlBuilder:Ds,mathmlBuilder:Os}),Bs={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"},o({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Ds,mathmlBuilder:Os}),o({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Ds,mathmlBuilder:Os}),o({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return 1===e.length&&(e=Bs[e]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:e}},htmlBuilder:Ds,mathmlBuilder:Os}),Fs=Ae((t,e)=>{var r,n,i,a,s=!1;if("supsub"===t.type?(r=t.sup,n=t.sub,i=Jr(t.base,"operatorname"),s=!0):i=Jr(t,"operatorname"),0{var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t}),o=da(t,e.withFont("mathrm"),!0),l=0;l{for(var r=_a(t.body,e.withFont("mathrm")),n=!0,i=0;it.toText()).join(""),r=[new _.TextNode(e)]),(e=new _.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new _.MathNode("mo",[wa("⁡","text")]);return t.parentIsSupSub?new _.MathNode("mrow",[e,o]):_.newDocumentFragment([e,o])},"mathmlBuilder"),o({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:Ae((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"operatorname",mode:t.mode,body:sa(e),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:Fs,mathmlBuilder:$s}),l("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Vr({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Z.makeFragment(da(t.body,e,!1)):Z.makeSpan(["mord"],da(t.body,e,!0),e)},mathmlBuilder(t,e){return Ea(t.body,e,!0)}}),o({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){return t=t.parser,e=e[0],{type:"overline",mode:t.mode,body:e}},htmlBuilder(t,e){var t=va(t.body,e.havingCrampedStyle()),r=Z.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,t=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},e);return Z.makeSpan(["mord","overline"],[t],e)},mathmlBuilder(t,e){var r=new _.MathNode("mo",[new _.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new _.MathNode("mover",[Sa(t.body,e),r])).setAttribute("accent","true"),t}}),o({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:Ae((t,e)=>(t=t.parser,e=e[0],{type:"phantom",mode:t.mode,body:sa(e)}),"handler"),htmlBuilder:Ae((t,e)=>(t=da(t.body,e.withPhantom(),!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(t=_a(t.body,e),new _.MathNode("mphantom",t)),"mathmlBuilder")}),o({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:Ae((t,e)=>(t=t.parser,e=e[0],{type:"hphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:Ae((t,e)=>{var r=Z.makeSpan([],[va(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n(t=_a(sa(t.body),e),e=new _.MathNode("mphantom",t),(t=new _.MathNode("mpadded",[e])).setAttribute("height","0px"),t.setAttribute("depth","0px"),t),"mathmlBuilder")}),o({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:Ae((t,e)=>(t=t.parser,e=e[0],{type:"vphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:Ae((t,e)=>{var t=Z.makeSpan(["inner"],[va(t.body,e.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[t,r],e)},"htmlBuilder"),mathmlBuilder:Ae((t,e)=>(t=_a(sa(t.body),e),e=new _.MathNode("mphantom",t),(t=new _.MathNode("mpadded",[e])).setAttribute("width","0px"),t),"mathmlBuilder")}),o({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var t=t.parser,r=Jr(e[0],"size").value,e=e[1];return{type:"raisebox",mode:t.mode,dy:r,body:e}},htmlBuilder(t,e){var r=va(t.body,e),t=ii(t.dy,e);return Z.makeVList({positionType:"shift",positionData:-t,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return e=new _.MathNode("mpadded",[Sa(t.body,e)]),t=t.dy.number+t.dy.unit,e.setAttribute("voffset",t),e}}),o({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){return{type:"internal",mode:(t=t.parser).mode}}}),o({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,e,r){var t=t.parser,r=r[0],n=Jr(e[0],"size"),e=Jr(e[1],"size");return{type:"rule",mode:t.mode,shift:r&&Jr(r,"size").value,width:n.value,height:e.value}},htmlBuilder(t,e){var r=Z.makeSpan(["mord","rule"],[],e),n=ii(t.width,e),i=ii(t.height,e),t=t.shift?ii(t.shift,e):0;return r.style.borderRightWidth=K(n),r.style.borderTopWidth=K(i),r.style.bottom=K(t),r.width=n,r.height=i+t,r.depth=-t,r.maxFontSize=1.125*i*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=ii(t.width,e),n=ii(t.height,e),t=t.shift?ii(t.shift,e):0,e=e.color&&e.getColor()||"black",i=new _.MathNode("mspace"),e=(i.setAttribute("mathbackground",e),i.setAttribute("width",K(r)),i.setAttribute("height",K(n)),new _.MathNode("mpadded",[i]));return 0<=t?e.setAttribute("height",K(t)):(e.setAttribute("height",K(t)),e.setAttribute("depth",K(-t))),e.setAttribute("voffset",K(t)),e}}),Ae(gn,"sizingGroup"),zs=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],qs=Ae((t,e)=>{var r=e.havingSize(t.size);return gn(t.body,r,e)},"htmlBuilder"),o({type:"sizing",names:zs,props:{numArgs:0,allowedInText:!0},handler:Ae((t,e)=>{var{breakOnTokenText:t,funcName:r,parser:n}=t,t=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:zs.indexOf(r)+1,body:t}},"handler"),htmlBuilder:qs,mathmlBuilder:Ae((t,e)=>(e=e.havingSize(t.size),t=_a(t.body,e),(t=new _.MathNode("mstyle",t)).setAttribute("mathsize",K(e.sizeMultiplier)),t),"mathmlBuilder")}),o({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:Ae((t,e,r)=>{var t=t.parser,n=!1,i=!1,a=r[0]&&Jr(r[0],"ordgroup");if(a)for(var s,o=0;o{var r=Z.makeSpan([],[va(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n(e=new _.MathNode("mpadded",[Sa(t.body,e)]),t.smashHeight&&e.setAttribute("height","0px"),t.smashDepth&&e.setAttribute("depth","0px"),e),"mathmlBuilder")}),o({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){return t=t.parser,r=r[0],e=e[0],{type:"sqrt",mode:t.mode,body:e,index:r}},htmlBuilder(t,e){0===(r=va(t.body,e.havingCrampedStyle())).height&&(r.height=e.fontMetrics().xHeight);var r=Z.wrapFragment(r,e),n=i=e.fontMetrics().defaultRuleThickness,n=i+(e.style.idr.height+r.depth+n&&(n=(n+o-r.height-r.depth)/2),i.height-r.height-n-a),n=(r.style.paddingLeft=K(s),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:-(r.height+o)},{type:"elem",elem:i},{type:"kern",size:a}]},e));return t.index?(s=e.havingStyle(Mn.SCRIPTSCRIPT),r=va(t.index,s,e),o=.6*(n.height-n.depth),i=Z.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:r}]},e),a=Z.makeSpan(["root"],[i]),Z.makeSpan(["mord","sqrt"],[a,n],e)):Z.makeSpan(["mord","sqrt"],[n],e)},mathmlBuilder(t,e){var{body:t,index:r}=t;return r?new _.MathNode("mroot",[Sa(t,e),Sa(r,e)]):new _.MathNode("msqrt",[Sa(t,e)])}}),Us={display:Mn.DISPLAY,text:Mn.TEXT,script:Mn.SCRIPT,scriptscript:Mn.SCRIPTSCRIPT},o({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:t,funcName:r,parser:n}=t,t=n.parseExpression(!0,t),r=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:r,body:t}},htmlBuilder(t,e){var r=Us[t.style],r=e.havingStyle(r).withFont("");return gn(t.body,r,e)},mathmlBuilder(t,e){var r=Us[t.style],e=e.havingStyle(r),r=_a(t.body,e),e=new _.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return e.setAttribute("scriptlevel",r[0]),e.setAttribute("displaystyle",r[1]),e}}),js=Ae(function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===Mn.DISPLAY.size||r.alwaysHandleSupSub)?Ds:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(e.style.size===Mn.DISPLAY.size||r.limits)?Fs:null:"accent"===r.type?kn.isCharacterBox(r.base)?Oa:null:"horizBrace"===r.type&&!t.sub===r.isOver?Ls:null:null},"htmlBuilderDelegate"),Vr({type:"supsub",htmlBuilder(t,e){if(a=js(t,e))return a(t,e);var r,n,i,{base:a,sup:s,sub:o}=t,l=va(a,e),c=e.fontMetrics(),h=0,u=0,a=a&&kn.isCharacterBox(a),o=(s&&(i=e.havingStyle(e.style.sup()),r=va(s,i,e),a||(h=l.height-i.fontMetrics().supDrop*i.sizeMultiplier/e.sizeMultiplier)),o&&(s=e.havingStyle(e.style.sub()),n=va(o,s,e),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/e.sizeMultiplier)),i=e.style===Mn.DISPLAY?c.sup1:e.style.cramped?c.sup3:c.sup2,e.sizeMultiplier),a=K(.5/c.ptPerEm/o),s=null;if(n&&(o=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name),l instanceof pi||o)&&(s=K(-l.italic)),r&&n){h=Math.max(h,i,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),t=4*c.defaultRuleThickness,h-r.depth-(n.height-u){var t=new _.MathNode("mtd",[]);return t.setAttribute("width","50%"),t},"pad"),Vr({type:"tag",mathmlBuilder(t,e){return(t=new _.MathNode("mtable",[new _.MathNode("mtr",[Hs(),new _.MathNode("mtd",[Ea(t.body,e)]),Hs(),new _.MathNode("mtd",[Ea(t.tag,e)])])])).setAttribute("width","100%"),t}}),Vs={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Xs={"\\textbf":"textbf","\\textmd":"textmd"},Ks={"\\textit":"textit","\\textup":"textup"},Zs=Ae((t,e)=>(t=t.font)?Vs[t]?e.withTextFontFamily(Vs[t]):Xs[t]?e.withTextFontWeight(Xs[t]):"\\emph"===t?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(Ks[t]):e,"optionsWithFont"),o({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:t,funcName:r}=t,e=e[0];return{type:"text",mode:t.mode,body:sa(e),font:r}},htmlBuilder(t,e){return e=Zs(t,e),t=da(t.body,e,!0),Z.makeSpan(["mord","text"],t,e)},mathmlBuilder(t,e){return e=Zs(t,e),Ea(t.body,e)}}),o({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"underline",mode:(t=t.parser).mode,body:e[0]}},htmlBuilder(t,e){var t=va(t.body,e),r=Z.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return Z.makeSpan(["mord","underline"],[r],e)},mathmlBuilder(t,e){var r=new _.MathNode("mo",[new _.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new _.MathNode("munder",[Sa(t.body,e),r])).setAttribute("accentunder","true"),t}}),o({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){return{type:"vcenter",mode:(t=t.parser).mode,body:e[0]}},htmlBuilder(t,e){var t=va(t.body,e),r=e.fontMetrics().axisHeight,r=.5*(t.height-r-(t.depth+r));return Z.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(t,e){return new _.MathNode("mpadded",[Sa(t.body,e)],["vcenter"])}}),o({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new X("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=Qs(t),n=[],i=e.havingStyle(e.style.text()),a=0;at.body.replace(/ /g,t.star?"␣":" "),"makeVerb"),Js=ra,to=new RegExp("[̀-ͯ]+$"),eo=class{static{Ae(this,"Lexer")}constructor(t,e){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=e,this.tokenRegex=new RegExp("([ \r\n\t]+)|\\\\(\n|[ \r\t]+\n?)[ \r\t]*|([!-\\[\\]-‧‪-퟿豈-￿][̀-ͯ]*|[\ud800-\udbff][\udc00-\udfff][̀-ͯ]*|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5|(\\\\[a-zA-Z@]+)[ \r\n\t]*|\\\\[^\ud800-\udfff])","g"),this.catcodes={"%":14,"~":13}}setCatcode(t,e){this.catcodes[t]=e}lex(){var t=this.input,e=this.tokenRegex.lastIndex;if(e===t.length)return new mn("EOF",new fn(this,e,e));if(null===(n=this.tokenRegex.exec(t))||n.index!==e)throw new X("Unexpected character: '"+t[e]+"'",new mn(t[e],new fn(this,e,e+1)));var r,n=n[6]||n[3]||(n[2]?"\\ ":" ");return 14===this.catcodes[n]?(-1===(r=t.indexOf(` +`,this.tokenRegex.lastIndex))?(this.tokenRegex.lastIndex=t.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=r+1,this.lex()):new mn(n,new fn(this,e,this.tokenRegex.lastIndex))}},ro=class{static{Ae(this,"Namespace")}constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=t,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(0===this.undefStack.length)throw new X("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var t,e=this.undefStack.pop();for(t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0{var n=t.consumeArg().tokens;if(1!==n.length)throw new X("\\newcommand's first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!e)throw new X("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!a&&!r)throw new X("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");if(e=0,1===(n=t.consumeArg().tokens).length&&"["===n[0].text){for(var s="",o=t.expandNextToken();"]"!==o.text&&"EOF"!==o.text;)s+=o.text,o=t.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+s);e=parseInt(s),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:e}),""},"newcommand"),l("\\newcommand",t=>ao(t,!1,!0)),l("\\renewcommand",t=>ao(t,!0,!1)),l("\\providecommand",t=>ao(t,!0,!0)),l("\\message",t=>(t=t.consumeArgs(1)[0],console.log(t.reverse().map(t=>t.text).join("")),"")),l("\\errmessage",t=>(t=t.consumeArgs(1)[0],console.error(t.reverse().map(t=>t.text).join("")),"")),l("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Js[r],xi.math[r],xi.text[r]),""}),l("\\bgroup","{"),l("\\egroup","}"),l("~","\\nobreakspace"),l("\\lq","`"),l("\\rq","'"),l("\\aa","\\r a"),l("\\AA","\\r A"),l("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),l("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),l("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),l("ℬ","\\mathscr{B}"),l("ℰ","\\mathscr{E}"),l("ℱ","\\mathscr{F}"),l("ℋ","\\mathscr{H}"),l("ℐ","\\mathscr{I}"),l("ℒ","\\mathscr{L}"),l("ℳ","\\mathscr{M}"),l("ℛ","\\mathscr{R}"),l("ℭ","\\mathfrak{C}"),l("ℌ","\\mathfrak{H}"),l("ℨ","\\mathfrak{Z}"),l("\\Bbbk","\\Bbb{k}"),l("·","\\cdotp"),l("\\llap","\\mathllap{\\textrm{#1}}"),l("\\rlap","\\mathrlap{\\textrm{#1}}"),l("\\clap","\\mathclap{\\textrm{#1}}"),l("\\mathstrut","\\vphantom{(}"),l("\\underbar","\\underline{\\text{#1}}"),l("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),l("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),l("\\ne","\\neq"),l("≠","\\neq"),l("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),l("∉","\\notin"),l("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),l("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),l("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),l("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),l("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),l("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),l("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),l("⟂","\\perp"),l("‼","\\mathclose{!\\mkern-0.8mu!}"),l("∌","\\notni"),l("⌜","\\ulcorner"),l("⌝","\\urcorner"),l("⌞","\\llcorner"),l("⌟","\\lrcorner"),l("©","\\copyright"),l("®","\\textregistered"),l("️","\\textregistered"),l("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),l("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),l("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),l("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),l("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),l("⋮","\\vdots"),l("\\varGamma","\\mathit{\\Gamma}"),l("\\varDelta","\\mathit{\\Delta}"),l("\\varTheta","\\mathit{\\Theta}"),l("\\varLambda","\\mathit{\\Lambda}"),l("\\varXi","\\mathit{\\Xi}"),l("\\varPi","\\mathit{\\Pi}"),l("\\varSigma","\\mathit{\\Sigma}"),l("\\varUpsilon","\\mathit{\\Upsilon}"),l("\\varPhi","\\mathit{\\Phi}"),l("\\varPsi","\\mathit{\\Psi}"),l("\\varOmega","\\mathit{\\Omega}"),l("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),l("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),l("\\boxed","\\fbox{$\\displaystyle{#1}$}"),l("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),l("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),l("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),so={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"},l("\\dots",function(t){var e="\\dotso";return(t=t.expandAfterFuture().text)in so?e=so[t]:("\\not"===t.slice(0,4)||t in xi.math&&kn.contains(["bin","rel"],xi.math[t].group))&&(e="\\dotsb"),e}),oo={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0},l("\\dotso",function(t){return t.future().text in oo?"\\ldots\\,":"\\ldots"}),l("\\dotsc",function(t){return(t=t.future().text)in oo&&","!==t?"\\ldots\\,":"\\ldots"}),l("\\cdots",function(t){return t.future().text in oo?"\\@cdots\\,":"\\@cdots"}),l("\\dotsb","\\cdots"),l("\\dotsm","\\cdots"),l("\\dotsi","\\!\\cdots"),l("\\dotsx","\\ldots\\,"),l("\\DOTSI","\\relax"),l("\\DOTSB","\\relax"),l("\\DOTSX","\\relax"),l("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),l("\\,","\\tmspace+{3mu}{.1667em}"),l("\\thinspace","\\,"),l("\\>","\\mskip{4mu}"),l("\\:","\\tmspace+{4mu}{.2222em}"),l("\\medspace","\\:"),l("\\;","\\tmspace+{5mu}{.2777em}"),l("\\thickspace","\\;"),l("\\!","\\tmspace-{3mu}{.1667em}"),l("\\negthinspace","\\!"),l("\\negmedspace","\\tmspace-{4mu}{.2222em}"),l("\\negthickspace","\\tmspace-{5mu}{.277em}"),l("\\enspace","\\kern.5em "),l("\\enskip","\\hskip.5em\\relax"),l("\\quad","\\hskip1em\\relax"),l("\\qquad","\\hskip2em\\relax"),l("\\tag","\\@ifstar\\tag@literal\\tag@paren"),l("\\tag@paren","\\tag@literal{({#1})}"),l("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new X("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),l("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),l("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),l("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),l("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),l("\\newline","\\\\\\relax"),l("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),l("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(lo=K(Hn["Main-Regular"][84][1]-.7*Hn["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),l("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+lo+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),l("\\hspace","\\@ifstar\\@hspacer\\@hspace"),l("\\@hspace","\\hskip #1\\relax"),l("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),l("\\ordinarycolon",":"),l("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),l("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),l("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),l("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),l("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),l("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),l("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),l("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),l("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),l("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),l("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),l("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),l("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),l("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),l("∷","\\dblcolon"),l("∹","\\eqcolon"),l("≔","\\coloneqq"),l("≕","\\eqqcolon"),l("⩴","\\Coloneqq"),l("\\ratio","\\vcentcolon"),l("\\coloncolon","\\dblcolon"),l("\\colonequals","\\coloneqq"),l("\\coloncolonequals","\\Coloneqq"),l("\\equalscolon","\\eqqcolon"),l("\\equalscoloncolon","\\Eqqcolon"),l("\\colonminus","\\coloneq"),l("\\coloncolonminus","\\Coloneq"),l("\\minuscolon","\\eqcolon"),l("\\minuscoloncolon","\\Eqcolon"),l("\\coloncolonapprox","\\Colonapprox"),l("\\coloncolonsim","\\Colonsim"),l("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),l("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),l("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),l("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),l("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),l("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),l("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),l("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),l("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),l("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),l("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),l("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),l("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),l("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),l("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),l("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),l("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),l("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),l("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),l("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),l("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),l("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),l("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),l("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),l("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),l("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),l("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),l("\\imath","\\html@mathml{\\@imath}{ı}"),l("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),l("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),l("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),l("⟦","\\llbracket"),l("⟧","\\rrbracket"),l("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),l("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),l("⦃","\\lBrace"),l("⦄","\\rBrace"),l("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),l("⦵","\\minuso"),l("\\darr","\\downarrow"),l("\\dArr","\\Downarrow"),l("\\Darr","\\Downarrow"),l("\\lang","\\langle"),l("\\rang","\\rangle"),l("\\uarr","\\uparrow"),l("\\uArr","\\Uparrow"),l("\\Uarr","\\Uparrow"),l("\\N","\\mathbb{N}"),l("\\R","\\mathbb{R}"),l("\\Z","\\mathbb{Z}"),l("\\alef","\\aleph"),l("\\alefsym","\\aleph"),l("\\Alpha","\\mathrm{A}"),l("\\Beta","\\mathrm{B}"),l("\\bull","\\bullet"),l("\\Chi","\\mathrm{X}"),l("\\clubs","\\clubsuit"),l("\\cnums","\\mathbb{C}"),l("\\Complex","\\mathbb{C}"),l("\\Dagger","\\ddagger"),l("\\diamonds","\\diamondsuit"),l("\\empty","\\emptyset"),l("\\Epsilon","\\mathrm{E}"),l("\\Eta","\\mathrm{H}"),l("\\exist","\\exists"),l("\\harr","\\leftrightarrow"),l("\\hArr","\\Leftrightarrow"),l("\\Harr","\\Leftrightarrow"),l("\\hearts","\\heartsuit"),l("\\image","\\Im"),l("\\infin","\\infty"),l("\\Iota","\\mathrm{I}"),l("\\isin","\\in"),l("\\Kappa","\\mathrm{K}"),l("\\larr","\\leftarrow"),l("\\lArr","\\Leftarrow"),l("\\Larr","\\Leftarrow"),l("\\lrarr","\\leftrightarrow"),l("\\lrArr","\\Leftrightarrow"),l("\\Lrarr","\\Leftrightarrow"),l("\\Mu","\\mathrm{M}"),l("\\natnums","\\mathbb{N}"),l("\\Nu","\\mathrm{N}"),l("\\Omicron","\\mathrm{O}"),l("\\plusmn","\\pm"),l("\\rarr","\\rightarrow"),l("\\rArr","\\Rightarrow"),l("\\Rarr","\\Rightarrow"),l("\\real","\\Re"),l("\\reals","\\mathbb{R}"),l("\\Reals","\\mathbb{R}"),l("\\Rho","\\mathrm{P}"),l("\\sdot","\\cdot"),l("\\sect","\\S"),l("\\spades","\\spadesuit"),l("\\sub","\\subset"),l("\\sube","\\subseteq"),l("\\supe","\\supseteq"),l("\\Tau","\\mathrm{T}"),l("\\thetasym","\\vartheta"),l("\\weierp","\\wp"),l("\\Zeta","\\mathrm{Z}"),l("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),l("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),l("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),l("\\bra","\\mathinner{\\langle{#1}|}"),l("\\ket","\\mathinner{|{#1}\\rangle}"),l("\\braket","\\mathinner{\\langle{#1}\\rangle}"),l("\\Bra","\\left\\langle#1\\right|"),l("\\Ket","\\left|#1\\right\\rangle"),l("\\bra@ket",(co=Ae(l=>t=>{var e=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.macros.get("|"),s=t.macros.get("\\|"),o=(t.macros.beginGroup(),Ae(r=>t=>{l&&(t.macros.set("|",a),i.length)&&t.macros.set("\\|",s);var e=r;return!r&&i.length&&"|"===t.future().text&&(t.popToken(),e=!0),{tokens:e?i:n,numArgs:0}},"midMacro")),o=(t.macros.set("|",o(!1)),i.length&&t.macros.set("\\|",o(!0)),t.consumeArg().tokens),r=t.expandTokens([...r,...o,...e]);return t.macros.endGroup(),{tokens:r.reverse(),numArgs:0}},"braketHelper"))(!1)),l("\\bra@set",co(!0)),l("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),l("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),l("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),l("\\angln","{\\angl n}"),l("\\blue","\\textcolor{##6495ed}{#1}"),l("\\orange","\\textcolor{##ffa500}{#1}"),l("\\pink","\\textcolor{##ff00af}{#1}"),l("\\red","\\textcolor{##df0030}{#1}"),l("\\green","\\textcolor{##28ae7b}{#1}"),l("\\gray","\\textcolor{gray}{#1}"),l("\\purple","\\textcolor{##9d38bd}{#1}"),l("\\blueA","\\textcolor{##ccfaff}{#1}"),l("\\blueB","\\textcolor{##80f6ff}{#1}"),l("\\blueC","\\textcolor{##63d9ea}{#1}"),l("\\blueD","\\textcolor{##11accd}{#1}"),l("\\blueE","\\textcolor{##0c7f99}{#1}"),l("\\tealA","\\textcolor{##94fff5}{#1}"),l("\\tealB","\\textcolor{##26edd5}{#1}"),l("\\tealC","\\textcolor{##01d1c1}{#1}"),l("\\tealD","\\textcolor{##01a995}{#1}"),l("\\tealE","\\textcolor{##208170}{#1}"),l("\\greenA","\\textcolor{##b6ffb0}{#1}"),l("\\greenB","\\textcolor{##8af281}{#1}"),l("\\greenC","\\textcolor{##74cf70}{#1}"),l("\\greenD","\\textcolor{##1fab54}{#1}"),l("\\greenE","\\textcolor{##0d923f}{#1}"),l("\\goldA","\\textcolor{##ffd0a9}{#1}"),l("\\goldB","\\textcolor{##ffbb71}{#1}"),l("\\goldC","\\textcolor{##ff9c39}{#1}"),l("\\goldD","\\textcolor{##e07d10}{#1}"),l("\\goldE","\\textcolor{##a75a05}{#1}"),l("\\redA","\\textcolor{##fca9a9}{#1}"),l("\\redB","\\textcolor{##ff8482}{#1}"),l("\\redC","\\textcolor{##f9685d}{#1}"),l("\\redD","\\textcolor{##e84d39}{#1}"),l("\\redE","\\textcolor{##bc2612}{#1}"),l("\\maroonA","\\textcolor{##ffbde0}{#1}"),l("\\maroonB","\\textcolor{##ff92c6}{#1}"),l("\\maroonC","\\textcolor{##ed5fa6}{#1}"),l("\\maroonD","\\textcolor{##ca337c}{#1}"),l("\\maroonE","\\textcolor{##9e034e}{#1}"),l("\\purpleA","\\textcolor{##ddd7ff}{#1}"),l("\\purpleB","\\textcolor{##c6b9fc}{#1}"),l("\\purpleC","\\textcolor{##aa87ff}{#1}"),l("\\purpleD","\\textcolor{##7854ab}{#1}"),l("\\purpleE","\\textcolor{##543b78}{#1}"),l("\\mintA","\\textcolor{##f5f9e8}{#1}"),l("\\mintB","\\textcolor{##edf2df}{#1}"),l("\\mintC","\\textcolor{##e0e5cc}{#1}"),l("\\grayA","\\textcolor{##f6f7f7}{#1}"),l("\\grayB","\\textcolor{##f0f1f2}{#1}"),l("\\grayC","\\textcolor{##e3e5e6}{#1}"),l("\\grayD","\\textcolor{##d6d8da}{#1}"),l("\\grayE","\\textcolor{##babec2}{#1}"),l("\\grayF","\\textcolor{##888d93}{#1}"),l("\\grayG","\\textcolor{##626569}{#1}"),l("\\grayH","\\textcolor{##3b3e40}{#1}"),l("\\grayI","\\textcolor{##21242c}{#1}"),l("\\kaBlue","\\textcolor{##314453}{#1}"),l("\\kaGreen","\\textcolor{##71B307}{#1}"),ho={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},uo=class{static{Ae(this,"MacroExpander")}constructor(t,e,r){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=e,this.expansionCount=0,this.feed(t),this.macros=new ro(no,e.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new eo(t,this.settings)}switchMode(t){this.mode=t}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return 0===this.stack.length&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var e,r,n;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:e,end:r}=this.consumeArg());return this.pushToken(new mn("EOF",r.loc)),this.pushTokens(n),e.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(t){var e,r=[],n=t&&0this.settings.maxExpand)throw new X("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var e=this.popToken(),r=e.text,n=e.noexpand?null:this._getExpansion(r);if(null==n||t&&n.unexpandable){if(t&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new X("Undefined control sequence: "+r);return this.pushToken(e),!1}this.countExpansion(1);var i=n.tokens,a=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(i=i.slice()).length-1;0<=s;--s){var o=i[s];if("#"===o.text){if(0===s)throw new X("Incomplete placeholder at end of macro body",o);if("#"===(o=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new X("Not a valid argument number",o);i.splice(s,2,...a[+o.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var t;if(!1===this.expandOnce())return(t=this.stack.pop()).treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new mn(t)]):void 0}expandTokens(t){var e,r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)!1===this.expandOnce(!0)&&((e=this.stack.pop()).treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),r.push(e));return this.countExpansion(r.length),r}expandMacroAsText(t){return(t=this.expandMacro(t))&&t.map(t=>t.text).join("")}_getExpansion(t){var e=this.macros.get(t);if(null==e)return e;if(1!==t.length||null==(t=this.lexer.catcodes[t])||13===t){if("string"!=typeof(t="function"==typeof e?e(this):e))return t;var r=0;if(-1!==t.indexOf("#"))for(var n=t.replace(/##/g,"");-1!==n.indexOf("#"+(r+1));)++r;for(var i=new eo(t,this.settings),a=[],s=i.lex();"EOF"!==s.text;)a.push(s),s=i.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(t){return this.macros.has(t)||Js.hasOwnProperty(t)||xi.math.hasOwnProperty(t)||xi.text.hasOwnProperty(t)||ho.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:Js.hasOwnProperty(t)&&!Js[t].primitive}},po=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,go=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4","⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g","ʰ":"h","ⁱ":"i","ʲ":"j","ᵏ":"k","ˡ":"l","ᵐ":"m","ⁿ":"n","ᵒ":"o","ᵖ":"p","ʳ":"r","ˢ":"s","ᵗ":"t","ᵘ":"u","ᵛ":"v","ʷ":"w","ˣ":"x","ʸ":"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),fo={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},mo={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(yo=class a{static{Ae(this,"Parser")}constructor(t,e){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new uo(t,e,this.mode),this.settings=e,this.leftrightDepth=0}expect(t,e){if(void 0===e&&(e=!0),this.fetch().text!==t)throw new X("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var e=this.nextToken,t=(this.consume(),this.gullet.pushToken(new mn("}")),this.gullet.pushTokens(t),this.parseExpression(!1));return this.expect("}"),this.nextToken=e,t}parseExpression(t,e){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==a.endOfExpression.indexOf(n.text)||e&&n.text===e||t&&Js[n.text]&&Js[n.text].infix)break;if(!(n=this.parseAtom(e)))break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var e,r,n,i=-1,a=0;a{"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),So.default.addHook("afterSanitizeAttributes",t=>{"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),"_blank"===t.getAttribute("target"))&&t.setAttribute("rel","noopener")})}var So,Co,Ao,Lo,No,Io,Mo,Ro,Do,Oo,Po,Bo,Fo,$o,zo,qo,Uo,jo,Go,Wo,Yo,Ho,Vo,Xo,Ko,L,Zo,Qo,Jo,tl,el,rl,nl,il,al=i(()=>{So=M(Br(),1),Co=//gi,Ao=Ae(t=>t?Bo(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Lo=(()=>{let t=!1;return()=>{t||(Eo(),t=!0)}})(),Ae(Eo,"setupDompurifyHooks"),No=Ae(t=>(Lo(),So.default.sanitize(t)),"removeScript"),Io=Ae((t,e)=>(!1!==e.flowchart?.htmlLabels&&("antiscript"===(e=e.securityLevel)||"strict"===e?t=No(t):"loose"!==e&&(t=(t=(t=Bo(t)).replace(//g,">")).replace(/=/g,"="),t=Po(t))),t),"sanitizeMore"),Mo=Ae((t,e)=>t&&(e.dompurifyConfig?So.default.sanitize(Io(t,e),e.dompurifyConfig):So.default.sanitize(Io(t,e),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Ro=Ae((t,e)=>"string"==typeof t?Mo(t,e):t.flat().map(t=>Mo(t,e)),"sanitizeTextOrArray"),Do=Ae(t=>Co.test(t),"hasBreaks"),Oo=Ae(t=>t.split(Co),"splitBreaks"),Po=Ae(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),Bo=Ae(t=>t.replace(Co,"#br#"),"breakToPlaceholder"),Fo=Ae(t=>{let e="";return e=t?(e=(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replaceAll(/\(/g,"\\(")).replaceAll(/\)/g,"\\)"):e},"getUrl"),$o=Ae(t=>!(!1===t||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),zo=Ae(function(...t){return t=t.filter(t=>!isNaN(t)),Math.max(...t)},"getMax"),qo=Ae(function(...t){return t=t.filter(t=>!isNaN(t)),Math.min(...t)},"getMin"),Uo=Ae(function(t){var r,n,i=t.split(/(,)/),a=[];for(let e=0;eMath.max(0,t.split(e).length-1),"countOccurrence"),Go=Ae((t,e)=>(t=jo(t,"~"),e=jo(e,"~"),1===t&&1===e),"shouldCombineSets"),Wo=Ae(t=>{let e=jo(t,"~"),r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let n=[...t],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),Yo=Ae(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Ho=/\$\$(.*)\$\$/g,Vo=Ae(t=>0<(t.match(Ho)?.length??0),"hasKatex"),Xo=Ae(async(t,e)=>(t=await Ko(t,e),(e=document.createElement("div")).innerHTML=t,e.id="katex-temp",e.style.visibility="hidden",e.style.position="absolute",e.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",e),t={width:e.clientWidth,height:e.clientHeight},e.remove(),t),"calculateMathMLDimensions"),Ko=Ae(async(t,e)=>{if(!Vo(t))return t;if(!(Yo()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Ho,"MathML is unsupported in this environment.");let r=(await Promise.resolve().then(()=>(_o(),Fr))).default,n=e.forceLegacyMathML||!Yo()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Co).map(t=>Vo(t)?`
${t}
`:`
${t}
`).join("").replace(Ho,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))},"renderKatex"),L={getRows:Ao,sanitizeText:Mo,sanitizeTextOrArray:Ro,hasBreaks:Do,splitBreaks:Oo,lineBreakRegex:Co,removeScript:No,getUrl:Fo,evaluate:$o,getMax:zo,getMin:qo}}),sl=i(()=>{t(),Zo=Ae(function(t,e){for(var r of e)t.attr(r[0],r[1])},"d3Attrs"),Qo=Ae(function(t,e,r){var n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),Jo=Ae(function(t,e,r,n){e=Qo(e,r,n),Zo(t,e)},"configureSvgSize"),tl=Ae(function(t,e,r,n){var i=e.node().getBBox(),a=i.width,s=i.height,s=(R.info(`SVG bounds: ${a}x`+s,i),R.info("Graph bounds: 0x0",t),R.info(`Calculated bounds: ${t=a+2*r}x`+(a=s+2*r)),Jo(e,a,t,n),`${i.x-r} ${i.y-r} ${i.width+2*r} `+(i.height+2*r));e.attr("viewBox",s)},"setupGraphViewbox")}),ol=i(()=>{t(),el={},rl=Ae((t,e,r)=>{let n="";return t in el&&el[t]?n=el[t](r):R.warn("No theme found for "+t),` & { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + fill: ${r.textColor} + } + + /* Classes common for multiple diagrams */ + + & .error-icon { + fill: ${r.errorBkgColor}; + } + & .error-text { + fill: ${r.errorTextColor}; + stroke: ${r.errorTextColor}; + } + + & .edge-thickness-normal { + stroke-width: 1px; + } + & .edge-thickness-thick { + stroke-width: 3.5px + } + & .edge-pattern-solid { + stroke-dasharray: 0; + } + & .edge-thickness-invisible { + stroke-width: 0; + fill: none; + } + & .edge-pattern-dashed{ + stroke-dasharray: 3; + } + .edge-pattern-dotted { + stroke-dasharray: 2; + } + + & .marker { + fill: ${r.lineColor}; + stroke: ${r.lineColor}; + } + & .marker.cross { + stroke: ${r.lineColor}; + } + + & svg { + font-family: ${r.fontFamily}; + font-size: ${r.fontSize}; + } + & p { + margin: 0 + } + + ${n} + + ${e} +`},"getStyles"),nl=Ae((t,e)=>{void 0!==e&&(el[t]=e)},"addStylesForDiagram"),il=rl}),ll={};A(ll,{clear:()=>pl,getAccDescription:()=>yl,getAccTitle:()=>fl,getDiagramTitle:()=>xl,setAccDescription:()=>ml,setAccTitle:()=>gl,setDiagramTitle:()=>vl});var cl,hl,ul,dl,pl,gl,fl,ml,yl,vl,xl,bl,wl,D,kl,Tl,_l,El,Sl,Cl,Al,Ll,Nl,Il,Ml,Rl,Dl,Ol,Pl,Bl,Fl,$l,zl,ql,Ul,jl,Gl,Wl,Yl,Hl,Vl,Xl,Kl,Zl,Ql,Jl,tc,ec,rc,nc,ic,ac,sc,oc,lc,cc,hc,uc,dc,pc,gc,fc,mc,yc,vc,xc,bc=i(()=>{al(),Pr(),ul=hl=cl="",dl=Ae(t=>Mo(t,Be()),"sanitizeText"),pl=Ae(()=>{hl=ul=cl=""},"clear"),gl=Ae(t=>{cl=dl(t).replace(/^\s+/g,"")},"setAccTitle"),fl=Ae(()=>cl,"getAccTitle"),ml=Ae(t=>{ul=dl(t).replace(/\n\s+/g,` +`)},"setAccDescription"),yl=Ae(()=>ul,"getAccDescription"),vl=Ae(t=>{hl=dl(t)},"setDiagramTitle"),xl=Ae(()=>hl,"getDiagramTitle")}),wc=i(()=>{Xe(),t(),Pr(),al(),sl(),ol(),bc(),bl=R,wl=q,D=Be,kl=Pe,Tl=Ee,_l=Ae(t=>Mo(t,D()),"sanitizeText"),El=tl,Sl=Ae(()=>ll,"getCommonDb"),Cl={},Al=Ae((t,e,r)=>{Cl[t]&&bl.warn(`Diagram with id ${t} already registered. Overwriting.`),Cl[t]=e,r&&nt(t,r),nl(t,e.styles),e.injectUtils?.(bl,wl,D,_l,El,Sl(),()=>{})},"registerDiagram"),Ll=Ae(t=>{if(t in Cl)return Cl[t];throw new Nl(t)},"getDiagram"),Nl=class extends Error{static{Ae(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}}),kc=i(()=>{wc(),al(),bc(),Il=[],Ml=[""],Ol=[{alias:Rl="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Dl=""}],Bl="",Fl=!(Pl=[]),$l=4,zl=2,Ul=Ae(function(){return ql},"getC4Type"),jl=Ae(function(t){ql=Mo(t,D())},"setC4Type"),Gl=Ae(function(r,n,i,a,s,o,l,c,h){if(null!=r&&null!=n&&null!=i&&null!=a){let t={},e=Pl.find(t=>t.from===n&&t.to===i);e?t=e:Pl.push(t),t.type=r,t.from=n,t.to=i,t.label={text:a},null==s?t.techn={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],t[r]={text:a}):t.techn={text:s},null==o?t.descr={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],t[r]={text:a}):t.descr={text:o},"object"==typeof l?([s,r]=Object.entries(l)[0],t[s]=r):t.sprite=l,"object"==typeof c?([a,o]=Object.entries(c)[0],t[a]=o):t.tags=c,"object"==typeof h?([s,r]=Object.entries(h)[0],t[s]=r):t.link=h,t.wrap=pc()}},"addRel"),Wl=Ae(function(r,n,i,a,s,o,l){if(null!==n&&null!==i){let t={},e=Il.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,Il.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.descr={text:""}:"object"==typeof a?([i,c]=Object.entries(a)[0],t[i]={text:c}):t.descr={text:a},"object"==typeof s?([i,c]=Object.entries(s)[0],t[i]=c):t.sprite=s,"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.typeC4Shape={text:r},t.parentBoundary=Rl,t.wrap=pc()}},"addPersonOrSystem"),Yl=Ae(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let t={},e=Il.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,Il.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],t[i]={text:h}):t.techn={text:a},null==s?t.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],t[i]={text:h}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=pc(),t.typeC4Shape={text:r},t.parentBoundary=Rl}},"addContainer"),Hl=Ae(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let t={},e=Il.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,Il.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],t[i]={text:h}):t.techn={text:a},null==s?t.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],t[i]={text:h}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=pc(),t.typeC4Shape={text:r},t.parentBoundary=Rl}},"addComponent"),Vl=Ae(function(r,n,i,a,s){if(null!==r&&null!==n){let t={},e=Ol.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Ol.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"system"}:"object"==typeof i?([n,o]=Object.entries(i)[0],t[n]={text:o}):t.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],t[n]=o):t.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],t[i]=n):t.link=s,t.parentBoundary=Rl,t.wrap=pc(),Dl=Rl,Rl=r,Ml.push(Dl)}},"addPersonOrSystemBoundary"),Xl=Ae(function(r,n,i,a,s){if(null!==r&&null!==n){let t={},e=Ol.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Ol.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"container"}:"object"==typeof i?([n,o]=Object.entries(i)[0],t[n]={text:o}):t.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],t[n]=o):t.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],t[i]=n):t.link=s,t.parentBoundary=Rl,t.wrap=pc(),Dl=Rl,Rl=r,Ml.push(Dl)}},"addContainerBoundary"),Kl=Ae(function(r,n,i,a,s,t,o,l){if(null!==n&&null!==i){let t={},e=Ol.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,Ol.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.type={text:"node"}:"object"==typeof a?([i,c]=Object.entries(a)[0],t[i]={text:c}):t.type={text:a},null==s?t.descr={text:""}:"object"==typeof s?([i,c]=Object.entries(s)[0],t[i]={text:c}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.nodeType=r,t.parentBoundary=Rl,t.wrap=pc(),Dl=Rl,Rl=n,Ml.push(Dl)}},"addDeploymentNode"),Zl=Ae(function(){Rl=Dl,Ml.pop(),Dl=Ml.pop(),Ml.push(Dl)},"popBoundaryParseStack"),Ql=Ae(function(t,e,r,n,i,a,s,o,l,c,h){let u=Il.find(t=>t.alias===e);var d,p;void 0===u&&void 0===(u=Ol.find(t=>t.alias===e))||(null!=r&&("object"==typeof r?([p,d]=Object.entries(r)[0],u[p]=d):u.bgColor=r),null!=n&&("object"==typeof n?([p,d]=Object.entries(n)[0],u[p]=d):u.fontColor=n),null!=i&&("object"==typeof i?([r,p]=Object.entries(i)[0],u[r]=p):u.borderColor=i),null!=a&&("object"==typeof a?([d,n]=Object.entries(a)[0],u[d]=n):u.shadowing=a),null!=s&&("object"==typeof s?([r,p]=Object.entries(s)[0],u[r]=p):u.shape=s),null!=o&&("object"==typeof o?([i,d]=Object.entries(o)[0],u[i]=d):u.sprite=o),null!=l&&("object"==typeof l?([n,a]=Object.entries(l)[0],u[n]=a):u.techn=l),null!=c&&("object"==typeof c?([r,p]=Object.entries(c)[0],u[r]=p):u.legendText=c),null!=h&&("object"==typeof h?([s,i]=Object.entries(h)[0],u[s]=i):u.legendSprite=h))},"updateElStyle"),Jl=Ae(function(t,e,r,n,i,a,s){var o,l,c=Pl.find(t=>t.from===e&&t.to===r);void 0!==c&&(null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.textColor=n),null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.lineColor=i),null!=a&&("object"==typeof a?([n,o]=Object.entries(a)[0],c[n]=parseInt(o)):c.offsetX=parseInt(a)),null!=s)&&("object"==typeof s?([l,i]=Object.entries(s)[0],c[l]=parseInt(i)):c.offsetY=parseInt(s))},"updateRelStyle"),tc=Ae(function(t,e,r){var e="object"==typeof e?(n=Object.values(e)[0],parseInt(n)):parseInt(e),n="object"==typeof r?(n=Object.values(r)[0],parseInt(n)):parseInt(r);1<=e&&($l=e),1<=n&&(zl=n)},"updateLayoutConfig"),ec=Ae(function(){return $l},"getC4ShapeInRow"),rc=Ae(function(){return zl},"getC4BoundaryInRow"),nc=Ae(function(){return Rl},"getCurrentBoundaryParse"),ic=Ae(function(){return Dl},"getParentBoundaryParse"),ac=Ae(function(e){return null==e?Il:Il.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),sc=Ae(function(e){return Il.find(t=>t.alias===e)},"getC4Shape"),oc=Ae(function(t){return Object.keys(ac(t))},"getC4ShapeKeys"),lc=Ae(function(e){return null==e?Ol:Ol.filter(t=>t.parentBoundary===e)},"getBoundaries"),cc=lc,hc=Ae(function(){return Pl},"getRels"),uc=Ae(function(){return Bl},"getTitle"),dc=Ae(function(t){Fl=t},"setWrap"),pc=Ae(function(){return Fl},"autoWrap"),gc=Ae(function(){Il=[],Ol=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Rl="global",Ml=[Dl=""],Ml=[Bl=""],Fl=!(Pl=[]),$l=4,zl=2},"clear"),fc={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},mc={FILLED:0,OPEN:1},yc={LEFTOF:0,RIGHTOF:1,OVER:2},vc=Ae(function(t){Bl=Mo(t,D())},"setTitle"),xc={addPersonOrSystem:Wl,addPersonOrSystemBoundary:Vl,addContainer:Yl,addContainerBoundary:Xl,addComponent:Hl,addDeploymentNode:Kl,popBoundaryParseStack:Zl,addRel:Gl,updateElStyle:Ql,updateRelStyle:Jl,updateLayoutConfig:tc,autoWrap:pc,setWrap:dc,getC4ShapeArray:ac,getC4Shape:sc,getC4ShapeKeys:oc,getBoundaries:lc,getBoundarys:cc,getCurrentBoundaryParse:nc,getParentBoundaryParse:ic,getRels:hc,getTitle:uc,getC4Type:Ul,getC4ShapeInRow:ec,getC4BoundaryInRow:rc,setAccTitle:gl,getAccTitle:fl,getAccDescription:yl,setAccDescription:ml,getConfig:Ae(()=>D().c4,"getConfig"),clear:gc,LINETYPE:fc,ARROWTYPE:mc,PLACEMENT:yc,setTitle:vc,setC4Type:jl}});function Tc(t,e){return null==t||null==e?NaN:t{Ae(Tc,"ascending")});function Ec(t,e){return null==t||null==e?NaN:e{Ae(Ec,"descending")});function Cc(r){let a,s,i;function o(t,e,r=0,n=t.length){if(r>>1}while(s(t[i],e)<0?r=1+i:n=i,r>>1}while(s(t[i],e)<=0?r=1+i:n=i,r-i(t[n],e)?n-1:n}return i=2!==r.length?(a=Tc,s=Ae((t,e)=>Tc(r(t),e),"compare2"),Ae((t,e)=>r(t)-e,"delta")):(a=r===Tc||r===Ec?r:Ac,s=r),Ae(o,"left"),Ae(t,"right"),Ae(e,"center"),{left:o,center:e,right:t}}function Ac(){return 0}var Lc=i(()=>{_c(),Sc(),Ae(Cc,"bisector"),Ae(Ac,"zero")});function Nc(t){return null===t?NaN:+t}var Ic,Mc,Rc,Dc=i(()=>{Ae(Nc,"number")}),Oc=i(()=>{_c(),Lc(),Dc(),Ic=Cc(Tc),Mc=Ic.right,Ic.left,Cc(Nc).center,Rc=Mc});function Pc({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):r}function Bc({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):(t.set(e,r),r)}function Fc({_intern:t,_key:e},r){return e=e(r),t.has(e)&&(r=t.get(e),t.delete(e)),r}function $c(t){return null!==t&&"object"==typeof t?t.valueOf():t}var zc,qc=i(()=>{zc=class extends Map{static{Ae(this,"InternMap")}constructor(t,e=$c){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(var[r,n]of t)this.set(r,n)}get(t){return super.get(Pc(this,t))}has(t){return super.has(Pc(this,t))}set(t,e){return super.set(Bc(this,t),e)}delete(t){return super.delete(Fc(this,t))}},Ae(Pc,"intern_get"),Ae(Bc,"intern_set"),Ae(Fc,"intern_delete"),Ae($c,"keyof")});function Uc(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=Yc<=a?10:Hc<=a?5:Vc<=a?2:1,o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(t*c),l=Math.round(e*c),o/ce&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(t/c),l=Math.round(e/c),o*ce&&--l),l{Yc=Math.sqrt(50),Hc=Math.sqrt(10),Vc=Math.sqrt(2),Ae(Uc,"tickSpec"),Ae(jc,"ticks"),Ae(Gc,"tickIncrement"),Ae(Wc,"tickStep")});function Kc(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n{Ae(Kc,"max")});function Qc(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n>t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var Jc=i(()=>{Ae(Qc,"min")});function th(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n{Ae(th,"range")}),rh=i(()=>{Oc(),Lc(),Zc(),Jc(),eh(),Xc(),qc()});function nh(t){return t}var ih=i(()=>{Ae(nh,"default")});function ah(t){return"translate("+t+",0)"}function sh(t){return"translate(0,"+t+")"}function oh(e){return t=>+e(t)}function lh(e,r){return r=Math.max(0,e.bandwidth()-2*r)/2,e.round()&&(r=Math.round(r)),t=>+e(t)+r}function ch(){return!this.__axis}function hh(p,g){var f=[],m=null,y=null,v=6,x=6,b=3,w=typeof window<"u"&&1{ih(),ph=1,gh=3,Ae(ah,"translateX"),Ae(sh,"translateY"),Ae(oh,"number"),Ae(lh,"center"),Ae(ch,"entering"),Ae(hh,"axis"),Ae(uh,"axisTop"),Ae(dh,"axisBottom")}),mh=i(()=>{fh()});function yh(){for(var t,e=0,r=arguments.length,n={};e{kh={value:Ae(()=>{},"value")},Ae(yh,"dispatch"),Ae(vh,"Dispatch"),Ae(xh,"parseTypenames"),vh.prototype=yh.prototype={constructor:vh,on:Ae(function(t,e){var r,n=this._,i=xh(t+"",n),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a{Sh()}),Ah=i(()=>{Eh={svg:"http://www.w3.org/2000/svg",xhtml:_h="http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Lh(t){var e=t+="",r=e.indexOf(":");return 0<=r&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),Eh.hasOwnProperty(e)?{space:Eh[e],local:t}:t}var Nh=i(()=>{Ah(),Ae(Lh,"default")});function Ih(r){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===_h&&t.documentElement.namespaceURI===_h?t.createElement(r):t.createElementNS(e,r)}}function Mh(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Rh(t){return((t=Lh(t)).local?Mh:Ih)(t)}var Dh=i(()=>{Nh(),Ah(),Ae(Ih,"creatorInherit"),Ae(Mh,"creatorFixed"),Ae(Rh,"default")});function Oh(){}function Ph(t){return null==t?Oh:function(){return this.querySelector(t)}}var Bh=i(()=>{Ae(Oh,"none"),Ae(Ph,"default")});function Fh(t){"function"!=typeof t&&(t=Ph(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{m0(),Bh(),Ae(Fh,"default")});function zh(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}var qh=i(()=>{Ae(zh,"array")});function Uh(){return[]}function jh(t){return null==t?Uh:function(){return this.querySelectorAll(t)}}var Gh=i(()=>{Ae(Uh,"empty"),Ae(jh,"default")});function Wh(t){return function(){return zh(t.apply(this,arguments))}}function Yh(t){t=("function"==typeof t?Wh:jh)(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a{m0(),qh(),Gh(),Ae(Wh,"arrayAll"),Ae(Yh,"default")});function Vh(t){return function(){return this.matches(t)}}function Xh(e){return function(t){return t.matches(e)}}var Kh=i(()=>{Ae(Vh,"default"),Ae(Xh,"childMatcher")});function Zh(t){return function(){return tu.call(this.children,t)}}function Qh(){return this.firstElementChild}function Jh(t){return this.select(null==t?Qh:Zh("function"==typeof t?t:Xh(t)))}var tu,eu=i(()=>{Kh(),tu=Array.prototype.find,Ae(Zh,"childFind"),Ae(Qh,"childFirst"),Ae(Jh,"default")});function ru(){return Array.from(this.children)}function nu(t){return function(){return au.call(this.children,t)}}function iu(t){return this.selectAll(null==t?ru:nu("function"==typeof t?t:Xh(t)))}var au,su=i(()=>{Kh(),au=Array.prototype.filter,Ae(ru,"children"),Ae(nu,"childrenFilter"),Ae(iu,"default")});function ou(t){"function"!=typeof t&&(t=Vh(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{m0(),Kh(),Ae(ou,"default")});function cu(t){return new Array(t.length)}var hu=i(()=>{Ae(cu,"default")});function uu(){return new u0(this._enter||this._groups.map(cu),this._parents)}function du(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var pu=i(()=>{hu(),m0(),Ae(uu,"default"),Ae(du,"EnterNode"),du.prototype={constructor:du,appendChild:Ae(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:Ae(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:Ae(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:Ae(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")}});function gu(t){return function(){return t}}var fu=i(()=>{Ae(gu,"default")});function mu(t,e,r,n,i,a){for(var s,o=0,l=e.length,c=a.length;o{m0(),pu(),fu(),Ae(mu,"bindIndex"),Ae(yu,"bindKey"),Ae(vu,"datum"),Ae(xu,"default"),Ae(bu,"arraylike")});function ku(){return new u0(this._exit||this._groups.map(cu),this._parents)}var Tu=i(()=>{hu(),m0(),Ae(ku,"default")});function _u(t,e,r){var n=this.enter(),i=this,a=this.exit(),n="function"==typeof t?(n=t(n))&&n.selection():n.append(t+"");return null!=e&&(i=(i=e(i))&&i.selection()),null==r?a.remove():r(a),n&&i?n.merge(i).order():i}var Eu=i(()=>{Ae(_u,"default")});function Su(t){for(var t=t.selection?t.selection():t,e=this._groups,r=t._groups,n=e.length,t=r.length,i=Math.min(n,t),a=new Array(n),s=0;s{m0(),Ae(Su,"default")});function Au(){for(var t=this._groups,e=-1,r=t.length;++e{Ae(Au,"default")});function Nu(r){function t(t,e){return t&&e?r(t.__data__,e.__data__):!t-!e}r=r||Iu,Ae(t,"compareNode");for(var e=this._groups,n=e.length,i=new Array(n),a=0;a{m0(),Ae(Nu,"default"),Ae(Iu,"ascending")});function Ru(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var Du=i(()=>{Ae(Ru,"default")});function Ou(){return Array.from(this)}var Pu=i(()=>{Ae(Ou,"default")});function Bu(){for(var t=this._groups,e=0,r=t.length;e{Ae(Bu,"default")});function $u(){let t=0;for(var e of this)++t;return t}var zu=i(()=>{Ae($u,"default")});function qu(){return!this.node()}var Uu=i(()=>{Ae(qu,"default")});function ju(t){for(var e=this._groups,r=0,n=e.length;r{Ae(ju,"default")});function Wu(t){return function(){this.removeAttribute(t)}}function Yu(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Hu(t,e){return function(){this.setAttribute(t,e)}}function Vu(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Xu(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}}function Ku(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function Zu(t,e){var r,t=Lh(t);return arguments.length<2?(r=this.node(),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)):this.each((null==e?t.local?Yu:Wu:"function"==typeof e?t.local?Ku:Xu:t.local?Vu:Hu)(t,e))}var Qu=i(()=>{Nh(),Ae(Wu,"attrRemove"),Ae(Yu,"attrRemoveNS"),Ae(Hu,"attrConstant"),Ae(Vu,"attrConstantNS"),Ae(Xu,"attrFunction"),Ae(Ku,"attrFunctionNS"),Ae(Zu,"default")});function Ju(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var td=i(()=>{Ae(Ju,"default")});function ed(t){return function(){this.style.removeProperty(t)}}function rd(t,e,r){return function(){this.style.setProperty(t,e,r)}}function nd(e,r,n){return function(){var t=r.apply(this,arguments);null==t?this.style.removeProperty(e):this.style.setProperty(e,t,n)}}function id(t,e,r){return 1{td(),Ae(ed,"styleRemove"),Ae(rd,"styleConstant"),Ae(nd,"styleFunction"),Ae(id,"default"),Ae(ad,"styleValue")});function od(t){return function(){delete this[t]}}function ld(t,e){return function(){this[t]=e}}function cd(e,r){return function(){var t=r.apply(this,arguments);null==t?delete this[e]:this[e]=t}}function hd(t,e){return 1{Ae(od,"propertyRemove"),Ae(ld,"propertyConstant"),Ae(cd,"propertyFunction"),Ae(hd,"default")});function dd(t){return t.trim().split(/^|\s+/)}function pd(t){return t.classList||new gd(t)}function gd(t){this._node=t,this._names=dd(t.getAttribute("class")||"")}function fd(t,e){for(var r=pd(t),n=-1,i=e.length;++n{Ae(dd,"classArray"),Ae(pd,"classList"),Ae(gd,"ClassList"),gd.prototype={add:Ae(function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:Ae(function(t){0<=(t=this._names.indexOf(t))&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:Ae(function(t){return 0<=this._names.indexOf(t)},"contains")},Ae(fd,"classedAdd"),Ae(md,"classedRemove"),Ae(yd,"classedTrue"),Ae(vd,"classedFalse"),Ae(xd,"classedFunction"),Ae(bd,"default")});function kd(){this.textContent=""}function Td(t){return function(){this.textContent=t}}function _d(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function Ed(t){return arguments.length?this.each(null==t?kd:("function"==typeof t?_d:Td)(t)):this.node().textContent}var Sd=i(()=>{Ae(kd,"textRemove"),Ae(Td,"textConstant"),Ae(_d,"textFunction"),Ae(Ed,"default")});function Cd(){this.innerHTML=""}function Ad(t){return function(){this.innerHTML=t}}function Ld(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Nd(t){return arguments.length?this.each(null==t?Cd:("function"==typeof t?Ld:Ad)(t)):this.node().innerHTML}var Id=i(()=>{Ae(Cd,"htmlRemove"),Ae(Ad,"htmlConstant"),Ae(Ld,"htmlFunction"),Ae(Nd,"default")});function Md(){this.nextSibling&&this.parentNode.appendChild(this)}function Rd(){return this.each(Md)}var Dd=i(()=>{Ae(Md,"raise"),Ae(Rd,"default")});function Od(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Pd(){return this.each(Od)}var Bd=i(()=>{Ae(Od,"lower"),Ae(Pd,"default")});function Fd(t){var e="function"==typeof t?t:Rh(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var $d=i(()=>{Dh(),Ae(Fd,"default")});function zd(){return null}function qd(t,e){var r="function"==typeof t?t:Rh(t),n=null==e?zd:"function"==typeof e?e:Ph(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var Ud=i(()=>{Dh(),Bh(),Ae(zd,"constantNull"),Ae(qd,"default")});function jd(){var t=this.parentNode;t&&t.removeChild(this)}function Gd(){return this.each(jd)}var Wd=i(()=>{Ae(jd,"remove"),Ae(Gd,"default")});function Yd(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Hd(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Vd(t){return this.select(t?Hd:Yd)}var Xd=i(()=>{Ae(Yd,"selection_cloneShallow"),Ae(Hd,"selection_cloneDeep"),Ae(Vd,"default")});function Kd(t){return arguments.length?this.property("__data__",t):this.node().__data__}var Zd=i(()=>{Ae(Kd,"default")});function Qd(e){return function(t){e.call(this,t,this.__data__)}}function Jd(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return 0<=r&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}function t0(a){return function(){var t=this.__on;if(t){for(var e,r=0,n=-1,i=t.length;r{Ae(Qd,"contextListener"),Ae(Jd,"parseTypenames"),Ae(t0,"onRemove"),Ae(e0,"onAdd"),Ae(r0,"default")});function i0(t,e,r){var n=Ju(t),i=n.CustomEvent;"function"==typeof i?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function a0(t,e){return function(){return i0(this,t,e)}}function s0(t,e){return function(){return i0(this,t,e.apply(this,arguments))}}function o0(t,e){return this.each(("function"==typeof e?s0:a0)(t,e))}var l0=i(()=>{td(),Ae(i0,"dispatchEvent"),Ae(a0,"dispatchConstant"),Ae(s0,"dispatchFunction"),Ae(o0,"default")});function*c0(){for(var t=this._groups,e=0,r=t.length;e{Ae(c0,"default")});function u0(t,e){this._groups=t,this._parents=e}function d0(){return new u0([[document.documentElement]],g0)}function p0(){return this}var g0,f0,m0=i(()=>{$h(),Hh(),eu(),su(),lu(),wu(),pu(),Tu(),Eu(),Cu(),Lu(),Mu(),Du(),Pu(),Fu(),zu(),Uu(),Gu(),Qu(),sd(),ud(),wd(),Sd(),Id(),Dd(),Bd(),$d(),Ud(),Wd(),Xd(),Zd(),n0(),l0(),h0(),g0=[null],Ae(u0,"Selection"),Ae(d0,"selection"),Ae(p0,"selection_selection"),u0.prototype=d0.prototype={constructor:u0,select:Fh,selectAll:Yh,selectChild:Jh,selectChildren:iu,filter:ou,data:xu,enter:uu,exit:ku,join:_u,merge:Su,selection:p0,order:Au,sort:Nu,call:Ru,nodes:Ou,node:Bu,size:$u,empty:qu,each:ju,attr:Zu,style:id,property:hd,classed:bd,text:Ed,html:Nd,raise:Rd,lower:Pd,append:Fd,insert:qd,remove:Gd,clone:Vd,datum:Kd,on:r0,dispatch:o0,[Symbol.iterator]:c0},f0=d0});function O(t){return"string"==typeof t?new u0([[document.querySelector(t)]],[document.documentElement]):new u0([[t]],g0)}var y0=i(()=>{m0(),Ae(O,"default")}),v0=i(()=>{Kh(),Nh(),y0(),m0(),Bh(),Gh(),sd()}),x0=i(()=>{});function b0(t,e,r){(t.prototype=e.prototype=r).constructor=t}function w0(t,e){var r,n=Object.create(t.prototype);for(r in e)n[r]=e[r];return n}var k0=i(()=>{Ae(b0,"default"),Ae(w0,"extend")});function T0(){}function _0(){return this.rgb().formatHex()}function E0(){return this.rgb().formatHex8()}function S0(){return q0(this).formatHsl()}function C0(){return this.rgb().formatRgb()}function A0(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=K0.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?L0(e):3===r?new R0(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?N0(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?N0(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Z0.exec(t))?new R0(e[1],e[2],e[3],1):(e=Q0.exec(t))?new R0(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=J0.exec(t))?N0(e[1],e[2],e[3],e[4]):(e=tp.exec(t))?N0(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ep.exec(t))?z0(e[1],e[2]/100,e[3]/100,1):(e=rp.exec(t))?z0(e[1],e[2]/100,e[3]/100,e[4]):np.hasOwnProperty(t)?L0(np[t]):"transparent"===t?new R0(NaN,NaN,NaN,0):null}function L0(t){return new R0(t>>16&255,t>>8&255,255&t,1)}function N0(t,e,r,n){return new R0(t=n<=0?e=r=NaN:t,e,r,n)}function I0(t){return(t=t instanceof T0?t:A0(t))?new R0((t=t.rgb()).r,t.g,t.b,t.opacity):new R0}function M0(t,e,r,n){return 1===arguments.length?I0(t):new R0(t,e,r,n??1)}function R0(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function D0(){return"#"+$0(this.r)+$0(this.g)+$0(this.b)}function O0(){return"#"+$0(this.r)+$0(this.g)+$0(this.b)+$0(255*(isNaN(this.opacity)?1:this.opacity))}function P0(){var t=B0(this.opacity);return(1===t?"rgb(":"rgba(")+F0(this.r)+`, ${F0(this.g)}, `+F0(this.b)+(1===t?")":`, ${t})`)}function B0(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function F0(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function $0(t){return((t=F0(t))<16?"0":"")+t.toString(16)}function z0(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new j0(t,e,r,n)}function q0(t){var e,r,n,i,a,s,o,l;return t instanceof j0?new j0(t.h,t.s,t.l,t.opacity):(t=t instanceof T0?t:A0(t))?t instanceof j0?t:(e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),s=NaN,l=((a=Math.max(e,r,n))+i)/2,(o=a-i)?(s=e===a?(r-n)/o+6*(r{k0(),Ae(T0,"Color"),H0="\\s*([+-]?\\d+)\\s*",V0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",X0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",K0=/^#([0-9a-f]{3,8})$/,Z0=new RegExp(`^rgb\\(${H0},${H0},${H0}\\)$`),Q0=new RegExp(`^rgb\\(${X0},${X0},${X0}\\)$`),J0=new RegExp(`^rgba\\(${H0},${H0},${H0},${V0}\\)$`),tp=new RegExp(`^rgba\\(${X0},${X0},${X0},${V0}\\)$`),ep=new RegExp(`^hsl\\(${V0},${X0},${X0}\\)$`),rp=new RegExp(`^hsla\\(${V0},${X0},${X0},${V0}\\)$`),np={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},b0(T0,A0,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:_0,formatHex:_0,formatHex8:E0,formatHsl:S0,formatRgb:C0,toString:C0}),Ae(_0,"color_formatHex"),Ae(E0,"color_formatHex8"),Ae(S0,"color_formatHsl"),Ae(C0,"color_formatRgb"),Ae(A0,"color"),Ae(L0,"rgbn"),Ae(N0,"rgba"),Ae(I0,"rgbConvert"),Ae(M0,"rgb"),Ae(R0,"Rgb"),b0(R0,M0,w0(T0,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new R0(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new R0(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new R0(F0(this.r),F0(this.g),F0(this.b),B0(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:D0,formatHex:D0,formatHex8:O0,formatRgb:P0,toString:P0})),Ae(D0,"rgb_formatHex"),Ae(O0,"rgb_formatHex8"),Ae(P0,"rgb_formatRgb"),Ae(B0,"clampa"),Ae(F0,"clampi"),Ae($0,"hex"),Ae(z0,"hsla"),Ae(q0,"hslConvert"),Ae(U0,"hsl"),Ae(j0,"Hsl"),b0(j0,U0,w0(T0,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new j0(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new j0(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l;return new R0(Y0(240<=t?t-240:120+t,r=2*r-(e=r+(r<.5?r:1-r)*e),e),Y0(t,r,e),Y0(t<120?240+t:t-120,r,e),this.opacity)},clamp(){return new j0(G0(this.h),W0(this.s),W0(this.l),B0(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){var t=B0(this.opacity);return(1===t?"hsl(":"hsla(")+G0(this.h)+`, ${100*W0(this.s)}%, ${100*W0(this.l)}%`+(1===t?")":`, ${t})`)}})),Ae(G0,"clamph"),Ae(W0,"clampt"),Ae(Y0,"hsl2rgb")}),op=i(()=>{ip=Math.PI/180,ap=180/Math.PI});function lp(t){var e,r,n,i,a,s;return t instanceof hp?new hp(t.l,t.a,t.b,t.opacity):t instanceof yp?vp(t):(i=up(.2225045*(e=gp((t=t instanceof R0?t:I0(t)).r))+.7168786*(r=gp(t.g))+.0606169*(n=gp(t.b))),e===r&&r===n?a=s=i:(a=up((.4360747*e+.3850649*r+.1430804*n)/.96422),s=up((.0139322*e+.0971045*r+.7141733*n)/.82521)),new hp(116*i-16,500*(a-i),200*(i-s),t.opacity))}function cp(t,e,r,n){return 1===arguments.length?lp(t):new hp(t,e,r,n??1)}function hp(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function up(t){return kp{k0(),sp(),op(),xp=4/29,wp=3*(bp=6/29)*bp,kp=bp*bp*bp,Ae(lp,"labConvert"),Ae(cp,"lab"),Ae(hp,"Lab"),b0(hp,cp,w0(T0,{brighter(t){return new hp(this.l+18*(t??1),this.a,this.b,this.opacity)},darker(t){return new hp(this.l-18*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new R0(pp(3.1338561*(e=.96422*dp(e))-1.6168667*(t=+dp(t))-.4906146*(r=.82521*dp(r))),pp(-.9787684*e+1.9161415*t+.033454*r),pp(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),Ae(up,"xyz2lab"),Ae(dp,"lab2xyz"),Ae(pp,"lrgb2rgb"),Ae(gp,"rgb2lrgb"),Ae(fp,"hclConvert"),Ae(mp,"hcl"),Ae(yp,"Hcl"),Ae(vp,"hcl2lab"),b0(yp,mp,w0(T0,{brighter(t){return new yp(this.h,this.c,this.l+18*(t??1),this.opacity)},darker(t){return new yp(this.h,this.c,this.l-18*(t??1),this.opacity)},rgb(){return vp(this).rgb()}}))}),_p=i(()=>{sp(),Tp()});function Ep(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6}function Sp(s){var o=s.length-1;return function(t){var e=t<=0?t=0:1<=t?o-(t=1):Math.floor(t*o),r=s[e],n=s[e+1],i=0{Ae(Ep,"basis"),Ae(Sp,"default")});function Ap(s){var o=s.length;return function(t){var e=Math.floor(((t%=1)<0?++t:t)*o),r=s[(e+o-1)%o],n=s[e%o],i=s[(e+1)%o],a=s[(e+2)%o];return Ep((t-e/o)*o,r,n,i,a)}}var Lp,Np=i(()=>{Cp(),Ae(Ap,"default")}),Ip=i(()=>{Lp=Ae(t=>()=>t,"default")});function Mp(e,r){return function(t){return e+t*r}}function Rp(e,r,n){return e=Math.pow(e,n),r=Math.pow(r,n)-e,n=1/n,function(t){return Math.pow(e+t*r,n)}}function Dp(t,e){var r=e-t;return r?Mp(t,180{Ip(),Ae(Mp,"linear"),Ae(Rp,"exponential"),Ae(Dp,"hue"),Ae(Op,"gamma"),Ae(Pp,"nogamma")});function Fp(o){return function(t){for(var e,r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),s=0;s{_p(),Cp(),Np(),Bp(),$p=Ae(function t(e){var s=Op(e);function r(e,t){var r=s((e=M0(e)).r,(t=M0(t)).r),n=s(e.g,t.g),i=s(e.b,t.b),a=Pp(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=n(t),e.b=i(t),e.opacity=a(t),e+""}}return Ae(r,"rgb"),r.gamma=t,r},"rgbGamma")(1),Ae(Fp,"rgbSpline"),Fp(Sp),Fp(Ap)});function qp(e,r){r=r||[];var n,i=e?Math.min(r.length,e.length):0,a=r.slice();return function(t){for(n=0;n{Ae(qp,"default"),Ae(Up,"isNumberArray")});function Gp(t,e){for(var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s=0;s{a1(),Ae(Gp,"genericArray")});function Yp(e,r){var n=new Date;return e=+e,r=+r,function(t){return n.setTime(e*(1-t)+r*t),n}}var Hp=i(()=>{Ae(Yp,"default")});function Vp(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}var Xp=i(()=>{Ae(Vp,"default")});function Kp(t,e){var r,n={},i={};for(r in null!==t&&"object"==typeof t||(t={}),e=null!==e&&"object"==typeof e?e:{})r in t?n[r]=i1(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}}var Zp=i(()=>{a1(),Ae(Kp,"default")});function Qp(t){return function(){return t}}function Jp(e){return function(t){return e(t)+""}}function t1(t,n){var e,r,i,a=e1.lastIndex=r1.lastIndex=0,s=-1,o=[],l=[];for(t+="",n+="";(e=e1.exec(t))&&(r=r1.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),o[s]?o[s]+=i:o[++s]=i),(e=e[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:Vp(e,r)})),a=r1.lastIndex;return a{Xp(),e1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,r1=new RegExp(e1.source,"g"),Ae(Qp,"zero"),Ae(Jp,"one"),Ae(t1,"default")});function i1(t,e){var r=typeof e;return null==e||"boolean"==r?Lp(e):("number"==r?Vp:"string"==r?(r=A0(e))?(e=r,$p):t1:e instanceof A0?$p:e instanceof Date?Yp:Up(e)?qp:Array.isArray(e)?Gp:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Kp:Vp)(t,e)}var a1=i(()=>{_p(),zp(),Wp(),Hp(),Xp(),Zp(),n1(),Ip(),jp(),Ae(i1,"default")});function s1(e,r){return e=+e,r=+r,function(t){return Math.round(e*(1-t)+r*t)}}var o1=i(()=>{Ae(s1,"default")});function l1(t,e,r,n,i,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n{c1=180/Math.PI,h1={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Ae(l1,"default")});function d1(t){return(t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")).isIdentity?h1:l1(t.a,t.b,t.c,t.d,t.e,t.f)}function p1(t){return null!=t&&((g1=g1||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),t=g1.transform.baseVal.consolidate())?l1((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):h1}var g1,f1=i(()=>{u1(),Ae(d1,"parseCss"),Ae(p1,"parseSvg")});function m1(r,o,l,i){function c(t){return t.length?t.pop()+" ":""}function n(t,e,r,n,i,a){var s;t!==r||e!==n?(s=i.push("translate(",null,o,null,l),a.push({i:s-4,x:Vp(t,r)},{i:s-2,x:Vp(e,n)})):(r||n)&&i.push("translate("+r+o+n+l)}function s(t,e,r,n){t!==e?(180{Xp(),f1(),Ae(m1,"interpolateTransform"),y1=m1(d1,"px, ","px)","deg)"),v1=m1(p1,", ",")",")")});function b1(s){return function(e,t){var r=s((e=mp(e)).h,(t=mp(t)).h),n=Pp(e.c,t.c),i=Pp(e.l,t.l),a=Pp(e.opacity,t.opacity);return function(t){return e.h=r(t),e.c=n(t),e.l=i(t),e.opacity=a(t),e+""}}}var w1,k1=i(()=>{_p(),Bp(),Ae(b1,"hcl"),w1=b1(Dp),b1(Pp)}),T1=i(()=>{a1(),Xp(),o1(),n1(),x1(),zp(),k1()});function _1(){return z1||(j1(E1),z1=U1.now()+q1)}function E1(){z1=0}function S1(){this._call=this._time=this._next=null}function C1(t,e,r){var n=new S1;return n.restart(t,e,r),n}function A1(){_1(),++R1;for(var t,e=B1;e;)0<=(t=z1-e._time)&&e._call.call(void 0,t),e=e._next;--R1}function L1(){z1=($1=U1.now())+q1,R1=D1=0;try{A1()}finally{R1=0,I1(),z1=0}}function N1(){var t=U1.now(),e=t-$1;P1r._time&&(n=r._time),(t=r)._next):(e=r._next,r._next=null,t?t._next=e:B1=e);F1=t,M1(n)}function M1(t){R1||(D1=D1&&clearTimeout(D1),24{P1=1e3,q1=z1=$1=O1=D1=R1=0,U1="object"==typeof performance&&performance.now?performance:Date,j1="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)},Ae(_1,"now"),Ae(E1,"clearNow"),Ae(S1,"Timer"),S1.prototype=C1.prototype={constructor:S1,restart:Ae(function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?_1():+r)+(null==e?0:+e),this._next||F1===this||(F1?F1._next=this:B1=this,F1=this),this._call=t,this._time=r,M1()},"restart"),stop:Ae(function(){this._call&&(this._call=null,this._time=1/0,M1())},"stop")},Ae(C1,"timer"),Ae(A1,"timerFlush"),Ae(L1,"wake"),Ae(N1,"poke"),Ae(I1,"nap"),Ae(M1,"sleep")});function W1(e,r,t){var n=new S1;return r=null==r?0:+r,n.restart(t=>{n.stop(),e(t+r)},r,t),n}var Y1=i(()=>{G1(),Ae(W1,"default")}),H1=i(()=>{G1(),Y1()});function V1(t,e,r,n,i,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};Q1(t,r,{name:e,index:n,group:i,on:J1,tween:tg,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:eg})}function X1(t,e){if((t=Z1(t,e)).state>eg)throw new Error("too late; already scheduled");return t}function K1(t,e){if((t=Z1(t,e)).state>ig)throw new Error("too late; already running");return t}function Z1(t,e){if(t=(t=t.__transition)&&t[e])return t;throw new Error("transition not found")}function Q1(a,s,o){var l,c=a.__transition;function t(t){o.state=rg,o.timer.restart(h,o.delay,o.time),o.delay<=t&&h(t-o.delay)}function h(t){var e,r,n,i;if(o.state!==rg)return d();for(e in c)if(i=c[e],i.name===o.name){if(i.state===ig)return W1(h);i.state===ag?(i.state=og,i.timer.stop(),i.on.call("interrupt",a,a.__data__,i.index,i.group),delete c[e]):+e{Ch(),H1(),J1=Th("start","end","cancel","interrupt"),tg=[],eg=0,rg=1,ng=2,ig=3,ag=4,sg=5,og=6,Ae(V1,"default"),Ae(X1,"init"),Ae(K1,"set"),Ae(Z1,"get"),Ae(Q1,"create")});function cg(t,e){var r,n,i,a=t.__transition,s=!0;if(a){for(i in e=null==e?null:e+"",a)(r=a[i]).name!==e?s=!1:(n=r.state>ng&&r.state{lg(),Ae(cg,"default")});function ug(t){return this.each(function(){cg(this,t)})}var dg=i(()=>{hg(),Ae(ug,"default")});function pg(i,a){var s,o;return function(){var t=K1(this,i),e=t.tween;if(e!==s)for(var r=0,n=(o=s=e).length;r{lg(),Ae(pg,"tweenRemove"),Ae(gg,"tweenFunction"),Ae(fg,"default"),Ae(mg,"tweenValue")});function vg(t,e){var r;return("number"==typeof e?Vp:e instanceof A0?$p:(r=A0(e))?(e=r,$p):t1)(t,e)}var xg=i(()=>{_p(),T1(),Ae(vg,"default")});function bg(t){return function(){this.removeAttribute(t)}}function wg(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kg(e,r,n){var i,a,s=n+"";return function(){var t=this.getAttribute(e);return t===s?null:t===i?a:a=r(i=t,n)}}function Tg(e,r,n){var i,a,s=n+"";return function(){var t=this.getAttributeNS(e.space,e.local);return t===s?null:t===i?a:a=r(i=t,n)}}function _g(n,i,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttribute(n):(t=this.getAttribute(n))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=i(s=t,r))}}function Eg(n,i,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttributeNS(n.space,n.local):(t=this.getAttributeNS(n.space,n.local))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=i(s=t,r))}}function Sg(t,e){var r=Lh(t),n="transform"===r?v1:vg;return this.attrTween(t,"function"==typeof e?(r.local?Eg:_g)(r,n,mg(this,"attr."+t,e)):null==e?(r.local?wg:bg)(r):(r.local?Tg:kg)(r,n,e))}var Cg=i(()=>{T1(),v0(),yg(),xg(),Ae(bg,"attrRemove"),Ae(wg,"attrRemoveNS"),Ae(kg,"attrConstant"),Ae(Tg,"attrConstantNS"),Ae(_g,"attrFunction"),Ae(Eg,"attrFunctionNS"),Ae(Sg,"default")});function Ag(e,r){return function(t){this.setAttribute(e,r.call(this,t))}}function Lg(e,r){return function(t){this.setAttributeNS(e.space,e.local,r.call(this,t))}}function Ng(e,r){var n,i;function t(){var t=r.apply(this,arguments);return n=t!==i?(i=t)&&Lg(e,t):n}return Ae(t,"tween"),t._value=r,t}function Ig(e,r){var n,i;function t(){var t=r.apply(this,arguments);return n=t!==i?(i=t)&&Ag(e,t):n}return Ae(t,"tween"),t._value=r,t}function Mg(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return t=Lh(t),this.tween(r,(t.local?Ng:Ig)(t,e))}var Rg=i(()=>{v0(),Ae(Ag,"attrInterpolate"),Ae(Lg,"attrInterpolateNS"),Ae(Ng,"attrTweenNS"),Ae(Ig,"attrTween"),Ae(Mg,"default")});function Dg(t,e){return function(){X1(this,t).delay=+e.apply(this,arguments)}}function Og(t,e){return e=+e,function(){X1(this,t).delay=e}}function Pg(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Dg:Og)(e,t)):Z1(this.node(),e).delay}var Bg=i(()=>{lg(),Ae(Dg,"delayFunction"),Ae(Og,"delayConstant"),Ae(Pg,"default")});function Fg(t,e){return function(){K1(this,t).duration=+e.apply(this,arguments)}}function $g(t,e){return e=+e,function(){K1(this,t).duration=e}}function zg(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Fg:$g)(e,t)):Z1(this.node(),e).duration}var qg=i(()=>{lg(),Ae(Fg,"durationFunction"),Ae($g,"durationConstant"),Ae(zg,"default")});function Ug(t,e){if("function"!=typeof e)throw new Error;return function(){K1(this,t).ease=e}}function jg(t){var e=this._id;return arguments.length?this.each(Ug(e,t)):Z1(this.node(),e).ease}var Gg=i(()=>{lg(),Ae(Ug,"easeConstant"),Ae(jg,"default")});function Wg(e,r){return function(){var t=r.apply(this,arguments);if("function"!=typeof t)throw new Error;K1(this,e).ease=t}}function Yg(t){if("function"!=typeof t)throw new Error;return this.each(Wg(this._id,t))}var Hg=i(()=>{lg(),Ae(Wg,"easeVarying"),Ae(Yg,"default")});function Vg(t){"function"!=typeof t&&(t=Vh(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{v0(),qf(),Ae(Vg,"default")});function Kg(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,t=r.length,i=Math.min(n,t),a=new Array(n),s=0;s{qf(),Ae(Kg,"default")});function Qg(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return!(t=0<=e?t.slice(0,e):t)||"start"===t})}function Jg(r,n,i){var a,s,o=Qg(n)?X1:K1;return function(){var t=o(this,r),e=t.on;e!==a&&(s=(a=e).copy()).on(n,i),t.on=s}}function tf(t,e){var r=this._id;return arguments.length<2?Z1(this.node(),r).on.on(t):this.each(Jg(r,t,e))}var ef=i(()=>{lg(),Ae(Qg,"start"),Ae(Jg,"onFunction"),Ae(tf,"default")});function rf(r){return function(){var t,e=this.parentNode;for(t in this.__transition)if(+t!==r)return;e&&e.removeChild(this)}}function nf(){return this.on("end.remove",rf(this._id))}var af=i(()=>{Ae(rf,"removeFunction"),Ae(nf,"default")});function sf(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Ph(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s{v0(),qf(),lg(),Ae(sf,"default")});function lf(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=jh(t));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o{v0(),qf(),lg(),Ae(lf,"default")});function hf(){return new uf(this._groups,this._parents)}var uf,df=i(()=>{v0(),uf=f0.prototype.constructor,Ae(hf,"default")});function pf(r,n){var i,a,s;return function(){var t=ad(this,r),e=(this.style.removeProperty(r),ad(this,r));return t===e?null:t===i&&e===a?s:s=n(i=t,a=e)}}function gf(t){return function(){this.style.removeProperty(t)}}function ff(e,r,n){var i,a,s=n+"";return function(){var t=ad(this,e);return t===s?null:t===i?a:a=r(i=t,n)}}function mf(n,i,a){var s,o,l;return function(){var t=ad(this,n),e=a(this),r=e+"";return null==e&&(this.style.removeProperty(n),r=e=ad(this,n)),t===r?null:t===s&&r===o?l:(o=r,l=i(s=t,e))}}function yf(n,i){var a,s,o,l,c="style."+i,h="end."+c;return function(){var t=K1(this,n),e=t.on,r=null==t.value[c]?l=l||gf(i):void 0;e===a&&o===r||(s=(a=e).copy()).on(h,o=r),t.on=s}}function vf(t,e,r){var n="transform"==(t+="")?y1:vg;return null==e?this.styleTween(t,pf(t,n)).on("end.style."+t,gf(t)):"function"==typeof e?this.styleTween(t,mf(t,n,mg(this,"style."+t,e))).each(yf(this._id,t)):this.styleTween(t,ff(t,n,e),r).on("end.style."+t,null)}var xf=i(()=>{T1(),v0(),lg(),yg(),xg(),Ae(pf,"styleNull"),Ae(gf,"styleRemove"),Ae(ff,"styleConstant"),Ae(mf,"styleFunction"),Ae(yf,"styleMaybeRemove"),Ae(vf,"default")});function bf(e,r,n){return function(t){this.style.setProperty(e,r.call(this,t),n)}}function wf(e,r,n){var i,a;function t(){var t=r.apply(this,arguments);return i=t!==a?(a=t)&&bf(e,t,n):i}return Ae(t,"tween"),t._value=r,t}function kf(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;return this.tween(n,wf(t,e,r??""))}var Tf=i(()=>{Ae(bf,"styleInterpolate"),Ae(wf,"styleTween"),Ae(kf,"default")});function _f(t){return function(){this.textContent=t}}function Ef(e){return function(){var t=e(this);this.textContent=t??""}}function Sf(t){return this.tween("text","function"==typeof t?Ef(mg(this,"text",t)):_f(null==t?"":t+""))}var Cf=i(()=>{yg(),Ae(_f,"textConstant"),Ae(Ef,"textFunction"),Ae(Sf,"default")});function Af(e){return function(t){this.textContent=e.call(this,t)}}function Lf(e){var r,n;function t(){var t=e.apply(this,arguments);return r=t!==n?(n=t)&&Af(t):r}return Ae(t,"tween"),t._value=e,t}function Nf(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Lf(t))}var If=i(()=>{Ae(Af,"textInterpolate"),Ae(Lf,"textTween"),Ae(Nf,"default")});function Mf(){for(var t=this._name,e=this._id,r=++$f,n=this._groups,i=n.length,a=0;a{qf(),lg(),Ae(Mf,"default")});function Df(){var i,a,s=this,o=s._id,l=s.size();return new Promise(function(t,e){var r={value:e},n={value:Ae(function(){0==--l&&t()},"value")};s.each(function(){var t=K1(this,o),e=t.on;e!==i&&((a=(i=e).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(n)),t.on=a}),0===l&&t()})}var Of=i(()=>{lg(),Ae(Df,"default")});function Pf(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function Bf(t){return f0().transition(t)}function Ff(){return++$f}var $f,zf,qf=i(()=>{v0(),Cg(),Rg(),Bg(),qg(),Gg(),Hg(),Xg(),Zg(),ef(),af(),of(),cf(),df(),xf(),Tf(),Cf(),If(),Rf(),yg(),Of(),$f=0,Ae(Pf,"Transition"),Ae(Bf,"transition"),Ae(Ff,"newId"),zf=f0.prototype,Pf.prototype=Bf.prototype={constructor:Pf,select:sf,selectAll:lf,selectChild:zf.selectChild,selectChildren:zf.selectChildren,filter:Vg,merge:Kg,selection:hf,transition:Mf,call:zf.call,nodes:zf.nodes,node:zf.node,size:zf.size,empty:zf.empty,each:zf.each,on:tf,attr:Sg,attrTween:Mg,style:vf,styleTween:kf,text:Sf,textTween:Nf,remove:nf,tween:fg,delay:Pg,duration:zg,ease:jg,easeVarying:Yg,end:Df,[Symbol.iterator]:zf[Symbol.iterator]}});function Uf(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var jf=i(()=>{Ae(Uf,"cubicInOut")}),Gf=i(()=>{jf()});function Wf(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function Yf(t){var e,r;t=t instanceof Pf?(e=t._id,t._name):(e=++$f,(r=Hf).time=_1(),null==t?null:t+"");for(var n=this._groups,i=n.length,a=0;a{qf(),lg(),Gf(),H1(),Hf={time:null,delay:0,duration:250,ease:Uf},Ae(Wf,"inherit"),Ae(Yf,"default")}),Xf=i(()=>{v0(),dg(),Vf(),f0.prototype.interrupt=ug,f0.prototype.transition=Yf}),Kf=i(()=>{Xf()}),Zf=i(()=>{}),Qf=i(()=>{}),Jf=i(()=>{});function tm(t){return[+t[0],+t[1]]}function em(t){return[tm(t[0]),tm(t[1])]}function rm(t){return{type:t}}var nm,im,am,sm=i(()=>{Kf(),Zf(),Qf(),Jf(),{abs:nm,max:im,min:am}=Math,Ae(tm,"number1"),Ae(em,"number2"),["w","e"].map(rm),Ae(function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},"input"),Ae(function(t){return t&&[t[0][0],t[1][0]]},"output"),["n","s"].map(rm),Ae(function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},"input"),Ae(function(t){return t&&[t[0][1],t[1][1]]},"output"),["n","w","e","s","nw","ne","sw","se"].map(rm),Ae(function(t){return null==t?null:em(t)},"input"),Ae(function(t){return t},"output"),Ae(rm,"type")}),om=i(()=>{sm()});function lm(r){this._+=r[0];for(let t=1,e=r.length;t{um=Math.PI,gm=(dm=2*um)-(pm=1e-6),Ae(lm,"append"),Ae(cm,"appendRound"),fm=class{static{Ae(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?lm:cm(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,n){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(t,e,r,n,i,a){this._append`C${+t},${+e},${+r},${+n},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,r,n,i){if(t=+t,e=+e,r=+r,n=+n,(i=+i)<0)throw new Error("negative radius: "+i);var a,s,o=this._x1,l=this._y1,c=r-t,h=n-e,u=o-t,d=l-e,p=u*u+d*d;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:pmpm&&i?(s=c*c+h*h,n=(r-=o)*r+(o=n-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=i*Math.tan((um-Math.acos((s+p-n)/(2*l*a)))/2))/a,n=s/l,Math.abs(p-1)>pm&&this._append`L${t+p*u},${e+p*d}`,this._append`A${i},${i},0,0,${+(u*opm||Math.abs(this._y1-c)>pm)&&this._append`L${l},${c}`,r&&((a=a<0?a%dm+dm:a)>gm?this._append`A${r},${r},0,1,${h},${t-s},${e-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:pm{mm()}),vm=i(()=>{}),xm=i(()=>{}),bm=i(()=>{}),wm=i(()=>{}),km=i(()=>{}),Tm=i(()=>{}),_m=i(()=>{});function Em(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Sm(t,e){var r;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(r=t.slice(0,e)).length?r[0]+r.slice(2):r,+t.slice(e+1)]}var Cm=i(()=>{Ae(Em,"default"),Ae(Sm,"formatDecimalParts")});function Am(t){return(t=Sm(Math.abs(t)))?t[1]:NaN}var Lm=i(()=>{Cm(),Ae(Am,"default")});function Nm(o,l){return function(t,e){for(var r=t.length,n=[],i=0,a=o[0],s=0;0e));)a=o[i=(i+1)%o.length];return n.reverse().join(l)}}var Im=i(()=>{Ae(Nm,"default")});function Mm(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Rm=i(()=>{Ae(Mm,"default")});function Dm(t){var e;if(e=Pm.exec(t))return new Om({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function Om(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}var Pm,Bm=i(()=>{Pm=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,Ae(Dm,"formatSpecifier"),Dm.prototype=Om.prototype,Ae(Om,"FormatSpecifier"),Om.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type}});function Fm(t){t:for(var e,r=t.length,n=1,i=-1;n{Ae(Fm,"default")});function zm(t,e){var r,n,i=Sm(t,e);return i?(r=i[0],(i=(i=i[1])-(qm=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(n=r.length)?r:n{Cm(),Ae(zm,"default")});function jm(t,e){var r;return(e=Sm(t,e))?(r=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+r:r.length>e+1?r.slice(0,e+1)+"."+r.slice(e+1):r+new Array(e-r.length+2).join("0")):t+""}var Gm,Wm=i(()=>{Cm(),Ae(jm,"default")}),Ym=i(()=>{Cm(),Um(),Wm(),Gm={"%":Ae((t,e)=>(100*t).toFixed(e),"%"),b:Ae(t=>Math.round(t).toString(2),"b"),c:Ae(t=>t+"","c"),d:Em,e:Ae((t,e)=>t.toExponential(e),"e"),f:Ae((t,e)=>t.toFixed(e),"f"),g:Ae((t,e)=>t.toPrecision(e),"g"),o:Ae(t=>Math.round(t).toString(8),"o"),p:Ae((t,e)=>jm(100*t,e),"p"),r:jm,s:zm,X:Ae(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:Ae(t=>Math.round(t).toString(16),"x")}});function Hm(t){return t}var Vm=i(()=>{Ae(Hm,"default")});function Xm(t){var k=void 0===t.grouping||void 0===t.thousands?Hm:Nm(Km.call(t.grouping,Number),t.thousands+""),n=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",T=void 0===t.decimal?".":t.decimal+"",_=void 0===t.numerals?Hm:Mm(Km.call(t.numerals,String)),a=void 0===t.percent?"%":t.percent+"",E=void 0===t.minus?"−":t.minus+"",S=void 0===t.nan?"NaN":t.nan+"";function s(t){var c=(t=Dm(t)).fill,h=t.align,u=t.sign,e=t.symbol,d=t.zero,p=t.width,g=t.comma,f=t.precision,m=t.trim,y=t.type,v=("n"===y?(g=!0,y="g"):Gm[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===e?n:"#"===e&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),x="$"===e?i:/[%p]/.test(y)?a:"",b=Gm[y],w=/[defgprs%]/.test(y);function r(t){var e,r,n,i=v,a=x;if("c"===y)a=b(t)+a,t="";else{var s=(t=+t)<0||1/t<0;if(t=isNaN(t)?S:b(Math.abs(t),f),m&&(t=Fm(t)),i=((s=(!s||0!=+t||"+"===u)&&s)?"("===u?u:E:"-"===u||"("===u?"":u)+i,a=("s"===y?Zm[8+qm/3]:"")+a+(s&&"("===u?")":""),w)for(e=-1,r=t.length;++e>1)+i+t+a+l.slice(o);break;default:t=l+i+t+a}return _(t)}return f=void 0===f?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),Ae(r,"format"),r.toString=function(){return t+""},r}function e(t,e){var r=s(((t=Dm(t)).type="f",t)),t=3*Math.max(-8,Math.min(8,Math.floor(Am(e)/3))),n=Math.pow(10,-t),i=Zm[8+t/3];return function(t){return r(n*t)+i}}return Ae(s,"newFormat"),Ae(e,"formatPrefix"),{format:s,formatPrefix:e}}var Km,Zm,Qm=i(()=>{Lm(),Im(),Rm(),Bm(),$m(),Ym(),Um(),Vm(),Km=Array.prototype.map,Zm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Ae(Xm,"default")});function Jm(t){return ty=Xm(t),ey=ty.format,ry=ty.formatPrefix,ty}var ty,ey,ry,ny=i(()=>{Qm(),Jm({thousands:",",grouping:[3],currency:["$",""]}),Ae(Jm,"defaultLocale")});function iy(t){return Math.max(0,-Am(Math.abs(t)))}var ay=i(()=>{Lm(),Ae(iy,"default")});function sy(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Am(e)/3)))-Am(Math.abs(t)))}var oy=i(()=>{Lm(),Ae(sy,"default")});function ly(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Am(e)-Am(t))+1}var cy=i(()=>{Lm(),Ae(ly,"default")}),hy=i(()=>{ny(),Bm(),ay(),oy(),cy()}),uy=i(()=>{}),dy=i(()=>{}),py=i(()=>{}),gy=i(()=>{});function fy(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var my=i(()=>{Ae(fy,"initRange")});function yy(){var r=new zc,n=[],i=[],a=vy;function s(t){let e=r.get(t);if(void 0===e){if(a!==vy)return a;r.set(t,e=n.push(t)-1)}return i[e%i.length]}return Ae(s,"scale"),s.domain=function(t){if(!arguments.length)return n.slice();n=[],r=new zc;for(var e of t)r.has(e)||r.set(e,n.push(e)-1);return s},s.range=function(t){return arguments.length?(i=Array.from(t),s):i.slice()},s.unknown=function(t){return arguments.length?(a=t,s):a},s.copy=function(){return yy(n,i).unknown(a)},fy.apply(s,arguments),s}var vy,xy=i(()=>{rh(),my(),vy=Symbol("implicit"),Ae(yy,"ordinal")});function by(){var i,a,t=yy().unknown(void 0),s=t.domain,o=t.range,l=0,c=1,h=!1,u=0,d=0,p=.5;function e(){var t=s().length,e=c{rh(),my(),xy(),Ae(by,"band")});function ky(t){return function(){return t}}var Ty=i(()=>{Ae(ky,"constants")});function _y(t){return+t}var Ey=i(()=>{Ae(_y,"number")});function Sy(t){return t}function Cy(e,r){return(r-=e=+e)?function(t){return(t-e)/r}:ky(isNaN(r)?NaN:.5)}function Ay(e,r){var t;return r{rh(),T1(),Ty(),Ey(),Dy=[0,1],Ae(Sy,"identity"),Ae(Cy,"normalize"),Ae(Ay,"clamper"),Ae(Ly,"bimap"),Ae(Ny,"polymap"),Ae(Iy,"copy"),Ae(My,"transformer"),Ae(Ry,"continuous")});function Py(t,e,r,n){var i,a=Wc(t,e,r);switch((n=Dm(n??",f")).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=sy(a,s))||(n.precision=i),ry(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=ly(a,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=iy(a))||(n.precision=i-2*("%"===n.type))}return ey(n)}var By=i(()=>{rh(),hy(),Ae(Py,"tickFormat")});function Fy(c){var h=c.domain;return c.ticks=function(t){var e=h();return jc(e[0],e[e.length-1],t??10)},c.tickFormat=function(t,e){var r=h();return Py(r[0],r[r.length-1],t??10,e)},c.nice=function(t){null==t&&(t=10);var e,r,n=h(),i=0,a=n.length-1,s=n[i],o=n[a],l=10;for(o{rh(),Oy(),my(),By(),Ae(Fy,"linearish"),Ae($y,"linear")});function qy(t,e){var r,n=0,i=(t=t.slice()).length-1,a=t[n],s=t[i];return s{Ae(qy,"nice")});function jy(a,s,r,n){function o(t){return a(t=0===arguments.length?new Date:new Date(+t)),t}return Ae(o,"interval"),o.floor=t=>(a(t=new Date(+t)),t),o.ceil=t=>(a(t=new Date(t-1)),s(t,1),a(t),t),o.round=t=>{var e=o(t),r=o.ceil(t);return t-e(s(t=new Date(+t),null==e?1:Math.floor(e)),t),o.range=(t,e,r)=>{var n,i=[];if(t=o.ceil(t),r=null==r?1:Math.floor(r),tjy(t=>{if(t<=t)for(;a(t),!r(t);)t.setTime(t-1)},(t,e)=>{if(t<=t)if(e<0)for(;++e<=0;)for(;s(t,-1),!r(t););else for(;0<=--e;)for(;s(t,1),!r(t););}),r&&(o.count=(t,e)=>(Gy.setTime(+t),Wy.setTime(+e),a(Gy),a(Wy),Math.floor(r(Gy,Wy))),o.every=e=>(e=Math.floor(e),isFinite(e)&&0n(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}var Gy,Wy,Yy,Hy,Vy,Xy,Ky,Zy,Qy,Jy,t2,e2=i(()=>{Gy=new Date,Wy=new Date,Ae(jy,"timeInterval")}),r2=i(()=>{e2(),(Yy=jy(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t)).every=r=>(r=Math.floor(r),isFinite(r)&&0{t.setTime(Math.floor(t/r)*r)},(t,e)=>{t.setTime(+t+e*r)},(t,e)=>(e-t)/r):Yy:null),Yy.range}),n2=i(()=>{e2(),(Hy=jy(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds())).range}),i2=i(()=>{e2(),(Vy=jy(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes())).range,(Xy=jy(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes())).range}),a2=i(()=>{e2(),(Ky=jy(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getHours())).range,(Zy=jy(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours())).range}),s2=i(()=>{e2(),(Qy=jy(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5,t=>t.getDate()-1)).range,(Jy=jy(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1)).range,(t2=jy(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5))).range});function o2(e){return jy(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5)}function l2(e){return jy(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/6048e5)}var c2,h2,u2,d2,p2,g2,f2,m2,y2,v2,x2,b2,w2,k2,T2,_2,E2,S2,C2=i(()=>{e2(),Ae(o2,"timeWeekday"),c2=o2(0),h2=o2(1),u2=o2(2),d2=o2(3),p2=o2(4),g2=o2(5),f2=o2(6),c2.range,h2.range,u2.range,d2.range,p2.range,g2.range,f2.range,Ae(l2,"utcWeekday"),m2=l2(0),y2=l2(1),v2=l2(2),x2=l2(3),b2=l2(4),w2=l2(5),k2=l2(6),m2.range,y2.range,v2.range,x2.range,b2.range,w2.range,k2.range}),A2=i(()=>{e2(),(T2=jy(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())).range,(_2=jy(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())).range}),L2=i(()=>{e2(),(E2=jy(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear())).every=r=>isFinite(r=Math.floor(r))&&0{t.setFullYear(Math.floor(t.getFullYear()/r)*r),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e*r)}):null,E2.range,(S2=jy(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear())).every=r=>isFinite(r=Math.floor(r))&&0{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/r)*r),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e*r)}):null,S2.range});function N2(a,t,e,r,n,i){let s=[[Hy,1,1e3],[Hy,5,5e3],[Hy,15,15e3],[Hy,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[n,1,36e5],[n,3,108e5],[n,6,216e5],[n,12,432e5],[r,1,864e5],[r,2,1728e5],[e,1,6048e5],[t,1,2592e6],[t,3,7776e6],[a,1,31536e6]];function o(t,e,r){var n=et).right(s,n);return i===s.length?a.every(Wc(t/31536e6,e/31536e6,r)):0===i?Yy.every(Math.max(Wc(t,e,r),1)):([t,e]=s[n/s[i-1][2]{rh(),r2(),n2(),i2(),a2(),s2(),C2(),A2(),L2(),Ae(N2,"ticker"),[I2,M2]=N2(S2,_2,m2,t2,Zy,Xy),[R2,D2]=N2(E2,T2,c2,Qy,Ky,Vy)}),P2=i(()=>{r2(),n2(),i2(),a2(),s2(),C2(),A2(),L2(),O2()});function B2(t){var e;return 0<=t.y&&t.y<100?((e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L)).setFullYear(t.y),e):new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function F2(t){var e;return 0<=t.y&&t.y<100?((e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L))).setUTCFullYear(t.y),e):new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function $2(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function z2(t){var n=t.dateTime,i=t.date,a=t.time,e=t.periods,r=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,c=j2(e),h=G2(e),P=j2(r),B=G2(r),F=j2(s),$=G2(s),z=j2(o),q=G2(o),U=j2(l),j=G2(l),u={a:_,A:E,b:S,B:C,c:null,d:uv,e:uv,f:mv,g:Cv,G:Lv,H:dv,I:pv,j:gv,L:fv,m:yv,M:vv,p:A,q:L,Q:Qv,s:Jv,S:xv,u:bv,U:wv,V:Tv,w:_v,W:Ev,x:null,X:null,y:Sv,Y:Av,Z:Nv,"%":Zv},d={a:N,A:I,b:M,B:R,c:null,d:Iv,e:Iv,f:Pv,g:Hv,G:Xv,H:Mv,I:Rv,j:Dv,L:Ov,m:Bv,M:Fv,p:D,q:O,Q:Qv,s:Jv,S:$v,u:zv,U:qv,V:jv,w:Gv,W:Wv,x:null,X:null,y:Yv,Y:Vv,Z:Kv,"%":Zv},G={a:y,A:v,b:x,B:b,c:w,d:ev,e:ev,f:ov,g:Z2,G:K2,H:nv,I:nv,j:rv,L:sv,m:tv,M:iv,p:m,q:J2,Q:cv,s:hv,S:av,u:Y2,U:H2,V:V2,w:W2,W:X2,x:k,X:T,y:Z2,Y:K2,Z:Q2,"%":lv};function p(l,c){return function(t){var e,r,n,i=[],a=-1,s=0,o=l.length;for(t instanceof Date||(t=new Date(+t));++a[t.toLowerCase(),e]))}function W2(t,e,r){return(e=e4.exec(e.slice(r,r+1)))?(t.w=+e[0],r+e[0].length):-1}function Y2(t,e,r){return(e=e4.exec(e.slice(r,r+1)))?(t.u=+e[0],r+e[0].length):-1}function H2(t,e,r){return(e=e4.exec(e.slice(r,r+2)))?(t.U=+e[0],r+e[0].length):-1}function V2(t,e,r){return(e=e4.exec(e.slice(r,r+2)))?(t.V=+e[0],r+e[0].length):-1}function X2(t,e,r){return(e=e4.exec(e.slice(r,r+2)))?(t.W=+e[0],r+e[0].length):-1}function K2(t,e,r){return(e=e4.exec(e.slice(r,r+4)))?(t.y=+e[0],r+e[0].length):-1}function Z2(t,e,r){return(e=e4.exec(e.slice(r,r+2)))?(t.y=+e[0]+(68<+e[0]?1900:2e3),r+e[0].length):-1}function Q2(t,e,r){return(e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6)))?(t.Z=e[1]?0:-(e[2]+(e[3]||"00")),r+e[0].length):-1}function J2(t,e,r){return(e=e4.exec(e.slice(r,r+1)))?(t.q=3*e[0]-3,r+e[0].length):-1}function tv(t,e,r){return(e=e4.exec(e.slice(r,r+2)))?(t.m=e[0]-1,r+e[0].length):-1}function ev(t,e,r){return(e=e4.exec(e.slice(r,r+2)))?(t.d=+e[0],r+e[0].length):-1}function rv(t,e,r){return(e=e4.exec(e.slice(r,r+3)))?(t.m=0,t.d=+e[0],r+e[0].length):-1}function nv(t,e,r){return(e=e4.exec(e.slice(r,r+2)))?(t.H=+e[0],r+e[0].length):-1}function iv(t,e,r){return(e=e4.exec(e.slice(r,r+2)))?(t.M=+e[0],r+e[0].length):-1}function av(t,e,r){return(e=e4.exec(e.slice(r,r+2)))?(t.S=+e[0],r+e[0].length):-1}function sv(t,e,r){return(e=e4.exec(e.slice(r,r+3)))?(t.L=+e[0],r+e[0].length):-1}function ov(t,e,r){return(e=e4.exec(e.slice(r,r+6)))?(t.L=Math.floor(e[0]/1e3),r+e[0].length):-1}function lv(t,e,r){return(e=r4.exec(e.slice(r,r+1)))?r+e[0].length:-1}function cv(t,e,r){return(e=e4.exec(e.slice(r)))?(t.Q=+e[0],r+e[0].length):-1}function hv(t,e,r){return(e=e4.exec(e.slice(r)))?(t.s=+e[0],r+e[0].length):-1}function uv(t,e){return q2(t.getDate(),e,2)}function dv(t,e){return q2(t.getHours(),e,2)}function pv(t,e){return q2(t.getHours()%12||12,e,2)}function gv(t,e){return q2(1+Qy.count(E2(t),t),e,3)}function fv(t,e){return q2(t.getMilliseconds(),e,3)}function mv(t,e){return fv(t,e)+"000"}function yv(t,e){return q2(t.getMonth()+1,e,2)}function vv(t,e){return q2(t.getMinutes(),e,2)}function xv(t,e){return q2(t.getSeconds(),e,2)}function bv(t){return 0===(t=t.getDay())?7:t}function wv(t,e){return q2(c2.count(E2(t)-1,t),e,2)}function kv(t){var e=t.getDay();return 4<=e||0===e?p2(t):p2.ceil(t)}function Tv(t,e){return t=kv(t),q2(p2.count(E2(t),t)+(4===E2(t).getDay()),e,2)}function _v(t){return t.getDay()}function Ev(t,e){return q2(h2.count(E2(t)-1,t),e,2)}function Sv(t,e){return q2(t.getFullYear()%100,e,2)}function Cv(t,e){return q2((t=kv(t)).getFullYear()%100,e,2)}function Av(t,e){return q2(t.getFullYear()%1e4,e,4)}function Lv(t,e){var r=t.getDay();return q2((t=4<=r||0===r?p2(t):p2.ceil(t)).getFullYear()%1e4,e,4)}function Nv(t){return(0<(t=t.getTimezoneOffset())?"-":(t*=-1,"+"))+q2(t/60|0,"0",2)+q2(t%60,"0",2)}function Iv(t,e){return q2(t.getUTCDate(),e,2)}function Mv(t,e){return q2(t.getUTCHours(),e,2)}function Rv(t,e){return q2(t.getUTCHours()%12||12,e,2)}function Dv(t,e){return q2(1+Jy.count(S2(t),t),e,3)}function Ov(t,e){return q2(t.getUTCMilliseconds(),e,3)}function Pv(t,e){return Ov(t,e)+"000"}function Bv(t,e){return q2(t.getUTCMonth()+1,e,2)}function Fv(t,e){return q2(t.getUTCMinutes(),e,2)}function $v(t,e){return q2(t.getUTCSeconds(),e,2)}function zv(t){return 0===(t=t.getUTCDay())?7:t}function qv(t,e){return q2(m2.count(S2(t)-1,t),e,2)}function Uv(t){var e=t.getUTCDay();return 4<=e||0===e?b2(t):b2.ceil(t)}function jv(t,e){return t=Uv(t),q2(b2.count(S2(t),t)+(4===S2(t).getUTCDay()),e,2)}function Gv(t){return t.getUTCDay()}function Wv(t,e){return q2(y2.count(S2(t)-1,t),e,2)}function Yv(t,e){return q2(t.getUTCFullYear()%100,e,2)}function Hv(t,e){return q2((t=Uv(t)).getUTCFullYear()%100,e,2)}function Vv(t,e){return q2(t.getUTCFullYear()%1e4,e,4)}function Xv(t,e){var r=t.getUTCDay();return q2((t=4<=r||0===r?b2(t):b2.ceil(t)).getUTCFullYear()%1e4,e,4)}function Kv(){return"+0000"}function Zv(){return"%"}function Qv(t){return+t}function Jv(t){return Math.floor(+t/1e3)}var t4,e4,r4,n4,i4=i(()=>{P2(),Ae(B2,"localDate"),Ae(F2,"utcDate"),Ae($2,"newDate"),Ae(z2,"formatLocale"),t4={"-":"",_:" ",0:"0"},e4=/^\s*\d+/,r4=/^%/,n4=/[\\^$*+?|[\]().{}]/g,Ae(q2,"pad"),Ae(U2,"requote"),Ae(j2,"formatRe"),Ae(G2,"formatLookup"),Ae(W2,"parseWeekdayNumberSunday"),Ae(Y2,"parseWeekdayNumberMonday"),Ae(H2,"parseWeekNumberSunday"),Ae(V2,"parseWeekNumberISO"),Ae(X2,"parseWeekNumberMonday"),Ae(K2,"parseFullYear"),Ae(Z2,"parseYear"),Ae(Q2,"parseZone"),Ae(J2,"parseQuarter"),Ae(tv,"parseMonthNumber"),Ae(ev,"parseDayOfMonth"),Ae(rv,"parseDayOfYear"),Ae(nv,"parseHour24"),Ae(iv,"parseMinutes"),Ae(av,"parseSeconds"),Ae(sv,"parseMilliseconds"),Ae(ov,"parseMicroseconds"),Ae(lv,"parseLiteralPercent"),Ae(cv,"parseUnixTimestamp"),Ae(hv,"parseUnixTimestampSeconds"),Ae(uv,"formatDayOfMonth"),Ae(dv,"formatHour24"),Ae(pv,"formatHour12"),Ae(gv,"formatDayOfYear"),Ae(fv,"formatMilliseconds"),Ae(mv,"formatMicroseconds"),Ae(yv,"formatMonthNumber"),Ae(vv,"formatMinutes"),Ae(xv,"formatSeconds"),Ae(bv,"formatWeekdayNumberMonday"),Ae(wv,"formatWeekNumberSunday"),Ae(kv,"dISO"),Ae(Tv,"formatWeekNumberISO"),Ae(_v,"formatWeekdayNumberSunday"),Ae(Ev,"formatWeekNumberMonday"),Ae(Sv,"formatYear"),Ae(Cv,"formatYearISO"),Ae(Av,"formatFullYear"),Ae(Lv,"formatFullYearISO"),Ae(Nv,"formatZone"),Ae(Iv,"formatUTCDayOfMonth"),Ae(Mv,"formatUTCHour24"),Ae(Rv,"formatUTCHour12"),Ae(Dv,"formatUTCDayOfYear"),Ae(Ov,"formatUTCMilliseconds"),Ae(Pv,"formatUTCMicroseconds"),Ae(Bv,"formatUTCMonthNumber"),Ae(Fv,"formatUTCMinutes"),Ae($v,"formatUTCSeconds"),Ae(zv,"formatUTCWeekdayNumberMonday"),Ae(qv,"formatUTCWeekNumberSunday"),Ae(Uv,"UTCdISO"),Ae(jv,"formatUTCWeekNumberISO"),Ae(Gv,"formatUTCWeekdayNumberSunday"),Ae(Wv,"formatUTCWeekNumberMonday"),Ae(Yv,"formatUTCYear"),Ae(Hv,"formatUTCYearISO"),Ae(Vv,"formatUTCFullYear"),Ae(Xv,"formatUTCFullYearISO"),Ae(Kv,"formatUTCZone"),Ae(Zv,"formatLiteralPercent"),Ae(Qv,"formatUnixTimestamp"),Ae(Jv,"formatUnixTimestampSeconds")});function a4(t){return s4=z2(t),o4=s4.format,s4.parse,s4.utcFormat,s4.utcParse,s4}var s4,o4,l4=i(()=>{i4(),a4({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),Ae(a4,"defaultLocale")}),c4=i(()=>{l4()});function h4(t){return new Date(t)}function u4(t){return t instanceof Date?+t:+new Date(+t)}function d4(r,n,e,i,a,s,o,l,c,h){var u=Ry(),d=u.invert,p=u.domain,g=h(".%L"),f=h(":%S"),m=h("%I:%M"),y=h("%I %p"),v=h("%a %d"),x=h("%b %d"),b=h("%B"),w=h("%Y");function k(t){return(c(t){P2(),c4(),Oy(),my(),Uy(),Ae(h4,"date"),Ae(u4,"number"),Ae(d4,"calendar"),Ae(p4,"time")}),f4=i(()=>{wy(),zy(),xy(),g4()});function m4(t){for(var e=t.length/6|0,r=new Array(e),n=0;n{Ae(m4,"default")}),x4=i(()=>{v4(),y4=m4("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),b4=i(()=>{x4()});function w4(t){return Ae(function(){return t},"constant")}var k4=i(()=>{Ae(w4,"default")});function T4(t){return 1{E4=Math.abs,S4=Math.atan2,C4=Math.cos,A4=Math.max,L4=Math.min,N4=Math.sin,I4=Math.sqrt,M4=1e-12,R4=Math.PI,D4=R4/2,O4=2*R4,Ae(T4,"acos"),Ae(_4,"asin")});function B4(r){let n=3;return r.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);n=e}return r},()=>new fm(n)}var F4=i(()=>{ym(),Ae(B4,"withPath")});function $4(t){return t.innerRadius}function z4(t){return t.outerRadius}function q4(t){return t.startAngle}function U4(t){return t.endAngle}function j4(t){return t&&t.padAngle}function G4(t,e,r,n,i,a,s,o){var l=(o-=a)*(r-=t)-(s-=i)*(n-=e);if(!(l*lM4?(n+=u*=C?1:-1,i-=u):(a=0,n=i=(_+E)/2),(s-=2*d)>M4?(e+=d*=C?1:-1,r-=d):(s=0,e=r=(_+E)/2)),h=T*C4(e),u=T*N4(e),d=k*C4(i),_=k*N4(i),M4{k4(),P4(),F4(),Ae($4,"arcInnerRadius"),Ae(z4,"arcOuterRadius"),Ae(q4,"arcStartAngle"),Ae(U4,"arcEndAngle"),Ae(j4,"arcPadAngle"),Ae(G4,"intersect"),Ae(W4,"cornerTangents"),Ae(Y4,"default")});function V4(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}var X4=i(()=>{Array.prototype.slice,Ae(V4,"default")});function K4(t){this._context=t}function Z4(t){return new K4(t)}var Q4=i(()=>{Ae(K4,"Linear"),K4.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._point=0},"lineStart"),lineEnd:Ae(function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}},"point")},Ae(Z4,"default")});function J4(t){return t[0]}function tx(t){return t[1]}var ex=i(()=>{Ae(J4,"x"),Ae(tx,"y")});function rx(s,o){var l=w4(!0),c=null,h=Z4,u=null,d=B4(e);function e(t){var e,r,n,i=(t=V4(t)).length,a=!1;for(null==c&&(u=h(n=d())),e=0;e<=i;++e)!(e{X4(),k4(),Q4(),F4(),ex(),Ae(rx,"default")});function ix(t,e){return e{Ae(ix,"default")});function sx(t){return t}var ox=i(()=>{Ae(sx,"default")});function lx(){var p=sx,g=ix,f=null,m=w4(0),y=w4(O4),v=w4(0);function e(r){for(var t,e,n,i=(r=V4(r)).length,a=0,s=new Array(i),o=new Array(i),l=+m.apply(this,arguments),c=Math.min(O4,Math.max(-O4,y.apply(this,arguments)-l)),h=Math.min(Math.abs(c)/i,v.apply(this,arguments)),u=h*(c<0?-1:1),d=0;d{X4(),k4(),ax(),ox(),P4(),Ae(lx,"default")});function hx(t){return new dx(t,!0)}function ux(t){return new dx(t,!1)}var dx,px=i(()=>{dx=class{static{Ae(this,"Bump")}constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}},Ae(hx,"bumpX"),Ae(ux,"bumpY")});function gx(){}var fx=i(()=>{Ae(gx,"default")});function mx(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function yx(t){this._context=t}function vx(t){return new yx(t)}var xx=i(()=>{Ae(mx,"point"),Ae(yx,"Basis"),yx.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){switch(this._point){case 3:mx(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},Ae(vx,"default")});function bx(t){this._context=t}function wx(t){return new bx(t)}var kx=i(()=>{fx(),xx(),Ae(bx,"BasisClosed"),bx.prototype={areaStart:gx,areaEnd:gx,lineStart:Ae(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},"lineEnd"),point:Ae(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:mx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},Ae(wx,"default")});function Tx(t){this._context=t}function _x(t){return new Tx(t)}var Ex=i(()=>{xx(),Ae(Tx,"BasisOpen"),Tx.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:mx(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},Ae(_x,"default")});function Sx(t,e){this._basis=new yx(t),this._beta=e}var Cx,Ax=i(()=>{xx(),Ae(Sx,"Bundle"),Sx.prototype={lineStart:Ae(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:Ae(function(){var t=this._x,e=this._y,r=t.length-1;if(0{Ae(Lx,"point"),Ae(Nx,"Cardinal"),Nx.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Lx(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Lx(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},Ix=Ae(function e(r){function t(t){return new Nx(t,r)}return Ae(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function Rx(t,e){this._context=t,this._k=(1-e)/6}var Dx,Ox=i(()=>{fx(),Mx(),Ae(Rx,"CardinalClosed"),Rx.prototype={areaStart:gx,areaEnd:gx,lineStart:Ae(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},"lineEnd"),point:Ae(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Lx(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},Dx=Ae(function e(r){function t(t){return new Rx(t,r)}return Ae(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function Px(t,e){this._context=t,this._k=(1-e)/6}var Bx,Fx=i(()=>{Mx(),Ae(Px,"CardinalOpen"),Px.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Lx(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},Bx=Ae(function e(r){function t(t){return new Px(t,r)}return Ae(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function $x(t,e,r){var n,i,a=t._x1,s=t._y1,o=t._x2,l=t._y2;t._l01_a>M4&&(n=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,i=3*t._l01_a*(t._l01_a+t._l12_a),a=(a*n-t._x0*t._l12_2a+t._x2*t._l01_2a)/i,s=(s*n-t._y0*t._l12_2a+t._y2*t._l01_2a)/i),t._l23_a>M4&&(n=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,i=3*t._l23_a*(t._l23_a+t._l12_a),o=(o*n+t._x1*t._l23_2a-e*t._l12_2a)/i,l=(l*n+t._y1*t._l23_2a-r*t._l12_2a)/i),t._context.bezierCurveTo(a,s,o,l,t._x2,t._y2)}function zx(t,e){this._context=t,this._alpha=e}var qx,Ux=i(()=>{P4(),Mx(),Ae($x,"point"),Ae(zx,"CatmullRom"),zx.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:Ae(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:$x(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},qx=Ae(function e(r){function t(t){return r?new zx(t,r):new Nx(t,0)}return Ae(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function jx(t,e){this._context=t,this._alpha=e}var Gx,Wx=i(()=>{Ox(),fx(),Ux(),Ae(jx,"CatmullRomClosed"),jx.prototype={areaStart:gx,areaEnd:gx,lineStart:Ae(function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:Ae(function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},"lineEnd"),point:Ae(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:$x(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},Gx=Ae(function e(r){function t(t){return r?new jx(t,r):new Rx(t,0)}return Ae(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function Yx(t,e){this._context=t,this._alpha=e}var Hx,Vx=i(()=>{Fx(),Ux(),Ae(Yx,"CatmullRomOpen"),Yx.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},"lineStart"),lineEnd:Ae(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))),this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:$x(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},Hx=Ae(function e(r){function t(t){return r?new Yx(t,r):new Px(t,0)}return Ae(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function Xx(t){this._context=t}function Kx(t){return new Xx(t)}var Zx=i(()=>{fx(),Ae(Xx,"LinearClosed"),Xx.prototype={areaStart:gx,areaEnd:gx,lineStart:Ae(function(){this._point=0},"lineStart"),lineEnd:Ae(function(){this._point&&this._context.closePath()},"lineEnd"),point:Ae(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")},Ae(Kx,"default")});function Qx(t){return t<0?-1:1}function Jx(t,e,r){var n=t._x1-t._x0,e=e-t._x1,i=(t._y1-t._y0)/(n||e<0&&-0),t=(i*e+(r=(r-t._y1)/(e||n<0&&-0))*n)/(n+e);return(Qx(i)+Qx(r))*Math.min(Math.abs(i),Math.abs(r),.5*Math.abs(t))||0}function tb(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function eb(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-n)/3;t._context.bezierCurveTo(n+o,i+o*e,a-o,s-o*r,a,s)}function rb(t){this._context=t}function nb(t){this._context=new ib(t)}function ib(t){this._context=t}function ab(t){return new rb(t)}function sb(t){return new nb(t)}var ob=i(()=>{Ae(Qx,"sign"),Ae(Jx,"slope3"),Ae(tb,"slope2"),Ae(eb,"point"),Ae(rb,"MonotoneX"),rb.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:eb(this,this._t0,tb(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:Ae(function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,eb(this,tb(this,r=Jx(this,t,e)),r);break;default:eb(this,this._t0,r=Jx(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")},Ae(nb,"MonotoneY"),(nb.prototype=Object.create(rb.prototype)).point=function(t,e){rb.prototype.point.call(this,e,t)},Ae(ib,"ReflectContext"),ib.prototype={moveTo:Ae(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:Ae(function(){this._context.closePath()},"closePath"),lineTo:Ae(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:Ae(function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)},"bezierCurveTo")},Ae(ab,"monotoneX"),Ae(sb,"monotoneY")});function lb(t){this._context=t}function cb(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),s=new Array(n);for(a[i[0]=0]=2,s[0]=t[0]+2*t[1],e=1;e{Ae(lb,"Natural"),lb.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:Ae(function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var n=cb(t),i=cb(e),a=0,s=1;s{Ae(db,"Step"),db.prototype={areaStart:Ae(function(){this._line=0},"areaStart"),areaEnd:Ae(function(){this._line=NaN},"areaEnd"),lineStart:Ae(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:Ae(function(){0{H4(),nx(),cx(),kx(),Ex(),xx(),px(),Ax(),Ox(),Fx(),Mx(),Wx(),Vx(),Ux(),Zx(),Q4(),ob(),ub(),mb()}),vb=i(()=>{}),xb=i(()=>{});function bb(t,e,r){this.k=t,this.x=e,this.y=r}function wb(t){for(;!t.__zoom;)if(!(t=t.parentNode))return kb;return t.__zoom}var kb,Tb,_b,Eb,Sb,Cb,Ab,Lb,Nb,Ib,Mb,Rb,Db,Ob,Pb,Bb,Fb,$b,zb,qb,Ub,jb,Gb,Wb,Yb,Hb,Vb,Xb,Kb,Zb,Qb,Jb,t3=i(()=>{Ae(bb,"Transform"),bb.prototype={constructor:bb,scale:Ae(function(t){return 1===t?this:new bb(this.k*t,this.x,this.y)},"scale"),translate:Ae(function(t,e){return 0===t&0===e?this:new bb(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply:Ae(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},"apply"),applyX:Ae(function(t){return t*this.k+this.x},"applyX"),applyY:Ae(function(t){return t*this.k+this.y},"applyY"),invert:Ae(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},"invert"),invertX:Ae(function(t){return(t-this.x)/this.k},"invertX"),invertY:Ae(function(t){return(t-this.y)/this.k},"invertY"),rescaleX:Ae(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},"rescaleX"),rescaleY:Ae(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},"rescaleY"),toString:Ae(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")},kb=new bb(1,0,0),wb.prototype=bb.prototype,Ae(wb,"transform")}),e3=i(()=>{}),r3=i(()=>{Kf(),vb(),xb(),t3(),e3()}),n3=i(()=>{r3(),t3()}),i3=i(()=>{rh(),mh(),om(),vm(),_p(),xm(),bm(),Ch(),x0(),wm(),Gf(),km(),_m(),hy(),uy(),dy(),T1(),ym(),py(),Tm(),gy(),f4(),b4(),v0(),yb(),P2(),c4(),H1(),Kf(),n3()}),a3=C(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.whitespaceEscapeCharsRegex=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|:)/gim,t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"}),s3=C(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var a=a3();function s(t){return-1{Tb=M(s3(),1),al(),_b=Ae((t,e)=>{var r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(var n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),Eb=Ae((t,e)=>{e={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"},_b(t,e).lower()},"drawBackgroundRect"),Sb=Ae((t,e)=>{var r=e.text.replace(Co," "),n=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),e.class&&t.attr("class",e.class),t.append("tspan"));return n.attr("x",e.x+2*e.textMargin),n.text(r),t},"drawText"),Cb=Ae((t,e,r,n)=>{(t=t.append("image")).attr("x",e),t.attr("y",r),e=(0,Tb.sanitizeUrl)(n),t.attr("xlink:href",e)},"drawImage"),Ab=Ae((t,e,r,n)=>{(t=t.append("use")).attr("x",e),t.attr("y",r),e=(0,Tb.sanitizeUrl)(n),t.attr("xlink:href","#"+e)},"drawEmbeddedImage"),Lb=Ae(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Nb=Ae(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),l3=i(()=>{function e(t,e,r,n,i,a,s){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(t),s)}function l(t,e,r,n,i,a,s,o){var{fontSize:l,fontFamily:c,fontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;t{let n=t.append("g"),i=0;for(var a of e){var s,o=a.textColor||"#444444",l=a.lineColor||"#444444",c=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,l=(0===i?((s=n.append("line")).attr("x1",a.startPoint.x),s.attr("y1",a.startPoint.y),s.attr("x2",a.endPoint.x),s.attr("y2",a.endPoint.y),s.attr("stroke-width","1"),s.attr("stroke",l),s.style("fill","none"),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)"),i=-1):((s=n.append("path")).attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)")),r.messageFont());Yb(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+h,a.label.width,a.label.height,{fill:o},l),a.techn&&""!==a.techn.text&&(l=r.messageFont(),Yb(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+h,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:o,"font-style":"italic"},l))}},"drawRels"),Ob=Ae(function(t,e,r){let n=t.append("g"),i=e.bgColor||"none",a=e.borderColor||"#444444",s=e.fontColor||"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(e.nodeType&&(o={"stroke-width":1}),t={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o},Mb(n,t),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=s,Yb(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},l),e.type&&""!==e.type.text&&((l=r.boundaryFont()).fontColor=s,Yb(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},l)),e.descr&&""!==e.descr.text&&((l=r.boundaryFont()).fontSize=l.fontSize-2,l.fontColor=s,Yb(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},l))},"drawBoundary"),Pb=Ae(function(t,e,r){let n=e.bgColor||r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor||r[e.typeC4Shape.text+"_border_color"],a=e.fontColor||"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}var o=t.append("g"),l=(o.attr("class","person-man"),Lb());switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=n,l.width=e.width,l.height=e.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},Mb(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}switch(t=Wb(r,e.typeC4Shape.text),o.append("text").attr("fill",a).attr("font-family",t.fontFamily).attr("font-size",t.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":Rb(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s)}let c=r[e.typeC4Shape.text+"Font"]();return c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,Yb(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},c),(c=r[e.typeC4Shape.text+"Font"]()).fontColor=a,e.techn&&""!==e.techn?.text?Yb(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},c):e.type&&""!==e.type.text&&Yb(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},c),e.descr&&""!==e.descr.text&&((c=r.personFont()).fontColor=a,Yb(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},c)),e.height},"drawC4Shape"),Bb=Ae(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Fb=Ae(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),$b=Ae(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),zb=Ae(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),qb=Ae(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),Ub=Ae(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),jb=Ae(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),Gb=Ae(function(t){(t=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4)).append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),t.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),Wb=Ae((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),Ae(e,"byText"),Ae(l,"byTspan"),Ae(r,"byFo"),Ae(g,"_setTextAttrs"),Yb=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},Hb={drawRect:Mb,drawBoundary:Ob,drawC4Shape:Pb,drawRels:Db,drawImage:Rb,insertArrowHead:zb,insertArrowEnd:qb,insertArrowFilledHead:Ub,insertDynamicNumber:jb,insertArrowCrossHead:Gb,insertDatabaseIcon:Bb,insertComputerIcon:Fb,insertClockIcon:$b}}),c3=i(()=>{Vb="object"==typeof global&&global&&global.Object===Object&&global,Xb=Vb}),h3=i(()=>{c3(),Kb="object"==typeof self&&self&&self.Object===Object&&self,Kb=Xb||Kb||Function("return this")(),Zb=Kb}),u3=i(()=>{h3(),Qb=Zb.Symbol,Jb=Qb});function d3(t){var e=g3.call(t,m3),r=t[m3];try{var n=!(t[m3]=void 0)}catch{}var i=f3.call(t);return n&&(e?t[m3]=r:delete t[m3]),i}var p3,g3,f3,m3,y3,v3=i(()=>{u3(),p3=Object.prototype,g3=p3.hasOwnProperty,f3=p3.toString,m3=Jb?Jb.toStringTag:void 0,Ae(d3,"getRawTag"),y3=d3});function x3(t){return w3.call(t)}var b3,w3,k3,T3=i(()=>{b3=Object.prototype,w3=b3.toString,Ae(x3,"objectToString"),k3=x3});function _3(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(E3&&E3 in Object(t)?y3:k3)(t)}var E3,S3,C3=i(()=>{u3(),v3(),T3(),E3=Jb?Jb.toStringTag:void 0,Ae(_3,"baseGetTag"),S3=_3});function A3(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var L3,N3=i(()=>{Ae(A3,"isObject"),L3=A3});function I3(t){return!!L3(t)&&("[object Function]"==(t=S3(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}var M3,R3,D3,O3=i(()=>{C3(),N3(),Ae(I3,"isFunction"),M3=I3}),P3=i(()=>{h3(),R3=Zb["__core-js_shared__"],D3=R3});function B3(t){return!!F3&&F3 in t}var F3,$3,z3=i(()=>{var t;P3(),t=/[^.]+$/.exec(D3&&D3.keys&&D3.keys.IE_PROTO||""),F3=t?"Symbol(src)_1."+t:"",Ae(B3,"isMasked"),$3=B3});function q3(t){if(null!=t){try{return j3.call(t)}catch{}try{return t+""}catch{}}return""}var U3,j3,G3,W3=i(()=>{U3=Function.prototype,j3=U3.toString,Ae(q3,"toSource"),G3=q3});function Y3(t){return!(!L3(t)||$3(t))&&(M3(t)?Z3:V3).test(G3(t))}var H3,V3,X3,K3,Z3,Q3,J3=i(()=>{O3(),z3(),N3(),W3(),H3=/[\\^$.*+?()[\]{}|]/g,V3=/^\[object .+?Constructor\]$/,X3=Function.prototype,K3=Object.prototype,X3=X3.toString,K3=K3.hasOwnProperty,Z3=RegExp("^"+X3.call(K3).replace(H3,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ae(Y3,"baseIsNative"),Q3=Y3});function t5(t,e){return t?.[e]}var e5,r5=i(()=>{Ae(t5,"getValue"),e5=t5});function n5(t,e){return t=e5(t,e),Q3(t)?t:void 0}var i5,a5,s5,o5=i(()=>{J3(),r5(),Ae(n5,"getNative"),i5=n5}),l5=i(()=>{o5(),a5=i5(Object,"create"),s5=a5});function c5(){this.__data__=s5?s5(null):{},this.size=0}var h5,u5=i(()=>{l5(),Ae(c5,"hashClear"),h5=c5});function d5(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}var p5,g5=i(()=>{Ae(d5,"hashDelete"),p5=d5});function f5(t){var e,r=this.__data__;return s5?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:y5.call(r,t)?r[t]:void 0}var m5,y5,v5,x5=i(()=>{l5(),m5=Object.prototype,y5=m5.hasOwnProperty,Ae(f5,"hashGet"),v5=f5});function b5(t){var e=this.__data__;return s5?void 0!==e[t]:k5.call(e,t)}var w5,k5,T5,_5=i(()=>{l5(),w5=Object.prototype,k5=w5.hasOwnProperty,Ae(b5,"hashHas"),T5=b5});function E5(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=s5&&void 0===e?"__lodash_hash_undefined__":e,this}var S5,C5=i(()=>{l5(),Ae(E5,"hashSet"),S5=E5});function A5(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{u5(),g5(),x5(),_5(),C5(),Ae(A5,"Hash"),A5.prototype.clear=h5,A5.prototype.delete=p5,A5.prototype.get=v5,A5.prototype.has=T5,A5.prototype.set=S5,L5=A5});function I5(){this.__data__=[],this.size=0}var M5,R5=i(()=>{Ae(I5,"listCacheClear"),M5=I5});function D5(t,e){return t===e||t!=t&&e!=e}var O5,P5=i(()=>{Ae(D5,"eq"),O5=D5});function B5(t,e){for(var r=t.length;r--;)if(O5(t[r][0],e))return r;return-1}var F5,$5=i(()=>{P5(),Ae(B5,"assocIndexOf"),F5=B5});function z5(t){var e=this.__data__;return!((t=F5(e,t))<0||(t==e.length-1?e.pop():U5.call(e,t,1),--this.size,0))}var q5,U5,j5,G5=i(()=>{$5(),q5=Array.prototype,U5=q5.splice,Ae(z5,"listCacheDelete"),j5=z5});function W5(t){var e=this.__data__;return(t=F5(e,t))<0?void 0:e[t][1]}var Y5,H5=i(()=>{$5(),Ae(W5,"listCacheGet"),Y5=W5});function V5(t){return-1{$5(),Ae(V5,"listCacheHas"),X5=V5});function Z5(t,e){var r=this.__data__,n=F5(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Q5,J5=i(()=>{$5(),Ae(Z5,"listCacheSet"),Q5=Z5});function t6(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{R5(),G5(),H5(),K5(),J5(),Ae(t6,"ListCache"),t6.prototype.clear=M5,t6.prototype.delete=j5,t6.prototype.get=Y5,t6.prototype.has=X5,t6.prototype.set=Q5,e6=t6}),a6=i(()=>{o5(),h3(),r6=i5(Zb,"Map"),n6=r6});function s6(){this.size=0,this.__data__={hash:new L5,map:new(n6||e6),string:new L5}}var o6,l6=i(()=>{N5(),i6(),a6(),Ae(s6,"mapCacheClear"),o6=s6});function c6(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}var h6,u6=i(()=>{Ae(c6,"isKeyable"),h6=c6});function d6(t,e){return t=t.__data__,h6(e)?t["string"==typeof e?"string":"hash"]:t.map}var p6,g6=i(()=>{u6(),Ae(d6,"getMapData"),p6=d6});function f6(t){return t=p6(this,t).delete(t),this.size-=t?1:0,t}var m6,y6=i(()=>{g6(),Ae(f6,"mapCacheDelete"),m6=f6});function v6(t){return p6(this,t).get(t)}var x6,b6=i(()=>{g6(),Ae(v6,"mapCacheGet"),x6=v6});function w6(t){return p6(this,t).has(t)}var k6,T6=i(()=>{g6(),Ae(w6,"mapCacheHas"),k6=w6});function _6(t,e){var r=p6(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var E6,S6=i(()=>{g6(),Ae(_6,"mapCacheSet"),E6=_6});function C6(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{l6(),y6(),b6(),T6(),S6(),Ae(C6,"MapCache"),C6.prototype.clear=o6,C6.prototype.delete=m6,C6.prototype.get=x6,C6.prototype.has=k6,C6.prototype.set=E6,A6=C6});function N6(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError(I6);var a=Ae(function(){var t=arguments,e=i?i.apply(this,t):t[0],r=a.cache;return r.has(e)?r.get(e):(t=n.apply(this,t),a.cache=r.set(e,t)||r,t)},"memoized");return a.cache=new(N6.Cache||A6),a}var I6,M6,R6=i(()=>{L6(),I6="Expected a function",Ae(N6,"memoize"),N6.Cache=A6,M6=N6});function D6(){this.__data__=new e6,this.size=0}var O6,P6=i(()=>{i6(),Ae(D6,"stackClear"),O6=D6});function B6(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t}var F6,$6=i(()=>{Ae(B6,"stackDelete"),F6=B6});function z6(t){return this.__data__.get(t)}var q6,U6=i(()=>{Ae(z6,"stackGet"),q6=z6});function j6(t){return this.__data__.has(t)}var G6,W6=i(()=>{Ae(j6,"stackHas"),G6=j6});function Y6(t,e){var r=this.__data__;if(r instanceof e6){var n=r.__data__;if(!n6||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new A6(n)}return r.set(t,e),this.size=r.size,this}var H6,V6=i(()=>{i6(),a6(),L6(),Ae(Y6,"stackSet"),H6=Y6});function X6(t){t=this.__data__=new e6(t),this.size=t.size}var K6,Z6,Q6,J6=i(()=>{i6(),P6(),$6(),U6(),W6(),V6(),Ae(X6,"Stack"),X6.prototype.clear=O6,X6.prototype.delete=F6,X6.prototype.get=q6,X6.prototype.has=G6,X6.prototype.set=H6,K6=X6}),t7=i(()=>{o5(),Z6=function(){try{var t=i5(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Q6=Z6});function e7(t,e,r){"__proto__"==e&&Q6?Q6(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var r7,n7=i(()=>{t7(),Ae(e7,"baseAssignValue"),r7=e7});function i7(t,e,r){(void 0===r||O5(t[e],r))&&(void 0!==r||e in t)||r7(t,e,r)}var a7,s7=i(()=>{n7(),P5(),Ae(i7,"assignMergeValue"),a7=i7});function o7(l){return function(t,e,r){for(var n=-1,i=Object(t),a=r(t),s=a.length;s--;){var o=a[l?s:++n];if(!1===e(i[o],o,i))break}return t}}var l7,c7,h7,u7=i(()=>{Ae(o7,"createBaseFor"),l7=o7}),d7=i(()=>{u7(),c7=l7(),h7=c7});function p7(t,e){return e?t.slice():(e=t.length,e=m7?m7(e):new t.constructor(e),t.copy(e),e)}var g7,f7,m7,y7,v7,x7,b7=i(()=>{h3(),g7="object"==typeof exports&&exports&&!exports.nodeType&&exports,f7=(f7=g7&&"object"==typeof module&&module&&!module.nodeType&&module)&&f7.exports===g7?Zb.Buffer:void 0,m7=f7?f7.allocUnsafe:void 0,Ae(p7,"cloneBuffer"),y7=p7}),w7=i(()=>{h3(),v7=Zb.Uint8Array,x7=v7});function k7(t){var e=new t.constructor(t.byteLength);return new x7(e).set(new x7(t)),e}var T7,_7=i(()=>{w7(),Ae(k7,"cloneArrayBuffer"),T7=k7});function E7(t,e){return e=e?T7(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)}var S7,C7=i(()=>{_7(),Ae(E7,"cloneTypedArray"),S7=E7});function A7(t,e){var r=-1,n=t.length;for(e=e||Array(n);++r{Ae(A7,"copyArray"),L7=A7}),R7=i(()=>{function e(){}N3(),N7=Object.create,Ae(e,"object"),I7=function(t){return L3(t)?N7?N7(t):(e.prototype=t,t=new e,e.prototype=void 0,t):{}}});function D7(e,r){return function(t){return e(r(t))}}var O7,P7,B7,F7=i(()=>{Ae(D7,"overArg"),O7=D7}),$7=i(()=>{F7(),P7=O7(Object.getPrototypeOf,Object),B7=P7});function z7(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||q7)}var q7,U7,j7=i(()=>{q7=Object.prototype,Ae(z7,"isPrototype"),U7=z7});function G7(t){return"function"!=typeof t.constructor||U7(t)?{}:I7(B7(t))}var W7,Y7=i(()=>{R7(),$7(),j7(),Ae(G7,"initCloneObject"),W7=G7});function H7(t){return null!=t&&"object"==typeof t}var V7,X7=i(()=>{Ae(H7,"isObjectLike"),V7=H7});function K7(t){return V7(t)&&"[object Arguments]"==S3(t)}var Z7,Q7,J7,tw,ew,rw,nw,iw=i(()=>{C3(),X7(),Ae(K7,"baseIsArguments"),Z7=K7}),aw=i(()=>{iw(),X7(),tw=Object.prototype,Q7=tw.hasOwnProperty,J7=tw.propertyIsEnumerable,tw=Z7(function(){return arguments}())?Z7:function(t){return V7(t)&&Q7.call(t,"callee")&&!J7.call(t,"callee")},ew=tw}),sw=i(()=>{rw=Array.isArray,nw=rw});function ow(t){return"number"==typeof t&&-1{Ae(ow,"isLength"),lw=ow});function hw(t){return null!=t&&lw(t.length)&&!M3(t)}var uw,dw=i(()=>{O3(),cw(),Ae(hw,"isArrayLike"),uw=hw});function pw(t){return V7(t)&&uw(t)}var gw,fw=i(()=>{dw(),X7(),Ae(pw,"isArrayLikeObject"),gw=pw});function mw(){return!1}var yw,vw,xw,bw,ww=i(()=>{Ae(mw,"stubFalse"),yw=mw}),kw=i(()=>{h3(),ww(),xw="object"==typeof exports&&exports&&!exports.nodeType&&exports,vw=(vw=xw&&"object"==typeof module&&module&&!module.nodeType&&module)&&vw.exports===xw?Zb.Buffer:void 0,xw=vw?vw.isBuffer:void 0,bw=xw||yw});function Tw(t){return!(!V7(t)||"[object Object]"!=S3(t))&&(null===(t=B7(t))||"function"==typeof(t=Cw.call(t,"constructor")&&t.constructor)&&t instanceof t&&Sw.call(t)==Aw)}var _w,Ew,Sw,Cw,Aw,Lw,Nw=i(()=>{C3(),$7(),X7(),_w=Function.prototype,Ew=Object.prototype,Sw=_w.toString,Cw=Ew.hasOwnProperty,Aw=Sw.call(Object),Ae(Tw,"isPlainObject"),Lw=Tw});function Iw(t){return V7(t)&&lw(t.length)&&!!Mw[S3(t)]}var Mw,Rw,Dw=i(()=>{C3(),cw(),X7(),(Mw={})["[object Float32Array]"]=Mw["[object Float64Array]"]=Mw["[object Int8Array]"]=Mw["[object Int16Array]"]=Mw["[object Int32Array]"]=Mw["[object Uint8Array]"]=Mw["[object Uint8ClampedArray]"]=Mw["[object Uint16Array]"]=Mw["[object Uint32Array]"]=!0,Mw["[object Arguments]"]=Mw["[object Array]"]=Mw["[object ArrayBuffer]"]=Mw["[object Boolean]"]=Mw["[object DataView]"]=Mw["[object Date]"]=Mw["[object Error]"]=Mw["[object Function]"]=Mw["[object Map]"]=Mw["[object Number]"]=Mw["[object Object]"]=Mw["[object RegExp]"]=Mw["[object Set]"]=Mw["[object String]"]=Mw["[object WeakMap]"]=!1,Ae(Iw,"baseIsTypedArray"),Rw=Iw});function Ow(e){return function(t){return e(t)}}var Pw,Bw,Fw,$w,zw,qw,Uw,jw=i(()=>{Ae(Ow,"baseUnary"),Pw=Ow}),Gw=i(()=>{c3(),$w="object"==typeof exports&&exports&&!exports.nodeType&&exports,Bw=$w&&"object"==typeof module&&module&&!module.nodeType&&module,$w=Bw&&Bw.exports===$w,Fw=$w&&Xb.process,$w=function(){try{return Bw&&Bw.require&&Bw.require("util").types||Fw&&Fw.binding&&Fw.binding("util")}catch{}}(),zw=$w}),Ww=i(()=>{Dw(),jw(),Gw(),qw=(qw=zw&&zw.isTypedArray)?Pw(qw):Rw,Uw=qw});function Yw(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Hw,Vw=i(()=>{Ae(Yw,"safeGet"),Hw=Yw});function Xw(t,e,r){var n=t[e];Zw.call(t,e)&&O5(n,r)&&(void 0!==r||e in t)||r7(t,e,r)}var Kw,Zw,Qw,Jw=i(()=>{n7(),P5(),Kw=Object.prototype,Zw=Kw.hasOwnProperty,Ae(Xw,"assignValue"),Qw=Xw});function tk(t,e,r,n){var i=!r;r=r||{};for(var a=-1,s=e.length;++a{Jw(),n7(),Ae(tk,"copyObject"),ek=tk});function nk(t,e){for(var r=-1,n=Array(t);++r{Ae(nk,"baseTimes"),ik=nk});function sk(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&ok.test(t))&&-1{ok=/^(?:0|[1-9]\d*)$/,Ae(sk,"isIndex"),lk=sk});function hk(t,e){var r,n=nw(t),i=!n&&ew(t),a=!n&&!i&&bw(t),s=!n&&!i&&!a&&Uw(t),o=n||i||a||s,l=o?ik(t.length,String):[],c=l.length;for(r in t)!e&&!dk.call(t,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||lk(r,c))||l.push(r);return l}var uk,dk,pk,gk=i(()=>{ak(),aw(),sw(),kw(),ck(),Ww(),uk=Object.prototype,dk=uk.hasOwnProperty,Ae(hk,"arrayLikeKeys"),pk=hk});function fk(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}var mk,yk=i(()=>{Ae(fk,"nativeKeysIn"),mk=fk});function vk(t){if(!L3(t))return mk(t);var e,r=U7(t),n=[];for(e in t)("constructor"!=e||!r&&bk.call(t,e))&&n.push(e);return n}var xk,bk,wk,kk=i(()=>{N3(),j7(),yk(),xk=Object.prototype,bk=xk.hasOwnProperty,Ae(vk,"baseKeysIn"),wk=vk});function Tk(t){return uw(t)?pk(t,!0):wk(t)}var _k,Ek=i(()=>{gk(),kk(),dw(),Ae(Tk,"keysIn"),_k=Tk});function Sk(t){return ek(t,_k(t))}var Ck,Ak=i(()=>{rk(),Ek(),Ae(Sk,"toPlainObject"),Ck=Sk});function Lk(t,e,r,n,i,a,s){var o,l,c,h=Hw(t,r),u=Hw(e,r),d=s.get(u);d||((e=void 0===(d=a?a(h,u,r+"",t,e,s):void 0))&&(l=!(o=nw(u))&&bw(u),c=!o&&!l&&Uw(u),d=u,o||l||c?d=nw(h)?h:gw(h)?L7(h):l?y7(u,!(e=!1)):c?S7(u,!(e=!1)):[]:Lw(u)||ew(u)?ew(d=h)?d=Ck(h):L3(h)&&!M3(h)||(d=W7(u)):e=!1),e&&(s.set(u,d),i(d,u,n,a,s),s.delete(u))),a7(t,r,d)}var Nk,Ik=i(()=>{s7(),b7(),C7(),M7(),Y7(),aw(),sw(),fw(),kw(),O3(),N3(),Nw(),Ww(),Vw(),Ak(),Ae(Lk,"baseMergeDeep"),Nk=Lk});function Mk(n,i,a,s,o){n!==i&&h7(i,function(t,e){var r;o=o||new K6,L3(t)?Nk(n,i,e,a,Mk,s,o):(r=s?s(Hw(n,e),t,e+"",n,i,o):void 0,a7(n,e,void 0===r?t:r))},_k)}var Rk,Dk=i(()=>{J6(),s7(),d7(),Ik(),N3(),Ek(),Vw(),Ae(Mk,"baseMerge"),Rk=Mk});function Ok(t){return t}var Pk,Bk=i(()=>{Ae(Ok,"identity"),Pk=Ok});function Fk(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var $k,zk=i(()=>{Ae(Fk,"apply"),$k=Fk});function qk(a,s,o){return s=Uk(void 0===s?a.length-1:s,0),function(){for(var t=arguments,e=-1,r=Uk(t.length-s,0),n=Array(r);++e{zk(),Uk=Math.max,Ae(qk,"overRest"),jk=qk});function Wk(t){return function(){return t}}var Yk,Hk,Vk=i(()=>{Ae(Wk,"constant"),Yk=Wk}),Xk=i(()=>{Vk(),t7(),Bk(),Hk=Q6?function(t,e){return Q6(t,"toString",{configurable:!0,enumerable:!1,value:Yk(e),writable:!0})}:Pk});function Kk(r){var n=0,i=0;return function(){var t=Zk(),e=16-(t-i);if(i=t,0{Zk=Date.now,Ae(Kk,"shortOut"),Qk=Kk}),r8=i(()=>{Xk(),e8(),Jk=Qk(Hk),t8=Jk});function n8(t,e){return t8(jk(t,e,Pk),t+"")}var i8,a8=i(()=>{Bk(),Gk(),r8(),Ae(n8,"baseRest"),i8=n8});function s8(t,e,r){var n;return!!L3(r)&&!!("number"==(n=typeof e)?uw(r)&&lk(e,r.length):"string"==n&&e in r)&&O5(r[e],t)}var o8,l8=i(()=>{P5(),dw(),ck(),N3(),Ae(s8,"isIterateeCall"),o8=s8});function c8(o){return i8(function(t,e){var r=-1,n=e.length,i=1{a8(),l8(),Ae(c8,"createAssigner"),h8=c8}),g8=i(()=>{Dk(),p8(),u8=h8(function(t,e,r){Rk(t,e,r)}),d8=u8});function f8(t,e){return t?(t="curve"+(t.charAt(0).toUpperCase()+t.slice(1)),L8[t]??e):e}function m8(t,e){if(t=t.trim())return"loose"!==e.securityLevel?(0,C8.sanitizeUrl)(t):t}function y8(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function v8(t){let e,r=0;t.forEach(t=>{r+=y8(t,e),e=t});var n=r/2;return B8(t,n)}function x8(t){return 1===t.length?t[0]:v8(t)}function b8(t,e,r){var r=structuredClone(r),n=(R.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse(),25+t),n=B8(r,n),t=10+.5*t,i=Math.atan2(r[0].y-n.y,r[0].x-n.x),a={x:0,y:0};return"start_left"===e?(a.x=Math.sin(i+Math.PI)*t+(r[0].x+n.x)/2,a.y=-Math.cos(i+Math.PI)*t+(r[0].y+n.y)/2):"end_right"===e?(a.x=Math.sin(i-Math.PI)*t+(r[0].x+n.x)/2-5,a.y=-Math.cos(i-Math.PI)*t+(r[0].y+n.y)/2-5):"end_left"===e?(a.x=Math.sin(i)*t+(r[0].x+n.x)/2-5,a.y=-Math.cos(i)*t+(r[0].y+n.y)/2-5):(a.x=Math.sin(i)*t+(r[0].x+n.x)/2,a.y=-Math.cos(i)*t+(r[0].y+n.y)/2),a}function w8(t){let e="",r="";for(var n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}function k8(e){let r="",n="0123456789abcdef",i=n.length;for(let t=0;t{C8=M(s3(),1),i3(),al(),Or(),t(),Xe(),Ze(),R6(),g8(),He(),A8="​",L8={curveBasis:vx,curveBasisClosed:wx,curveBasisOpen:_x,curveBumpX:hx,curveBumpY:ux,curveBundle:Cx,curveCardinalClosed:Dx,curveCardinalOpen:Bx,curveCardinal:Ix,curveCatmullRomClosed:Gx,curveCatmullRomOpen:Hx,curveCatmullRom:qx,curveLinear:Z4,curveLinearClosed:Kx,curveMonotoneX:ab,curveMonotoneY:sb,curveNatural:hb,curveStep:pb,curveStepAfter:fb,curveStepBefore:gb},N8=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,I8=Ae(function(t,e){var r,n=M8(t,/(?:init\b)|(?:initialize\b)/),i={};if(i=Array.isArray(n)?(r=n.map(t=>t.args),Te(r),ct(i,[...r])):n.args)return r=et(t,e),void 0!==i[n="config"]&&(i[r="flowchart-v2"===r?"flowchart":r]=i[n],delete i[n]),i},"detectInit"),M8=Ae(function(t,e=null){try{var r=new RegExp(`[%]{2}(?![{]${N8.source})(?=[}][%]{2}).* +`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),R.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:`+t);for(var n,i,a,s=[];null!==(n=V.exec(t));)n.index===V.lastIndex&&V.lastIndex++,(n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e))&&(i=n[1]||n[2],a=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null,s.push({type:i,args:a}));return 0===s.length?{type:t,args:null}:1===s.length?s[0]:s}catch(r){return R.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),R8=Ae(function(t){return t.replace(V,"")},"removeDirectives"),D8=Ae(function(t,e){for(var[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray"),Ae(f8,"interpolateToCurve"),Ae(m8,"formatUrl"),O8=Ae((e,...t)=>{let r=e.split("."),n=r.length-1,i=r[n],a=window;for(let t=0;t(e=Math.pow(10,e),Math.round(t*e)/e),"roundNumber"),B8=Ae((t,e)=>{let r,n=e;for(var i of t){if(r){var a=y8(i,r);if(a{R.info("our points "+JSON.stringify(e)),e[0]!==r&&(e=e.reverse());var r=B8(e,25),t=t?10:5,n=Math.atan2(e[0].y-r.y,e[0].x-r.x),i={x:0,y:0};return i.x=Math.sin(n)*t+(e[0].x+r.x)/2,i.y=-Math.cos(n)*t+(e[0].y+r.y)/2,i},"calcCardinalityPosition"),Ae(b8,"calcTerminalLabelPosition"),Ae(w8,"getStylesFromArray"),$8=0,z8=Ae(()=>($8++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$8),"generateId"),Ae(k8,"makeRandomHex"),q8=Ae(t=>k8(t.length),"random"),U8=Ae(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),j8=Ae(function(t,e){var r=e.text.replace(L.lineBreakRegex," "),[,n]=Z8(e.fontSize);return(t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.style("text-anchor",e.anchor),t.style("font-family",e.fontFamily),t.style("font-size",n),t.style("font-weight",e.fontWeight),t.attr("fill",e.fill),void 0!==e.class&&t.attr("class",e.class),(n=t.append("tspan")).attr("x",e.x+2*e.textMargin),n.attr("fill",e.fill),n.text(r),t},"drawSimpleText"),G8=M6((t,s,o)=>{if(!t||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},o),L.lineBreakRegex.test(t)))return t;let l=t.split(" ").filter(Boolean),c=[],h="";return l.forEach((t,e)=>{var r,n,i=_8(t+" ",o),a=_8(h,o);h=s""!==t).join(o.joinWith)},(t,e,r)=>""+t+e+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),W8=M6((t,n,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let s=[...t],o=[],l="";return s.forEach((t,e)=>{var r,t=""+l+t;l=_8(t,a)>=n?(e+=1,e=s.length===e,r=t+i,o.push(e?t:r),""):t}),{hyphenatedStrings:o,remainingWord:l}},(t,e,r="-",n)=>""+t+e+r+n.fontSize+n.fontWeight+n.fontFamily),Ae(T8,"calculateTextHeight"),Ae(_8,"calculateTextWidth"),Y8=M6((t,e)=>{var{fontSize:e=12,fontFamily:r="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};var[,i]=Z8(e),e=["sans-serif",r],a=t.split(L.lineBreakRegex),s=[];if(!(r=O("body")).remove)return{width:0,height:0,lineHeight:0};var o,l=r.append("svg");for(o of e){var c,h={width:0,height:0,lineHeight:0};for(c of a){var u=U8();if(u.text=c||A8,0===(u=((u=j8(l,u).style("font-size",i).style("font-weight",n).style("font-family",o))._groups||u)[0][0].getBBox()).width&&0===u.height)throw new Error("svg element not in render tree");h.width=Math.round(Math.max(h.width,u.width)),u=Math.round(u.height),h.height+=u,h.lineHeight=Math.round(Math.max(h.lineHeight,u))}s.push(h)}return l.remove(),s[isNaN(s[1].height)||isNaN(s[1].width)||isNaN(s[1].lineHeight)||s[0].height>s[1].height&&s[0].width>s[1].width&&s[0].lineHeight>s[1].lineHeight?0:1]},(t,e)=>""+t+e.fontSize+e.fontWeight+e.fontFamily),H8=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{Ae(this,"InitIDGenerator")}},X8=Ae(function(t){return V8=V8||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),V8.innerHTML=t,unescape(V8.textContent)},"entityDecode"),Ae(E8,"isDetailedError"),K8=Ae((t,e,r,n)=>{var i;n&&(i=t.node()?.getBBox())&&t.append("text").text(n).attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),Z8=Ae(t=>{var e;return"number"==typeof t?[t,t+"px"]:(e=parseInt(t??"",10),Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t])},"parseFontSize"),Ae(S8,"cleanAndMerge"),Q8={assignWithDepth:ct,wrapLabel:G8,calculateTextHeight:T8,calculateTextWidth:_8,calculateTextDimensions:Y8,cleanAndMerge:S8,detectInit:I8,detectDirective:M8,isSubstringInArray:D8,interpolateToCurve:f8,calcLabelPosition:x8,calcCardinalityPosition:F8,calcTerminalLabelPosition:b8,formatUrl:m8,getStylesFromArray:w8,generateId:z8,random:q8,runFunc:O8,entityDecode:X8,insertTitle:K8,parseFontSize:Z8,InitIDGenerator:H8},J8=Ae(function(t){let e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,function(t){return t=t.substring(1,t.length-1),/^\+?\d+$/.test(t)?"fl°°"+t+"¶ß":"fl°"+t+"¶ß"})},"encodeEntities"),tT=Ae(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),eT=Ae((t,e,{counter:r=0,prefix:n,suffix:i})=>(n?n+"_":"")+t+`_${e}_`+r+(i?"_"+i:""),"getEdgeId")});function nT(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=G8(e[t].text,i,n),e[t].textLines=e[t].text.split(L.lineBreakRegex).length,e[t].width=i,e[t].height=T8(e[t].text,n);else{var a,s,r=e[t].text.split(L.lineBreakRegex);e[t].textLines=r.length,e[t].height=0,e[t].width=0;for(s of r)e[t].width=Math.max(_8(s,n),e[t].width),a=T8(s,n),e[t].height=e[t].height+a}}function iT(e,r,n,t,i){var a,s,o=new cT(i);o.data.widthLimit=n.data.widthLimit/Math.min(lT,t.length);for([a,s]of t.entries()){let t=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=t,t=s.image.Y+s.image.height);var l=s.wrap&&y.wrap,c=dT(y),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",nT("label",s,l,c,o.data.widthLimit),s.label.Y=t+8,t=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",nT("type",s,l,c=dT(y),o.data.widthLimit),s.type.Y=t+5,t=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=dT(y)).fontSize=c.fontSize-2,nT("descr",s,l,c,o.data.widthLimit),s.descr.Y=t+20,t=s.descr.Y+s.descr.height),c=0==a||a%lT==0?(l=n.data.startx+y.diagramMarginX,n.data.stopy+y.diagramMarginY+t):(l=o.data.stopx!==o.data.startx?o.data.stopx+y.diagramMarginX:o.data.startx,o.data.starty),o.setData(l,l,c,c),o.name=s.alias,i.db.getC4ShapeArray(s.alias));0<(c=i.db.getC4ShapeKeys(s.alias)).length&&fT(o,e,l,c),r=s.alias,0<(l=i.db.getBoundarys(r)).length&&iT(e,0,o,l,i),"global"!==s.alias&&gT(e,s,o),n.data.stopy=Math.max(o.data.stopy+y.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+y.c4ShapeMargin,n.data.stopx),aT=Math.max(aT,n.data.stopx),sT=Math.max(sT,n.data.stopy)}}var aT,sT,oT,lT,y,cT,hT,uT,dT,pT,gT,fT,mT,yT,vT,xT,bT,wT,kT,TT,_T=i(()=>{i3(),l3(),t(),Ke(),al(),kc(),wc(),Ze(),rT(),sl(),sT=aT=0,oT=4,lT=2,st.yy=xc,y={},cT=class{static{Ae(this,"Bounds")}constructor(t){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,hT(t.db.getConfig())}setData(t,e,r,n){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=n}updateVal(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,r=e+t.width,n=this.nextData.starty+2*t.margin,i=n+t.height;(e>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>oT)&&(e=this.nextData.startx+t.margin+y.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=r=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},hT(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},hT=Ae(function(t){ct(y,t),t.fontFamily&&(y.personFontFamily=y.systemFontFamily=y.messageFontFamily=t.fontFamily),t.fontSize&&(y.personFontSize=y.systemFontSize=y.messageFontSize=t.fontSize),t.fontWeight&&(y.personFontWeight=y.systemFontWeight=y.messageFontWeight=t.fontWeight)},"setConf"),uT=Ae((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),dT=Ae(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),pT=Ae(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Ae(nT,"calcC4ShapeTextWH"),gT=Ae(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=y.c4ShapeMargin-35;var r=e.wrap&&y.wrap,n=dT(y),i=(n.fontSize=n.fontSize+2,n.fontWeight="bold",_8(e.label.text,n));nT("label",e,r,n,i),Hb.drawBoundary(t,e,y)},"drawBoundary"),fT=Ae(function(r,n,i,t){let a=0;for(var s of t){a=0;var o=i[s];switch((s=uT(y,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=_8("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=y.c4ShapePadding,a=o.typeC4Shape.Y+o.typeC4Shape.height-4,o.image={width:0,height:0,Y:0},o.typeC4Shape.text){case"person":case"external_person":o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height}o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=a,a=o.image.Y+o.image.height);var s=o.wrap&&y.wrap,l=y.width-2*y.c4ShapePadding,c=uT(y,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",nT("label",o,s,c,l),o.label.Y=a+8,a=o.label.Y+o.label.height,o.type&&""!==o.type.text?(o.type.text="["+o.type.text+"]",nT("type",o,s,uT(y,o.typeC4Shape.text),l),o.type.Y=a+5,a=o.type.Y+o.type.height):o.techn&&""!==o.techn.text&&(o.techn.text="["+o.techn.text+"]",nT("techn",o,s,uT(y,o.techn.text),l),o.techn.Y=a+5,a=o.techn.Y+o.techn.height);let t=a,e=o.label.width;o.descr&&""!==o.descr.text&&(nT("descr",o,s,uT(y,o.typeC4Shape.text),l),o.descr.Y=a+20,a=o.descr.Y+o.descr.height,e=Math.max(o.label.width,o.descr.width),t=a-5*o.descr.textLines),e+=y.c4ShapePadding,o.width=Math.max(o.width||y.width,e,y.width),o.height=Math.max(o.height||y.height,t,y.height),o.margin=o.margin||y.c4ShapeMargin,r.insert(o),Hb.drawC4Shape(n,o,y)}r.bumpLastMargin(y.c4ShapeMargin)},"drawC4ShapeArray"),mT=class{static{Ae(this,"Point")}constructor(t,e){this.x=t,this.y=e}},yT=Ae(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,o=n+t.height/2,l=Math.abs(r-i),c=Math.abs(n-a),h=c/l,u=t.height/t.width,d=null;return n==a&&r{kT=Ae(t=>`.person { + stroke: ${t.personBorder}; + fill: ${t.personBkg}; + } +`,"getStyles"),TT=kT}),ST={};A(ST,{diagram:()=>CT});var CT,AT=i(()=>{Ke(),kc(),_T(),ET(),CT={parser:ot,db:xc,renderer:wT,styles:TT,init:Ae(({c4:t,wrap:e})=>{wT.setConf(t),xc.setWrap(e)},"init")}});function LT(t){let e=[];for(var r of t)(r=DT.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}var NT,IT,MT,RT,DT,OT,PT,BT,FT,$T,zT,qT,UT,jT,GT,WT,YT,HT,VT,XT,KT,ZT,QT,JT,t_,e_,r_,n_,i_,a_,s_,o_,l_,c_,h_,u_,d_,p_,g_,f_,m_,y_,v_,x_,b_,w_,k_,T_,__,E_,S_,C_,A_,L_,N_,I_,M_,R_,D_,O_,P_=i(()=>{i3(),rT(),wc(),al(),t(),bc(),NT=0,IT=D(),MT=new Map,RT=[],DT=new Map,OT=[],PT=new Map,BT=new Map,$T=!(FT=0),UT=[],jT=Ae(t=>L.sanitizeText(t,IT),"sanitizeText"),GT=Ae(function(t){for(var e of MT.values())if(e.id===t)return e.domId;return t},"lookUpDomId"),WT=Ae(function(r,n,i,a,s,o,l={}){if(r&&0!==r.trim().length){let t,e=MT.get(r);void 0===e&&(e={id:r,labelType:"text",domId:"flowchart-"+r+"-"+NT,styles:[],classes:[]},MT.set(r,e)),NT++,void 0!==n?(IT=D(),t=jT(n.text.trim()),e.labelType=n.type,t.startsWith('"')&&t.endsWith('"')&&(t=t.substring(1,t.length-1)),e.text=t):void 0===e.text&&(e.text=r),void 0!==i&&(e.type=i),a?.forEach(function(t){e.styles.push(t)}),s?.forEach(function(t){e.classes.push(t)}),void 0!==o&&(e.dir=o),void 0===e.props?e.props=l:void 0!==l&&Object.assign(e.props,l)}},"addVertex"),YT=Ae(function(t,e,r){if(R.info("abc78 Got edge...",t={start:t,end:e,type:void 0,text:"",labelType:"text"}),void 0!==(e=r.text)&&(t.text=jT(e.text.trim()),t.text.startsWith('"')&&t.text.endsWith('"')&&(t.text=t.text.substring(1,t.text.length-1)),t.labelType=e.type),void 0!==r&&(t.type=r.type,t.stroke=r.stroke,t.length=10=RT.length)throw new Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${RT.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?RT.defaultStyle=e:(RT[t].style=e,0<(RT[t]?.style?.length??0)&&!RT[t]?.style?.some(t=>t?.startsWith("fill"))&&RT[t]?.style?.push("fill:none"))})},"updateLink"),KT=Ae(function(t,e){t.split(",").forEach(function(t){let r=DT.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},DT.set(t,r)),e?.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})},"addClass"),ZT=Ae(function(t){zT=t,/.*/.exec(zT)&&(zT="LR"),"TD"===(zT=/.*v/.exec(zT)?"TB":zT)&&(zT="TB")},"setDirection"),QT=Ae(function(t,e){for(var r of t.split(",")){var n=MT.get(r);n&&n.classes.push(e),(n=PT.get(r))&&n.classes.push(e)}},"setClass"),JT=Ae(function(t,e){if(void 0!==e){e=jT(e);for(var r of t.split(","))BT.set("gen-1"===qT?GT(r):r,e)}},"setTooltip"),t_=Ae(function(t,e,n){let i=GT(t);if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e")),e.classed("hover",!0))}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),O(this).classed("hover",!1)})},"setupToolTips"),UT.push(c_),h_=Ae(function(t="gen-1"){MT=new Map,DT=new Map,RT=[],UT=[c_],OT=[],PT=new Map,FT=0,BT=new Map,$T=!0,qT=t,IT=D(),pl()},"clear"),u_=Ae(t=>{qT=t||"gen-2"},"setGen"),d_=Ae(function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},"defaultStyle"),p_=Ae(function(t,e,r){let n=t.text.trim(),i=r.text;function a(t){let r={boolean:{},number:{},string:{}},n=[],i;return{nodeList:t.filter(function(t){var e=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(e in r?!r[e].hasOwnProperty(t)&&(r[e][t]=!0):!n.includes(t)&&n.push(t))}),dir:i}}t===r&&/\s/.exec(r.text)&&(n=void 0),Ae(a,"uniq");var{nodeList:s,dir:t}=a(e.flat());if("gen-1"===qT)for(let t=0;t!!$T&&!($T=!1),"firstGraph"),w_=Ae(t=>{let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1)}let n="normal";return e.includes("=")&&(n="thick"),e.includes(".")&&(n="dotted"),{type:r,stroke:n}},"destructStartLink"),k_=Ae((e,r)=>{let n=r.length,i=0;for(let t=0;t{let e=t.trim(),r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e.startsWith("x")&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",e.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,r=r.slice(1))}let i="normal",a=r.length-1;return r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible"),(t=k_(".",r))&&(i="dotted",a=t),{type:n,stroke:i,length:a}},"destructEndLink"),__=Ae((t,e)=>{if(t=T_(t),e){if((e=w_(e)).stroke!==t.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===e.type)e.type=t.type;else{if(e.type!==t.type)return{type:"INVALID",stroke:"INVALID"};e.type="double_"+e.type}return"double_arrow"===e.type&&(e.type="double_arrow_point"),e.length=t.length,e}return t},"destructLink"),E_=Ae((t,e)=>{for(var r of t)if(r.nodes.includes(e))return!0;return!1},"exists"),S_=Ae((r,n)=>{let i=[];return r.nodes.forEach((t,e)=>{E_(n,t)||i.push(r.nodes[e])}),{nodes:i}},"makeUniq"),C_={firstGraph:C_},A_=Ae(t=>"square"===t.type?"squareRect":"round"===t.type?"roundedRect":t.type??"squareRect","getTypeFromVertex"),L_=Ae((t,e)=>t.find(t=>t.id===e),"findNode"),N_=Ae(t=>{let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e}return{arrowTypeStart:e,arrowTypeEnd:r}},"destructEdgeType"),I_=Ae((t,e,r,n,i,a)=>{var r=r.get(t.id),n=n.get(t.id)??!1,s=L_(e,t.id);s?(s.cssStyles=t.styles,s.cssCompiledStyles=LT(t.classes),s.cssClasses=t.classes.join(" ")):e.push({id:t.id,label:t.text,labelStyle:"",parentId:r,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:LT(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),shape:A_(t),dir:t.dir,domId:t.domId,isGroup:n,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:r_(t.id)})},"addNodeFromVertex"),Ae(LT,"getCompiledStyles"),M_=Ae(()=>{let a=D(),e=[],s=[],r=b_(),n=new Map,i=new Map;for(let t=r.length-1;0<=t;t--){var o,l=r[t];0{I_(t,e,n,i,a,a.look||"classic")});let h=o_();return h.forEach((t,e)=>{var{arrowTypeStart:r,arrowTypeEnd:n}=N_(t.type),i=[...h.defaultStyle??[]],e=(t.style&&i.push(...t.style),{id:eT(t.start,t.end,{counter:e,prefix:"L"}),start:t.start,end:t.end,type:t.type??"normal",label:t.text,labelpos:"c",thickness:t.stroke,minlen:t.length,classes:"invisible"===t?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===t?.stroke?"none":r,arrowTypeEnd:"invisible"===t?.stroke?"none":n,arrowheadStyle:"fill: #333",labelStyle:i,style:i,pattern:t.stroke,look:a.look});s.push(e)}),{nodes:e,edges:s,other:{},config:a}},"getData"),R_={defaultConfig:Ae(()=>Tl.flowchart,"defaultConfig"),setAccTitle:gl,getAccTitle:fl,getAccDescription:yl,getData:M_,setAccDescription:ml,addVertex:WT,lookUpDomId:GT,addLink:HT,updateLinkInterpolate:VT,updateLink:XT,addClass:KT,setDirection:ZT,setClass:QT,setTooltip:JT,getTooltip:r_,setClickEvent:n_,setLink:e_,bindFunctions:i_,getDirection:a_,getVertices:s_,getEdges:o_,getClasses:l_,clear:h_,setGen:u_,defaultStyle:d_,addSubGraph:p_,getDepthFirstPos:v_,indexNodes:x_,getSubGraphs:b_,destructLink:__,lex:C_,exists:E_,makeUniq:S_,setDiagramTitle:vl,getDiagramTitle:xl}}),B_=i(()=>{D_=Ae(t=>{var e,r=new Set;for(e of t)switch(e){case"x":r.add("right"),r.add("left");break;case"y":r.add("up"),r.add("down");break;default:r.add(e)}return r},"expandAndDeduplicateDirections"),O_=Ae((t,e,r)=>{var t=D_(t),n=e.height+2*r.padding,i=n/2,e=e.width+2*i+r.padding,r=r.padding/2;return t.has("right")&&t.has("left")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:i,y:0},{x:e/2,y:2*r},{x:e-i,y:0},{x:e,y:0},{x:e,y:-n/3},{x:e+2*r,y:-n/2},{x:e,y:-2*n/3},{x:e,y:-n},{x:e-i,y:-n},{x:e/2,y:-n-2*r},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*r,y:-n/2},{x:0,y:-n/3}]:t.has("right")&&t.has("left")&&t.has("up")?[{x:i,y:0},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("right")&&t.has("left")&&t.has("down")?[{x:0,y:0},{x:i,y:-n},{x:e-i,y:-n},{x:e,y:0}]:t.has("right")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:e,y:-i},{x:e,y:i-n},{x:0,y:-n}]:t.has("left")&&t.has("up")&&t.has("down")?[{x:e,y:0},{x:0,y:-i},{x:0,y:i-n},{x:e,y:-n}]:t.has("right")&&t.has("left")?[{x:i,y:0},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("up")&&t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:e/2,y:-n},{x:e,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r},{x:e,y:-r}]:t.has("right")&&t.has("up")?[{x:0,y:0},{x:e,y:-i},{x:0,y:-n}]:t.has("right")&&t.has("down")?[{x:0,y:0},{x:e,y:0},{x:0,y:-n}]:t.has("left")&&t.has("up")?[{x:e,y:0},{x:0,y:-i},{x:e,y:-n}]:t.has("left")&&t.has("down")?[{x:e,y:0},{x:0,y:0},{x:e,y:-n}]:t.has("right")?[{x:i,y:-r},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:r-n}]:t.has("left")?[{x:i,y:0},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("up")?[{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:e/2,y:-n},{x:e,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r}]:t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r},{x:e,y:-r}]:[{x:0,y:0}]},"getArrowPoints")});function F_(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function $_(t){K_=t}function z_(t,e){if(e){if(Z_.test(t))return t.replace(Q_,rE)}else if(J_.test(t))return t.replace(tE,rE);return t}function q_(t){return t.replace(nE,(t,e)=>"colon"===(e=e.toLowerCase())?":":"#"===e.charAt(0)?"x"===e.charAt(1)?String.fromCharCode(parseInt(e.substring(2),16)):String.fromCharCode(+e.substring(1)):"")}function U_(t,e){let n="string"==typeof t?t:t.source,i=(e=e||"",{replace:Ae((t,e)=>{let r="string"==typeof e?e:e.source;return r=r.replace(iE,"$1"),n=n.replace(t,r),i},"replace"),getRegex:Ae(()=>new RegExp(n,e),"getRegex")});return i}function j_(t){try{t=encodeURI(t).replace(/%25/g,"%")}catch{return null}return t}function G_(t,e){let r=t.replace(/\|/g,(t,e,r)=>{let n=!1,i=e;for(;0<=--i&&"\\"===r[i];)n=!n;return n?"|":" |"}),n=r.split(/ \|/),i=0;if(n[0].trim()||n.shift(),0e)n.splice(e);else for(;n.length{var e=t.match(/^\s+/);return null!==e&&([e]=e,e.length>=r.length)?t.slice(r.length):t}).join(` +`)}function X_(t,e){return DE.parse(t,e)}var K_,Z_,Q_,J_,tE,eE,rE,nE,iE,aE,sE,oE,lE,cE,hE,uE,dE,pE,gE,fE,mE,yE,vE,xE,bE,wE,kE,TE,_E,EE,SE,CE,AE,LE,NE,IE,ME,RE,DE,OE=i(()=>{Ae(F_,"_getDefaults"),K_=F_(),Ae($_,"changeDefaults"),Z_=/[&<>"']/,Q_=new RegExp(Z_.source,"g"),J_=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,tE=new RegExp(J_.source,"g"),eE={"&":"&","<":"<",">":">",'"':""","'":"'"},rE=Ae(t=>eE[t],"getEscapeReplacement"),Ae(z_,"escape$1"),nE=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,Ae(q_,"unescape"),iE=/(^|[^\[])\^/g,Ae(U_,"edit"),Ae(j_,"cleanUrl"),aE={exec:Ae(()=>null,"exec")},Ae(G_,"splitCells"),Ae(W_,"rtrim"),Ae(Y_,"findClosingBracket"),Ae(H_,"outputLink"),Ae(V_,"indentCodeCompensation"),sE=class{static{Ae(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||K_}space(t){if((t=this.rules.block.newline.exec(t))&&0/.test(n[r]))e.push(n[r]),t=!0;else{if(t)break;e.push(n[r])}n=n.slice(r);var o,l=(c=e.join(` +`)).replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` + $1`).replace(/^ {0,3}>[ \t]?/gm,""),c=(i=i?i+` +`+c:c,a=a?a+` +`+l:l,this.lexer.state.top);if(this.lexer.state.top=!0,this.lexer.blockTokens(l,s,!0),this.lexer.state.top=c,0===n.length)break;if("code"===(l=s[s.length-1])?.type)break;if("blockquote"===l?.type){var h=(c=l).raw+` +`+n.join(` +`),h=this.blockquote(h);s[s.length-1]=h,i=i.substring(0,i.length-c.raw.length)+h.raw,a=a.substring(0,a.length-c.text.length)+h.text;break}"list"===l?.type&&(h=(c=l).raw+` +`+n.join(` +`),o=this.list(h),s[s.length-1]=o,i=i.substring(0,i.length-l.raw.length)+o.raw,a=a.substring(0,a.length-c.raw.length)+o.raw,n=h.substring(s[s.length-1].raw.length).split(` +`))}return{type:"blockquote",raw:i,tokens:s,text:a}}}list(d){let p=this.rules.block.list.exec(d);if(p){let t=p[1].trim(),e=1" ".repeat(3*t.length)),i=d.split(` +`,1)[0],a=!n.trim(),s=0;if(this.options.pedantic?(s=2,r=n.trimStart()):a?s=p[1].length+1:(s=4<(s=p[2].search(/[^ ]/))?1:s,r=n.slice(s),s+=p[1].length),a&&/^ *$/.test(i)&&(e+=i+` +`,d=d.substring(i.length+1),t=!0),!t)for(var g=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),f=new RegExp(`^ {0,${Math.min(3,s-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),m=new RegExp(`^ {0,${Math.min(3,s-1)}}(?:\`\`\`|~~~)`),y=new RegExp(`^ {0,${Math.min(3,s-1)}}#`);d;){var v=d.split(` +`,1)[0];if(i=v,this.options.pedantic&&(i=i.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),m.test(i)||y.test(i)||g.test(i)||f.test(d))break;if(i.search(/[^ ]/)>=s||!i.trim())r+=` +`+i.slice(s);else{if(a||4<=n.search(/[^ ]/)||m.test(n)||y.test(n)||f.test(n))break;r+=` +`+i}a||i.trim()||(a=!0),e+=v+` +`,d=d.substring(v.length+1),n=i.slice(s)}c.loose||(u?c.loose=!0:/\n *\n *$/.test(e)&&(u=!0));let o=null,l;this.options.gfm&&(o=/^\[[ xX]\] /.exec(r))&&(l="[ ] "!==o[0],r=r.replace(/^\[[ xX]\] +/,"")),c.items.push({type:"list_item",raw:e,task:!!o,checked:l,loose:!1,text:r,tokens:[]}),c.raw+=e}c.items[c.items.length-1].raw=c.items[c.items.length-1].raw.trimEnd(),c.items[c.items.length-1].text=c.items[c.items.length-1].text.trimEnd(),c.raw=c.raw.trimEnd();for(let t=0;t"space"===t.type)).length&&r.some(t=>/\n.*\n/.test(t.raw)),c.loose=r)}if(c.loose)for(let t=0;t$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]&&t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"),{type:"def",tag:e,raw:t[0],href:r,title:n}}table(i){if((i=this.rules.block.table.exec(i))&&/[:|]/.test(i[2])){let e=G_(i[1]),t=i[2].replace(/^\||\| *$/g,"").split("|"),r=i[3]&&i[3].trim()?i[3].replace(/\n[ \t]*$/,"").split(` +`):[],n={type:"table",raw:i[0],header:[],align:[],rows:[]};if(e.length===t.length){for(var a of t)/^ *-+: *$/.test(a)?n.align.push("right"):/^ *:-+: *$/.test(a)?n.align.push("center"):/^ *:-+ *$/.test(a)?n.align.push("left"):n.align.push(null);for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]})));return n}}}lheading(t){if(t=this.rules.block.lheading.exec(t))return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(t){var e;if(t=this.rules.block.paragraph.exec(t))return e=t[1].charAt(t[1].length-1)===` +`?t[1].slice(0,-1):t[1],{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}text(t){if(t=this.rules.block.text.exec(t))return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(t){if(t=this.rules.inline.escape.exec(t))return{type:"escape",raw:t[0],text:z_(t[1])}}tag(t){if(t=this.rules.inline.tag.exec(t))return!this.lexer.state.inLink&&/^/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(r){if(r=this.rules.inline.link.exec(r)){var n,i=r[2].trim();if(!this.options.pedantic&&/^$/.test(i))return;var a=W_(i.slice(0,-1),"\\");if((i.length-a.length)%2==0)return}else-1<(a=Y_(r[2],"()"))&&(n=(0===r[0].indexOf("!")?5:4)+r[1].length+a,r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]="");let t=r[2],e="";return this.options.pedantic?(a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(t))&&(t=a[1],e=a[3]):e=r[3]?r[3].slice(1,-1):"",t=t.trim(),H_(r,{href:(t=/^$/.test(i)?t.slice(1):t.slice(1,-1):t)&&t.replace(this.rules.inline.anyPunctuation,"$1"),title:e&&e.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(t,e){var r;if(r=(r=this.rules.inline.reflink.exec(t))||this.rules.inline.nolink.exec(t))return(t=e[(r[2]||r[1]).replace(/\s+/g," ").toLowerCase()])?H_(r,t,r[0],this.lexer):{type:"text",raw:e=r[0].charAt(0),text:e}}emStrong(s,o,t=""){let l=this.rules.inline.emStrongLDelim.exec(s);if(!(!l||l[3]&&t.match(/[\p{L}\p{N}]/u))&&(!l[1]&&!l[2]||!t||this.rules.inline.punctuation.exec(t))){let t=[...l[0]].length-1,e,r,n=t,i=0,a="*"===l[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,o=o.slice(-1*s.length+t);null!=(l=a.exec(o));){var c,h;if(e=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...e].length,l[3]||l[4])n+=r;else if((l[5]||l[6])&&t%3&&!((t+r)%3))i+=r;else if(!(0<(n-=r)))return r=Math.min(r,r+n+i),c=[...l[0]][0].length,c=s.slice(0,t+l.index+c+r),Math.min(t,r)%2?(h=c.slice(1,-1),{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}):(h=c.slice(2,-2),{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)})}}}codespan(n){if(n=this.rules.inline.code.exec(n)){let t=n[2].replace(/\n/g," "),e=/[^ ]/.test(t),r=/^ /.test(t)&&/ $/.test(t);return t=z_(t=e&&r?t.substring(1,t.length-1):t,!0),{type:"codespan",raw:n[0],text:t}}}br(t){if(t=this.rules.inline.br.exec(t))return{type:"br",raw:t[0]}}del(t){if(t=this.rules.inline.del.exec(t))return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(r){if(r=this.rules.inline.autolink.exec(r)){let t,e;return e="@"===r[2]?"mailto:"+(t=z_(r[1])):t=z_(r[1]),{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}url(t){var r,n;if(r=this.rules.inline.url.exec(t)){let t,e;if("@"===r[2])t=z_(r[0]),e="mailto:"+t;else{for(;n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",n!==r[0];);t=z_(r[0]),e="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){var e;if(t=this.rules.inline.text.exec(t))return e=this.lexer.state.inRawBlock?t[0]:z_(t[0]),{type:"text",raw:t[0],text:e}}},dE=/^(?: *(?:\n|$))+/,_E=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,cE=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,fE=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,hE=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,uE=/(?:[*+-]|\d{1,9}[.)])/,kE=U_(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,uE).replace(/blockCode/g,/ {4}/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).getRegex(),gE=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,pE=/^[^\n]+/,bE=/(?!\s*\])(?:\\.|[^\[\]\\])+/,lE=U_(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",bE).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),uE=U_(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,uE).getRegex(),RE="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",mE=/|$))/,EE=U_("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))","i").replace("comment",mE).replace("tag",RE).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),TE=U_(gE).replace("hr",fE).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",RE).getRegex(),oE={blockquote:U_(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",TE).getRegex(),code:_E,def:lE,fences:cE,heading:hE,hr:fE,html:EE,lheading:kE,list:uE,newline:dE,paragraph:TE,table:aE,text:pE},_E=U_("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",fE).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",RE).getRegex(),lE={...oE,table:_E,paragraph:U_(gE).replace("hr",fE).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",_E).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",RE).getRegex()},cE={...oE,html:U_(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",mE).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:aE,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:U_(gE).replace("hr",fE).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",kE).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},hE=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,EE=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,uE=/^( {2,}|\\)\n(?!\s*$)/,dE=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,RE=U_(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,TE).getRegex(),gE=U_("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,TE).getRegex(),fE=U_("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,TE).getRegex(),kE=U_(/\\([punct])/,"gu").replace(/punct/g,TE).getRegex(),TE=U_(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),mE=U_(mE).replace("(?:--\x3e|$)","--\x3e").getRegex(),mE=U_("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",mE).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),yE=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,vE=U_(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",yE).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xE=U_(/^!?\[(label)\]\[(ref)\]/).replace("label",yE).replace("ref",bE).getRegex(),bE=U_(/^!?\[(ref)\](?:\[\])?/).replace("ref",bE).getRegex(),wE=U_("reflink|nolink(?!\\()","g").replace("reflink",xE).replace("nolink",bE).getRegex(),TE={...kE={_backpedal:aE,anyPunctuation:kE,autolink:TE,blockSkip:_E,br:uE,code:EE,del:aE,emStrongLDelim:RE,emStrongRDelimAst:gE,emStrongRDelimUnd:fE,escape:hE,link:vE,nolink:bE,punctuation:pE,reflink:xE,reflinkSearch:wE,tag:mE,text:dE,url:aE},link:U_(/^!?\[(label)\]\((.*?)\)/).replace("label",yE).getRegex(),reflink:U_(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",yE).getRegex()},_E={...kE,escape:U_(hE).replace("])","~|])").getRegex(),url:U_(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\e+" ".repeat(r.length));let r,n,a;for(;i;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(t=>!!(r=t.call({lexer:this},i,e))&&(i=i.substring(r.raw.length),e.push(r),!0)))){if(r=this.tokenizer.space(i)){i=i.substring(r.raw.length),1===r.raw.length&&0{"number"==typeof(n=t.call({lexer:this},r))&&0<=n&&(e=Math.min(e,n))}),e<1/0&&0<=e&&(a=i.substring(0,e+1))}if(this.state.top&&(r=this.tokenizer.paragraph(a))){n=e[e.length-1],t&&"paragraph"===n?.type?(n.raw+=` +`+r.raw,n.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r),t=a.length!==i.length,i=i.substring(r.raw.length);continue}if(r=this.tokenizer.text(i)){i=i.substring(r.raw.length),(n=e[e.length-1])&&"text"===n.type?(n.raw+=` +`+r.raw,n.text+=` +`+r.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):e.push(r);continue}if(i){var s="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(s);break}throw new Error(s)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(i,e=[]){let r,t,a,n=i,s,o,l;if(this.tokens.links){var c=Object.keys(this.tokens.links);if(0!!(r=t.call({lexer:this},i,e))&&(i=i.substring(r.raw.length),e.push(r),!0)))){if(r=this.tokenizer.escape(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(i)){i=i.substring(r.raw.length),(t=e[e.length-1])&&"text"===r.type&&"text"===t.type?(t.raw+=r.raw,t.text+=r.text):e.push(r);continue}if(r=this.tokenizer.link(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(r.raw.length),(t=e[e.length-1])&&"text"===r.type&&"text"===t.type?(t.raw+=r.raw,t.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(i,n,l)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(i)){i=i.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(i)){i=i.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(i))){i=i.substring(r.raw.length),e.push(r);continue}if(a=i,this.options.extensions&&this.options.extensions.startInline){let e=1/0,r=i.slice(1),n;this.options.extensions.startInline.forEach(t=>{"number"==typeof(n=t.call({lexer:this},r))&&0<=n&&(e=Math.min(e,n))}),e<1/0&&0<=e&&(a=i.substring(0,e+1))}if(r=this.tokenizer.inlineText(a)){i=i.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(l=r.raw.slice(-1)),o=!0,(t=e[e.length-1])&&"text"===t.type?(t.raw+=r.raw,t.text+=r.text):e.push(r);continue}if(i){var h="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(h);break}throw new Error(h)}}return e}},LE=class{static{Ae(this,"_Renderer")}options;parser;constructor(t){this.options=t||K_}space(t){return""}code({text:t,lang:e,escaped:r}){return e=(e||"").match(/^\S*/)?.[0],t=t.replace(/\n$/,"")+` +`,e?'
'+(r?t:z_(t,!0))+`
+`:"
"+(r?t:z_(t,!0))+`
+`}blockquote({tokens:t}){return`
+${this.parser.parse(t)}
+`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} +`}hr(t){return`
+`}list(e){let t=e.ordered,r=e.start,n="";for(let t=0;t +`+n+" +`}listitem(t){let e="";var r;return t.task&&(r=this.checkbox({checked:!!t.checked}),t.loose?0${e+=this.parser.parse(t.tokens,!!t.loose)} +`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

${this.parser.parseInline(t)}

+`}table(e){let t="",r="";for(let t=0;t + +`+t+` +`+(n=n&&`${n}`)+` +`}tablerow({text:t}){return` +${t} +`}tablecell(t){var e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+` +`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${t}`}br(t){return"
"}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){var r=this.parser.parseInline(r),n=j_(t);if(null===n)return r;let i='
"}image({href:t,title:e,text:r}){var n=j_(t);if(null===n)return r;let i=`${r}{t=e[t].flat(1/0),n=n.concat(this.walkTokens(t,r))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,r)))}}return n}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(e=>{var t={...e};if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=i.renderers[n.name];r?i.renderers[n.name]=function(...t){var e=n.renderer.apply(this,t);return!1===e?r.apply(this,t):e}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");var t=i[n.level];t?t.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&("block"===n.level?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:"inline"===n.level&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),t.extensions=i),e.renderer){let i=this.defaults.renderer||new LE(this.defaults);for(var a in e.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(!["options","parser"].includes(a)){let t=a,r=e.renderer[t],n=(e.useNewRenderer||(r=this.#t(r,t,i)),i[t]);i[t]=(...t)=>{var e=r.apply(i,t);return(!1===e?n.apply(i,t):e)||""}}}t.renderer=i}if(e.tokenizer){let i=this.defaults.tokenizer||new sE(this.defaults);for(var s in e.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let t=s,r=e.tokenizer[t],n=i[t];i[t]=(...t)=>{var e=r.apply(i,t);return!1===e?n.apply(i,t):e}}}t.tokenizer=i}if(e.hooks){let i=this.defaults.hooks||new ME;for(var o in e.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if("options"!==o){let t=o,r=e.hooks[t],n=i[t];ME.passThroughHooks.has(o)?i[t]=t=>this.defaults.async?Promise.resolve(r.call(i,t)).then(t=>n.call(i,t)):(t=r.call(i,t),n.call(i,t)):i[t]=(...t)=>{var e=r.apply(i,t);return!1===e?n.apply(i,t):e}}}t.hooks=i}if(e.walkTokens){let r=this.defaults.walkTokens,n=e.walkTokens;t.walkTokens=function(t){let e=[];return e.push(n.call(this,t)),e=r?e.concat(r.call(this,t)):e}}this.defaults={...this.defaults,...t}}),this}#t(c,h,e){switch(h){case"heading":return function(t){return t.type&&t.type===h?c.call(this,e.parser.parseInline(t.tokens),t.depth,q_(e.parser.parseInline(t.tokens,e.parser.textRenderer))):c.apply(this,arguments)};case"code":return function(t){return t.type&&t.type===h?c.call(this,t.text,t.lang,!!t.escaped):c.apply(this,arguments)};case"table":return function(e){if(!e.type||e.type!==h)return c.apply(this,arguments);let t="",r="";for(let t=0;t{let e={...t},n={...this.defaults,...e};if(!0===this.defaults.async&&!1===e.async&&(n.silent||console.warn("marked(): The async option was set to true by an extension. The async: false option sent to parse will be ignored."),n.async=!0),t=this.#r(!!n.silent,!!n.async),"u"i(t,n)).then(t=>n.hooks?n.hooks.processAllTokens(t):t).then(t=>n.walkTokens?Promise.all(this.walkTokens(t,n.walkTokens)).then(()=>t):t).then(t=>a(t,n)).then(t=>n.hooks?n.hooks.postprocess(t):t).catch(t);try{n.hooks&&(r=n.hooks.preprocess(r));let t=i(r,n),e=(n.hooks&&(t=n.hooks.processAllTokens(t)),n.walkTokens&&this.walkTokens(t,n.walkTokens),a(t,n));return n.hooks?n.hooks.postprocess(e):e}catch(e){return t(e)}}}#r(r,n){return t=>{var e;if(t.message+=` +Please report this to https://github.com/markedjs/marked.`,r)return e="

An error occurred:

"+z_(t.message+"",!0)+"
",n?Promise.resolve(e):e;if(n)return Promise.reject(t);throw t}}},DE=new RE,Ae(X_,"marked"),X_.options=X_.setOptions=function(t){return DE.setOptions(t),$_(X_.defaults=DE.defaults),X_},X_.getDefaults=F_,X_.defaults=K_,X_.use=function(...t){return DE.use(...t),$_(X_.defaults=DE.defaults),X_},X_.walkTokens=function(t,e){return DE.walkTokens(t,e)},X_.parseInline=DE.parseInline,X_.Parser=IE,X_.parser=IE.parse,X_.Renderer=LE,X_.TextRenderer=NE,X_.Lexer=AE,X_.lexer=AE.lex,X_.Tokenizer=sE,X_.Hooks=ME,X_.parse=X_,AE.lex});function PE(t,{markdownAutoWrap:e}){return t=F(t.replace(//g,` +`).replace(/\n{2,}/g,` +`)),!1===e?t.replace(/ /g," "):t}function BE(t,e={}){let r=PE(t,e),n=X_.lexer(r),i=[[]],a=0;function s(e,r="normal"){"text"===e.type?e.text.split(` +`).forEach((t,e)=>{0!==e&&(a++,i.push([])),t.split(" ").forEach(t=>{t&&i[a].push({content:t,type:r})})}):"strong"===e.type||"em"===e.type?e.tokens.forEach(t=>{s(t,e.type)}):"html"===e.type&&i[a].push({content:e.text,type:"normal"})}return Ae(s,"processNode"),n.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type&&i[a].push({content:t.text,type:"normal"})}),i}function FE(t,{markdownAutoWrap:e}={}){function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
").replace(/ /g," "):t.text.replace(/\n */g,"
"):"strong"===t.type?`${t.tokens?.map(r).join("")}`:"em"===t.type?`${t.tokens?.map(r).join("")}`:"paragraph"===t.type?`

${t.tokens?.map(r).join("")}

`:"space"===t.type?"":"html"===t.type?""+t.text:"Unsupported markdown: "+t.type}return t=X_.lexer(t),Ae(r,"output"),t.map(r).join("")}var $E=i(()=>{OE(),We(),Ae(PE,"preprocessMarkdown"),Ae(BE,"markdownToLines"),Ae(FE,"markdownToHTML")});function zE(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function qE(t,e){return UE(t,[],zE(e.content),e.type)}function UE(t,e,r,n){var i,a,s;return 0===r.length?[{content:e.join(""),type:n},{content:"",type:n}]:([i,...a]=r,t([{content:(s=[...e,i]).join(""),type:n}])?UE(t,s,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}]))}function jE(t,e){if(t.some(({content:t})=>t.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return GE(t,e)}function GE(t,e,r=[],n=[]){if(0===t.length)return 0{Ae(zE,"splitTextToChars"),Ae(qE,"splitWordToFitWidth"),Ae(UE,"splitWordToFitWidthRecursion"),Ae(jE,"splitLineToFitWidth"),Ae(GE,"splitLineToFitWidthRecursion")});function YE(t,e){e&&t.attr("style",e)}async function HE(t,e,r,n,i=!1){let a=t.append("foreignObject"),s=a.append("xhtml:div"),o=e.label;e.label&&Vo(e.label)&&(o=await Ko(e.label.replace(L.lineBreakRegex,` +`),D()));var t=e.isNode?"nodeLabel":"edgeLabel",l=s.append("span");return l.html(o),YE(l,e.labelStyle),l.attr("class",t+" "+n),YE(s,e.labelStyle),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("line-height","1.5"),s.style("max-width",r+"px"),s.style("text-align","center"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&s.attr("class","labelBkg"),(l=s.node().getBoundingClientRect()).width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),l=s.node().getBoundingClientRect()),a.node()}function VE(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function XE(t,e,r){return QE(e=VE(t=t.append("text"),1,e),r),r=e.node().getComputedTextLength(),t.remove(),r}function KE(t,e,r){return QE(e=VE(t=t.append("text"),1,e),[{content:r,type:"normal"}]),(r=e.node()?.getBoundingClientRect())&&t.remove(),r}function ZE(e,t,r,n=!1){let i=t.append("g"),a=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1"),o=0;for(var l of r){var c,h=Ae(t=>XE(i,1.1,t)<=e,"checkWidth");for(c of h(l)?[l]:jE(l,h))QE(VE(s,o,1.1),c),o++}return(n?(t=s.node().getBBox(),a.attr("x",-2).attr("y",-2).attr("width",t.width+4).attr("height",t.height+4),i):s).node()}function QE(n,t){n.text(""),t.forEach((t,e)=>{var r=n.append("tspan").attr("font-style","em"===t.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===t.type?"bold":"normal");0===e?r.text(t.content):r.text(" "+t.content)})}function JE(t){return t.replace(/fa[bklrs]?:fa-[\w-]+/g,t=>``)}var tS,eS=i(()=>{wc(),al(),i3(),t(),$E(),rT(),WE(),Ae(YE,"applyStyle"),Ae(HE,"addHtmlSpan"),Ae(VE,"createTspan"),Ae(XE,"computeWidthOfText"),Ae(KE,"computeDimensionOfText"),Ae(ZE,"createFormattedText"),Ae(QE,"updateTextContentAndStyles"),Ae(JE,"replaceIconSubstring"),tS=Ae(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>(R.info("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",l),a?(n=FE(e,c),a=JE(tT(n)),n=e.replace(/\\\\/g,"\\"),HE(t,{isNode:s,label:Vo(e)?n:a,labelStyle:r.replace("fill:","color:")},o,i,l)):(n=ZE(o,t,BE(e.replace(//g,"
").replace("
","
"),c),!!e&&l),s?(a=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),O(n).attr("style",a)):(i=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),O(n).select("rect").attr("style",i.replace(/background:/g,"fill:")),o=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),O(n).select("text").attr("style",o)),n)),"createText")});function rS(t,e){e&&t.attr("style",e)}function nS(t){var e=O(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),rS(a,t.labelStyle),a.attr("class",i),rS(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var iS,aS,sS=i(()=>{i3(),t(),wc(),al(),rT(),eS(),Ae(rS,"applyStyle"),Ae(nS,"addHtmlLabel"),iS=Ae((t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),$o(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"
"),R.debug("vertexText"+i),nS({isNode:n,label:JE(tT(i)),labelStyle:e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),aS=iS});function oS(t,e){return t.intersect(e)}var lS,cS=i(()=>{Ae(oS,"intersectNode"),lS=oS});function hS(t,e,r,n){var i=t.x,t=t.y,a=i-n.x,s=t-n.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(n.x{Ae(hS,"intersectEllipse"),uS=hS});function pS(t,e,r){return uS(t,e,e,r)}var gS,fS=i(()=>{dS(),Ae(pS,"intersectCircle"),gS=pS});function mS(t,e,r,n){var i,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.y,u=l*r.x+c*r.y+h,d=l*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0{Ae(mS,"intersectLine"),Ae(yS,"sameSign"),vS=mS});function bS(t,e,n){var r=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=r-t.width/2-s,c=i-t.height/2-o,h=0;h{xS(),Ae(wS=bS,"intersectPolygon")}),SS=i(()=>{kS=Ae((t,e)=>{var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:n+r,y:i+t}},"intersectRect"),TS=kS}),CS=i(()=>{cS(),fS(),dS(),ES(),SS(),_S={node:lS,circle:gS,ellipse:uS,polygon:wS,rect:TS}});function AS(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var LS,NS,IS,MS,RS=i(()=>{sS(),eS(),wc(),i3(),al(),rT(),LS=Ae(async(t,e,r,i)=>{let a=D(),n,s=e.useHtmlLabels||$o(a.flowchart.htmlLabels),o=(n=r||"node default",t.insert("g").attr("class",n).attr("id",e.domId||e.id)),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),c,h=(c=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],l.node()),u,d=(u="markdown"===e.labelType?tS(l,Mo(tT(c),a),{useHtmlLabels:s,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(aS(Mo(tT(c),a),e.labelStyle,!1,i))).getBBox(),p=e.padding/2;if($o(a.flowchart.htmlLabels)){if(r=u.children[0],t=O(u),i=r.getElementsByTagName("img")){let n=""===c.replace(/]*>/g,"").trim();await Promise.all([...i].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=a.fontSize||window.getComputedStyle(document.body).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}Ae(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}d=r.getBoundingClientRect(),t.attr("width",d.width),t.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),NS=Ae((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),Ae(AS,"insertPolygonShape")}),DS=i(()=>{RS(),t(),wc(),CS(),IS=Ae(async(t,e)=>{e.useHtmlLabels||D().flowchart.htmlLabels||(e.centerLabel=!0);var{shapeSvg:t,bbox:r,halfPadding:n}=await LS(t,e,"node "+e.classes,!0),i=(R.info("Classes = ",e.classes),t.insert("rect",":first-child"));return i.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-n).attr("y",-r.height/2-n).attr("width",r.width+e.padding).attr("height",r.height+e.padding),NS(e,i),e.intersect=function(t){return _S.rect(e,t)},t},"note"),MS=IS});function OS(t,e,r,n){let i=[],a=Ae(t=>{i.push(t,0)},"addBorder"),s=Ae(t=>{i.push(0,t)},"skipBorder");(e.includes("t")?(R.debug("add top border"),a):s)(r),(e.includes("r")?(R.debug("add right border"),a):s)(n),(e.includes("b")?(R.debug("add bottom border"),a):s)(r),(e.includes("l")?(R.debug("add left border"),a):s)(n),t.attr("stroke-dasharray",i.join(" "))}var PS,BS,FS,$S,zS,qS,US,jS,GS,WS,YS,HS,VS,XS,KS,ZS,QS,JS,tC,eC,rC,nC,iC,aC,sC,oC,lC,cC,hC,uC,dC,pC,gC,fC=i(()=>{i3(),wc(),al(),t(),B_(),sS(),CS(),DS(),RS(),PS=Ae(t=>t?" "+t:"","formatClass"),BS=Ae((t,e)=>`${e||"node default"}${PS(t.classes)} `+PS(t.class),"getClassesFromNode"),FS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await LS(t,e,BS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=i+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];return R.info("Question main (Circle)"),(t=AS(r,s,s,o)).attr("style",e.style),NS(e,t),e.intersect=function(t){return R.warn("Intersect called"),_S.polygon(e,o,t)},r},"question"),$S=Ae((t,e)=>((t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return _S.circle(e,14,t)},t),"choice"),zS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await LS(t,e,BS(e,void 0),!0),i=n.height+e.padding,a=i/4,s=n.width+2*a+e.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=AS(r,s,i,o);return l.attr("style",e.style),NS(e,l),e.intersect=function(t){return _S.polygon(e,o,t)},r},"hexagon"),qS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await LS(t,e,void 0,!0),i=n.height+2*e.padding,a=i/2,s=n.width+2*a+e.padding,o=O_(e.directions,n,e),l=AS(r,s,i,o);return l.attr("style",e.style),NS(e,l),e.intersect=function(t){return _S.polygon(e,o,t)},r},"block_arrow"),US=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await LS(t,e,BS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return AS(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(t){return _S.polygon(e,s,t)},r},"rect_left_inv_arrow"),jS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await LS(t,e,BS(e),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=AS(r,i,a,s);return o.attr("style",e.style),NS(e,o),e.intersect=function(t){return _S.polygon(e,s,t)},r},"lean_right"),GS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await LS(t,e,BS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=AS(r,i,a,s);return o.attr("style",e.style),NS(e,o),e.intersect=function(t){return _S.polygon(e,s,t)},r},"lean_left"),WS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await LS(t,e,BS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=AS(r,i,a,s);return o.attr("style",e.style),NS(e,o),e.intersect=function(t){return _S.polygon(e,s,t)},r},"trapezoid"),YS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await LS(t,e,BS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=AS(r,i,a,s);return o.attr("style",e.style),NS(e,o),e.intersect=function(t){return _S.polygon(e,s,t)},r},"inv_trapezoid"),HS=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await LS(t,e,BS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=AS(r,i,a,s);return o.attr("style",e.style),NS(e,o),e.intersect=function(t){return _S.polygon(e,s,t)},r},"rect_right_inv_arrow"),VS=Ae(async(t,i)=>{let{shapeSvg:e,bbox:r}=await LS(t,i,BS(i,void 0),!0),n=r.width+i.padding,a=n/2,s=a/(2.5+n/50),o=r.height+s+i.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+n+" 0 a "+a+","+s+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+n+" 0 l 0,"+-o,c=e.attr("label-offset-y",s).insert("path",":first-child").attr("style",i.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+s)+")");return NS(i,c),i.intersect=function(e){var r=_S.rect(i,e),n=r.x-i.x;if(0!=a&&(Math.abs(n)i.height/2-s)){let t=s*s*(1-n*n/(a*a));0!=t&&(t=Math.sqrt(t)),t=s-t,0{var{shapeSvg:t,bbox:r,halfPadding:n}=await LS(t,e,"node "+e.classes+" "+e.class,!0),i=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-n,r=e.positioned?-s/2:-r.height/2-n;return i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(n=new Set(Object.keys(e.props)),e.props.borders&&(OS(i,e.props.borders,a,s),n.delete("borders")),n.forEach(t=>{R.warn("Unknown node property "+t)})),NS(e,i),e.intersect=function(t){return _S.rect(e,t)},t},"rect"),KS=Ae(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:n}=await LS(t,e,"node "+e.classes,!0),i=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-n,r=e.positioned?-s/2:-r.height/2-n;return i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(n=new Set(Object.keys(e.props)),e.props.borders&&(OS(i,e.props.borders,a,s),n.delete("borders")),n.forEach(t=>{R.warn("Unknown node property "+t)})),NS(e,i),e.intersect=function(t){return _S.rect(e,t)},t},"composite"),ZS=Ae(async(t,e)=>{var r,t=(await LS(t,e,"label",!0)).shapeSvg,n=(R.trace("Classes = ",e.class),t.insert("rect",":first-child"));return n.attr("width",0).attr("height",0),t.attr("class","label edgeLabel"),e.props&&(r=new Set(Object.keys(e.props)),e.props.borders&&(OS(n,e.props.borders,0,0),r.delete("borders")),r.forEach(t=>{R.warn("Unknown node property "+t)})),NS(e,n),e.intersect=function(t){return _S.rect(e,t)},t},"labelRect"),Ae(OS,"applyNodePropertyBorders"),QS=Ae((t,e)=>{let r,n=(r=e.classes?"node "+e.classes:"node default",t.insert("g").attr("class",r).attr("id",e.domId||e.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,l,c=(l="object"==typeof o?o[0]:o,R.info("Label text abc79",l,o,"object"==typeof o),s.node().appendChild(aS(l,e.labelStyle,!0,!0))),h={width:0,height:0};$o(D().flowchart.htmlLabels)&&(t=c.children[0],d=O(c),h=t.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),R.info("Text 2",o);var u,t=o.slice(1,o.length),d=c.getBBox(),t=s.node().appendChild(aS(t.join?t.join("
"):t,e.labelStyle,!0,!0)),p=($o(D().flowchart.htmlLabels)&&(p=t.children[0],u=O(t),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),e.padding/2);return O(t).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),O(c).attr("transform","translate( "+(h.width{var{shapeSvg:t,bbox:r}=await LS(t,e,BS(e,void 0),!0),n=r.height+e.padding,r=r.width+n/4+e.padding,r=t.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-r/2).attr("y",-n/2).attr("width",r).attr("height",n);return NS(e,r),e.intersect=function(t){return _S.rect(e,t)},t},"stadium"),tC=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await LS(t,e,BS(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),R.info("Circle main"),NS(e,a),e.intersect=function(t){return R.info("Circle intersect",e,n.width/2+i,t),_S.circle(e,n.width/2+i,t)},r},"circle"),eC=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await LS(t,e,BS(e,void 0),!0),a=r.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),R.info("DoubleCircle main"),NS(e,s),e.intersect=function(t){return R.info("DoubleCircle intersect",e,n.width/2+i+5,t),_S.circle(e,n.width/2+i+5,t)},r},"doublecircle"),rC=Ae(async(t,e)=>{let{shapeSvg:r,bbox:n}=await LS(t,e,BS(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=AS(r,i,a,s);return o.attr("style",e.style),NS(e,o),e.intersect=function(t){return _S.polygon(e,s,t)},r},"subroutine"),nC=Ae((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),NS(e,r),e.intersect=function(t){return _S.circle(e,7,t)},t},"start"),iC=Ae((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;return"LR"===r&&(i=10,a=70),t=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join"),NS(e,t),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return _S.rect(e,t)},n},"forkJoin"),aC=Ae((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child"),n=t.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),NS(e,n),e.intersect=function(t){return _S.circle(e,7,t)},t},"end"),sC=Ae((t,s)=>{let e=s.padding/2,r,n=(r=s.classes?"node "+s.classes:"node default",t.insert("g").attr("class",r).attr("id",s.domId||s.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),o=n.insert("line"),l=0,c=4,h=n.insert("g").attr("class","label"),u=0,d=s.classData.annotations?.[0],p=s.classData.annotations[0]?"«"+s.classData.annotations[0]+"»":"",g=h.node().appendChild(aS(p,s.labelStyle,!0,!0)),f=g.getBBox(),m=($o(D().flowchart.htmlLabels)&&(t=g.children[0],y=O(g),f=t.getBoundingClientRect(),y.attr("width",f.width),y.attr("height",f.height)),s.classData.annotations[0]&&(c+=f.height+4,l+=f.width),s.classData.label);var y;void 0!==s.classData.type&&""!==s.classData.type&&(D().flowchart.htmlLabels?m+="<"+s.classData.type+">":m+="<"+s.classData.type+">"),O(t=h.node().appendChild(aS(m,s.labelStyle,!0,!0))).attr("class","classTitle");let v=t.getBBox(),x=($o(D().flowchart.htmlLabels)&&(y=t.children[0],w=O(t),v=y.getBoundingClientRect(),w.attr("width",v.width),w.attr("height",v.height)),c+=v.height+4,v.width>l&&(l=v.width),[]),b=(s.classData.members.forEach(t=>{let e=t.getDisplayDetails(),r=e.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(//g,">")),h.node().appendChild(aS(r,e.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox();var a;$o(D().flowchart.htmlLabels)&&(t=n.children[0],a=O(n),i=t.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,x.push(n)}),c+=8,[]);s.classData.methods.forEach(t=>{let e=t.getDisplayDetails(),r=e.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(//g,">")),h.node().appendChild(aS(r,e.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox();var a;$o(D().flowchart.htmlLabels)&&(t=n.children[0],a=O(n),i=t.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,b.push(n)}),c+=8,d&&(y=(l-f.width)/2,O(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*c/2+")"),u=f.height+4);var w=(l-v.width)/2;return O(t).attr("transform","translate( "+(-1*l/2+w)+", "+(-1*c/2+u)+")"),u+=v.height+4,a.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,x.forEach(t=>{O(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u+4)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),u+=8,o.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,b.forEach(t=>{O(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),i.attr("style",s.style).attr("class","outer title-state").attr("x",-l/2-e).attr("y",-c/2-e).attr("width",l+s.padding).attr("height",c+s.padding),NS(s,i),s.intersect=function(t){return _S.rect(s,t)},n},"class_box"),oC={rhombus:FS,composite:KS,question:FS,rect:XS,labelRect:ZS,rectWithTitle:QS,choice:$S,circle:tC,doublecircle:eC,stadium:JS,hexagon:zS,block_arrow:qS,rect_left_inv_arrow:US,lean_right:jS,lean_left:GS,trapezoid:WS,inv_trapezoid:YS,rect_right_inv_arrow:HS,cylinder:VS,start:nC,end:aC,note:MS,subroutine:rC,fork:iC,join:iC,class_box:sC},lC={},cC=Ae(async(e,r,n)=>{let i,a;if(r.link){let t;"sandbox"===D().securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t),a=await oC[r.shape](i,r,n)}else a=await oC[r.shape](e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),lC[r.id]=i,r.haveCallback&&lC[r.id].attr("class",lC[r.id].attr("class")+" clickable"),i},"insertNode"),hC=Ae((t,e)=>{lC[e.id]=t},"setNodeElem"),uC=Ae(()=>{lC={}},"clear"),dC=Ae(t=>{var e=lC[t.id],r=(R.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")}),mC=i(()=>{i3(),fC(),pC=Ae((t,e)=>{let r;return"sandbox"===e&&(r=O("#i"+t)),O("sandbox"===e?r.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)},"getDiagramElement")}),yC=i(()=>{gC=Ae(({flowchart:t})=>{var e=t?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:t=t?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:e+t}},"getSubGraphTitleMargins")});function vC(t,e,r){if(t&&t.length){var n,[i,a]=e,e=Math.PI/180*r,s=Math.cos(e),o=Math.sin(e);for(n of t){var[l,c]=n;n[0]=(l-i)*s-(c-a)*o+i,n[1]=(l-i)*o+(c-a)*s+a}}}function xC(t,e){return t[0]===e[0]&&t[1]===e[1]}function bC(t,r,n,e=1){var i=n,n=Math.max(r,.1),p=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,a=[0,0];if(i)for(var s of p)vC(s,a,i);if(r=function(e,i){var t,r=[];for(t of p){var n=[...t];xC(n[0],n[n.length-1])||n.push([n[0][0],n[0][1]]),2t.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),o.length){let r=[],n=o[0].ymin,t=0;for(;r.length||o.length;){if(o.length){let e=-1;for(let t=0;tn);t++)e=t;o.splice(0,e+1).forEach(t=>{r.push({s:n,edge:t})})}if((r=r.filter(t=>!(t.edge.ymax<=n))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==i||t%e==0)&&1=r.length);t+=2){var u=r[t].edge,d=r[d].edge;s.push([[Math.round(u.x),n],[Math.round(d.x),n]])}n+=i,r.forEach(t=>{t.edge.x=t.edge.x+i*t.edge.islope}),t++}}return s}(n,e),i){for(var o of p)vC(o,a,-i);{t=a,n=-i;let e=[];r.forEach(t=>e.push(...t)),vC(e,t,n)}}return r}function wC(t,e){let r=e.hachureAngle+90,n=e.hachureGap,i=(n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1)),1);return 1<=e.roughness&&.7<((null==(e=e.randomizer)?void 0:e.next())||Math.random())&&(i=n),bC(t,n,r,i||1)}function kC(t){var e=t[0],t=t[1];return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function TC(t,e){return t.type===e}function _C(t){let n=[],i=function(t){for(var e=new Array;""!==t;){if(!t.match(/^([ \t\r\n,]+)/))if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:p9,text:RegExp.$1};else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:g9,text:""+parseFloat(RegExp.$1)}}t=t.substr(RegExp.$1.length)}return e[e.length]={type:f9,text:""},e}(t),a="BOD",s=0,o=i[s];for(;!TC(o,f9);){let e=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return _C("M0,0"+t);s++,e=m9[o.text],a=o.text}else TC(o,g9)?e=m9[a]:(s++,e=m9[o.text],a=o.text);if(!(s+ee%2?t+n:t+r);a.push({key:"C",data:l}),r=l[4],n=l[5];break;case"Q":a.push({key:"Q",data:[...o]}),r=o[2],n=o[3];break;case"q":l=o.map((t,e)=>e%2?t+n:t+r),a.push({key:"Q",data:l}),r=l[2],n=l[3];break;case"A":a.push({key:"A",data:[...o]}),r=o[5],n=o[6];break;case"a":r+=o[5],n+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],r,n]});break;case"H":a.push({key:"H",data:[...o]}),r=o[0];break;case"h":r+=o[0],a.push({key:"H",data:[r]});break;case"V":a.push({key:"V",data:[...o]}),n=o[0];break;case"v":n+=o[0],a.push({key:"V",data:[n]});break;case"S":a.push({key:"S",data:[...o]}),r=o[2],n=o[3];break;case"s":var c=o.map((t,e)=>e%2?t+n:t+r);a.push({key:"S",data:c}),r=c[2],n=c[3];break;case"T":a.push({key:"T",data:[...o]}),r=o[0],n=o[1];break;case"t":r+=o[0],n+=o[1],a.push({key:"T",data:[r,n]});break;case"Z":case"z":a.push({key:"Z",data:[]}),r=e,n=i}return a}function SC(t){let i=[],a="",s=0,o=0,e=0,r=0,l=0,c=0;for(var{key:n,data:h}of t){switch(n){case"M":i.push({key:"M",data:[...h]}),[s,o]=h,[e,r]=h;break;case"C":i.push({key:"C",data:[...h]}),s=h[4],o=h[5],l=h[2],c=h[3];break;case"L":i.push({key:"L",data:[...h]}),[s,o]=h;break;case"H":s=h[0],i.push({key:"L",data:[s,o]});break;case"V":o=h[0],i.push({key:"L",data:[s,o]});break;case"S":{let t=0,e;e="C"===a||"S"===a?(t=s+(s-l),o+(o-c)):(t=s,o),i.push({key:"C",data:[t,e,...h]}),l=h[0],c=h[1],s=h[2],o=h[3];break}case"T":{let[t,e]=h,r=0,n;n="Q"===a||"T"===a?(r=s+(s-l),o+(o-c)):(r=s,o);var u=s+2*(r-s)/3,d=o+2*(n-o)/3,p=t+2*(r-t)/3,g=e+2*(n-e)/3;i.push({key:"C",data:[u,d,p,g,t,e]}),l=r,c=n,s=t,o=e;break}case"Q":var[u,d,p,g]=h,f=s+2*(u-s)/3,m=o+2*(d-o)/3;i.push({key:"C",data:[f,m,p+2*(u-p)/3,g+2*(d-g)/3,p,g]}),l=u,c=d,s=p,o=g;break;case"A":var f=Math.abs(h[0]),m=Math.abs(h[1]),y=h[2],v=h[3],x=h[4],b=h[5],w=h[6];0===f||0===m?(i.push({key:"C",data:[s,o,b,w,b,w]}),s=b,o=w):s===b&&o===w||(AC(s,o,b,w,f,m,y,v,x).forEach(function(t){i.push({key:"C",data:t})}),s=b,o=w);break;case"Z":i.push({key:"Z",data:[]}),s=e,o=r}a=n}return i}function CC(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function AC(t,e,r,n,i,a,s,o,l,c){var h=Math.PI*s/180;let u=[],d=0,p=0,g=0,f=0;c?[d,p,g,f]=c:([t,e]=CC(t,e,-h),[r,n]=CC(r,n,-h),1<(m=(y=(t-r)/2)*y/(i*i)+(v=(e-n)/2)*v/(a*a))&&(i*=m=Math.sqrt(m),a*=m),m=i*i,x=a*a,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*x-m*v*v-x*y*y)/(m*v*v+x*y*y))),g=o*i*v/a+(t+r)/2,f=o*-a*y/i+(e+n)/2,d=Math.asin(parseFloat(((e-f)/a).toFixed(9))),p=Math.asin(parseFloat(((n-f)/a).toFixed(9))),tp&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI));var m=p-d,y=(Math.abs(m)>120*Math.PI/180&&(x=p,v=r,o=n,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=AC(r=g+i*Math.cos(p),n=f+a*Math.sin(p),v,o,i,a,s,0,l,[p,x,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),x=4/3*i*(l=Math.tan(m/4)),i=[t,e],a=[t+x*v,e-(m=4/3*a*l)*y],l=[r+x*s,n-m*o],t=[r,n];if(a[0]=2*i[0]-a[0],a[1]=2*i[1]-a[1],c)return[a,l,t].concat(u);u=[a,l,t].concat(u);var b=[];for(let t=0;t2*Math.PI&&(c=0,h=2*Math.PI),i=2*Math.PI/l.curveStepCount,i=VC(a=Math.min(i/2,(h-c)/2),t,e,r,n,c,h,1,l),l.disableMultiStroke||(a=VC(a,t,e,r,n,c,h,1.5,l),i.push(...a)),s&&(o?i.push(...jC(t,e,t+r*Math.cos(c),e+n*Math.sin(c),l),...jC(t,e,t+r*Math.cos(h),e+n*Math.sin(h),l)):i.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+r*Math.cos(c),e+n*Math.sin(c)]})),{type:"path",ops:i}}function PC(t,e){let r=SC(EC(_C(t))),n=[],i=[0,0],a=[0,0];for(var{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...jC(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":var[l,c,h,u,d,p]=o;n.push(...XC(l,c,h,u,d,p,a,e)),a=[d,p];break;case"Z":n.push(...jC(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function BC(t,e){var r,n=[];for(r of t)if(r.length){var i=e.maxRandomnessOffset||0,a=r.length;if(2o?l/10:h)/2,d=.2+.2*zC(i),p=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=UC(p,i,c),g=UC(g,i,c);var f=[],m=Ae(()=>UC(u,i,c),"M"),y=Ae(()=>UC(h,i,c),"k"),v=i.preserveVertices;return a&&f.push(s?{op:"move",data:[t+(v?0:m()),e+(v?0:m())]}:{op:"move",data:[t+(v?0:UC(h,i,c)),e+(v?0:UC(h,i,c))]}),f.push(s?{op:"bcurveTo",data:[p+t+(r-t)*d+m(),g+e+(n-e)*d+m(),p+t+2*(r-t)*d+m(),g+e+2*(n-e)*d+m(),r+(v?0:m()),n+(v?0:m())]}:{op:"bcurveTo",data:[p+t+(r-t)*d+y(),g+e+(n-e)*d+y(),p+t+2*(r-t)*d+y(),g+e+2*(n-e)*d+y(),r+(v?0:y()),n+(v?0:y())]}),f}function WC(e,r,n){if(!e.length)return[];var i=[];i.push([e[0][0]+UC(r,n),e[0][1]+UC(r,n)]),i.push([e[0][0]+UC(r,n),e[0][1]+UC(r,n)]);for(let t=1;tl&&(l=h,c=t)}return Math.sqrt(l)>t?(n9(e,r,c+1,t,a),n9(e,c,n,t,a)):(a.length||a.push(s),a.push(o)),a}function i9(e,r=.15,t){var n=[],i=(e.length-1)/3;for(let t=0;t{Ae(vC,"t"),Ae(xC,"e"),Ae(bC,"s"),Ae(wC,"n"),a9=class{static{Ae(this,"o")}constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){return t=wC(t,e),{type:"fillSketch",ops:this.renderLines(t,e)}}renderLines(t,e){var r,n=[];for(r of t)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return n}},Ae(kC,"a"),s9=class extends a9{static{Ae(this,"h")}fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);var n,i,t=wC(t,Object.assign({},e,{hachureGap:r})),a=Math.PI/180*e.hachureAngle,s=[],o=.5*r*Math.cos(a),l=.5*r*Math.sin(a);for([n,i]of t)kC([n,i])&&s.push([[n[0]-o,n[1]+l],[...i]],[[n[0]+o,n[1]-l],[...i]]);return{type:"fillSketch",ops:this.renderLines(s,e)}}},o9=class extends a9{static{Ae(this,"r")}fillPolygons(t,e){var r=this._fillPolygons(t,e),e=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),t=this._fillPolygons(t,e);return r.ops=r.ops.concat(t.ops),r}},l9=class{static{Ae(this,"i")}constructor(t){this.helper=t}fillPolygons(t,e){return t=wC(t,e=Object.assign({},e,{hachureAngle:0})),this.dotsOnLines(t,e)}dotsOnLines(t,e){let r=[],n=e.hachureGap,i=(n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1),e.fillWeight);i<0&&(i=e.strokeWidth/2);var a,s=n/4;for(a of t){var o=kC(a),l=o/n,c=Math.ceil(l)-1,h=o-c*n,u=(a[0][0]+a[1][0])/2-n/4,d=Math.min(a[0][1],a[1][1]);for(let t=0;t{let e=kC(t),r=Math.floor(e/(h+u)),n=(e+u-r*(h+u))/2,i=t[0],a=t[1];i[0]>a[0]&&(i=t[1],a=t[0]);var s=Math.atan((a[1]-i[1])/(a[0]-i[0]));for(let t=0;t{let e=kC(t),r=Math.round(e/(2*c)),n=t[0],i=t[1];n[0]>i[0]&&(n=t[1],i=t[0]);var a=Math.atan((i[1]-n[1])/(i[0]-n[0]));for(let t=0;t2*Math.PI&&(l=0,c=2*Math.PI);var h=(c-l)/n.curveStepCount,u=[];for(let t=l;t<=c;t+=h)u.push([i+s*Math.cos(t),a+o*Math.sin(t)]);return u.push([i+s*Math.cos(c),a+o*Math.sin(c)]),u.push([i,a]),FC([u],n)}(t,e,r,i))),i.stroke!==v9&&a.push(s),this._d("arc",a,i)}curve(t,e){var r=this._o(e),e=[],n=MC(t,r);if(r.fill&&r.fill!==v9)if("solid"===r.fillStyle){var i=MC(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));e.push({type:"fillPath",ops:this._mergedShape(i.ops)})}else{var a,s=[];if((i=t).length)for(a of"number"==typeof i[0][0]?[i]:i)a.length<3?s.push(...a):3===a.length?s.push(...i9(ZC([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...i9(ZC(a),10,(1+r.roughness)/2));s.length&&e.push(FC([s],r))}return r.stroke!==v9&&e.push(n),this._d("curve",e,r)}polygon(t,e){var r=[],n=NC(t,!0,e=this._o(e));return e.fill&&("solid"===e.fillStyle?r.push(BC([t],e)):r.push(FC([t],e))),e.stroke!==v9&&r.push(n),this._d("polygon",r,e)}path(t,e){let r=this._o(e),n=[];var i,a,s,o;return t&&(t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),e=r.fill&&"transparent"!==r.fill&&r.fill!==v9,i=r.stroke!==v9,s=function(t,e){let r=SC(EC(_C(t))),n=[],i=[],a=[0,0],s=[],o=Ae(()=>{4<=s.length&&i.push(...i9(s,1)),s=[]},"i"),l=Ae(()=>{o(),i.length&&(n.push(i),i=[])},"c");for(var{key:c,data:h}of r)switch(c){case"M":l(),a=[h[0],h[1]],i.push(a);break;case"L":o(),i.push([h[0],h[1]]);break;case"C":var u;s.length||(u=i.length?i[i.length-1]:a,s.push([u[0],u[1]])),s.push([h[0],h[1]]),s.push([h[2],h[3]]),s.push([h[4],h[5]]);break;case"Z":o(),i.push([a[0],a[1]])}if(l(),!e)return n;var d,p=[];for(d of n){var g=r9(d,e);g.length&&p.push(g)}return p}(t,(a=!!(r.simplification&&r.simplification<1))?4-4*(r.simplification||1):(1+r.roughness)/2),o=PC(t,r),e&&("solid"===r.fillStyle?1===s.length?(e=PC(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),n.push({type:"fillPath",ops:this._mergedShape(e.ops)})):n.push(BC(s,r)):n.push(FC(s,r))),i)&&(a?s.forEach(t=>{n.push(NC(t,!1,r))}):n.push(o)),this._d("path",n,r)}opsToPath(t,e){let r="";for(var n of t.ops){var i="number"==typeof e&&0<=e?n.data.map(t=>+t.toFixed(e)):n.data;switch(n.op){case"move":r+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":r+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":r+=`L${i[0]} ${i[1]} `}}return r.trim()}toPaths(t){var e,r=t.sets||[],n=t.options||this.defaultOptions,i=[];for(e of r){let t=null;switch(e.type){case"path":t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:v9};break;case"fillPath":t={d:this.opsToPath(e),stroke:v9,strokeWidth:0,fill:n.fill||v9};break;case"fillSketch":t=this.fillSketch(e,n)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||v9,strokeWidth:r,fill:v9}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}},b9=class{static{Ae(this,"st")}constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new x9(e)}draw(t){var e,r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(e of r)switch(e.type){case"path":i.save(),i.strokeStyle="none"===n.stroke?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,e,a),i.restore();break;case"fillPath":i.save(),i.fillStyle=n.fill||"";var s="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,e,a,s),i.restore();break;case"fillSketch":this.fillSketch(i,e,n)}}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=n,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,n="nonzero"){t.beginPath();for(var i of e.ops){var a="number"==typeof r&&0<=r?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,n,i){return t=this.gen.line(t,e,r,n,i),this.draw(t),t}rectangle(t,e,r,n,i){return t=this.gen.rectangle(t,e,r,n,i),this.draw(t),t}ellipse(t,e,r,n,i){return t=this.gen.ellipse(t,e,r,n,i),this.draw(t),t}circle(t,e,r,n){return t=this.gen.circle(t,e,r,n),this.draw(t),t}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t),t}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t),t}arc(t,e,r,n,i,a,s=!1,o){return t=this.gen.arc(t,e,r,n,i,a,s,o),this.draw(t),t}curve(t,e){return t=this.gen.curve(t,e),this.draw(t),t}path(t,e){return t=this.gen.path(t,e),this.draw(t),t}},w9="http://www.w3.org/2000/svg",k9=class{static{Ae(this,"ot")}constructor(t,e){this.svg=t,this.gen=new x9(e)}draw(e){var r,t=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(w9,"g"),s=e.options.fixedDecimalPlaceDigits;for(r of t){let t=null;switch(r.type){case"path":(t=i.createElementNS(w9,"path")).setAttribute("d",this.opsToPath(r,s)),t.setAttribute("stroke",n.stroke),t.setAttribute("stroke-width",n.strokeWidth+""),t.setAttribute("fill","none"),n.strokeLineDash&&t.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",""+n.strokeLineDashOffset);break;case"fillPath":(t=i.createElementNS(w9,"path")).setAttribute("d",this.opsToPath(r,s)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",n.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(i,r,n)}t&&a.appendChild(t)}return a}fillSketch(t,e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),(t=t.createElementNS(w9,"path")).setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),t.setAttribute("stroke",r.fill||""),t.setAttribute("stroke-width",n+""),t.setAttribute("fill","none"),r.fillLineDash&&t.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&t.setAttribute("stroke-dashoffset",""+r.fillLineDashOffset),t}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,n,i){return t=this.gen.line(t,e,r,n,i),this.draw(t)}rectangle(t,e,r,n,i){return t=this.gen.rectangle(t,e,r,n,i),this.draw(t)}ellipse(t,e,r,n,i){return t=this.gen.ellipse(t,e,r,n,i),this.draw(t)}circle(t,e,r,n){return t=this.gen.circle(t,e,r,n),this.draw(t)}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t)}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t)}arc(t,e,r,n,i,a,s=!1,o){return t=this.gen.arc(t,e,r,n,i,a,s,o),this.draw(t)}curve(t,e){return t=this.gen.curve(t,e),this.draw(t)}path(t,e){return t=this.gen.path(t,e),this.draw(t)}},T9={canvas:Ae((t,e)=>new b9(t,e),"canvas"),svg:Ae((t,e)=>new k9(t,e),"svg"),generator:Ae(t=>new x9(t),"generator"),newSeed:Ae(()=>x9.newSeed(),"newSeed")}}),C9=i(()=>{_9=Ae((t,e)=>{var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:n+r,y:i+t}},"intersectRect"),E9=_9});function A9(t,e){e&&t.attr("style",e)}async function L9(t){let e=O(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label;t.label&&Vo(t.label)&&(n=await Ko(t.label.replace(L.lineBreakRegex,` +`),D()));var i=t.isNode?"nodeLabel":"edgeLabel";return r.html('"+n+""),A9(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var N9,I9,M9,R9,D9,O9,P9,B9,F9,$9,z9,q9,U9,j9,G9,W9,Y9=i(()=>{i3(),t(),wc(),al(),rT(),Ae(A9,"applyStyle"),Ae(L9,"addHtmlLabel"),N9=Ae(async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),$o(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"
"),R.info("vertexText"+i),L9({isNode:n,label:tT(i).replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),labelStyle:e&&e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),I9=N9}),H9=i(()=>{M9=Ae((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD")}),V9=i(()=>{wc(),R9=Ae(t=>({fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:D().handDrawnSeed}),"solidStateFill"),D9=Ae(t=>({stylesMap:t=O9([...t.cssCompiledStyles||[],...t.cssStyles||[]]),stylesArray:[...t]}),"compileStyles"),O9=Ae(t=>{let r=new Map;return t.forEach(t=>{var[t,e]=t.split(":");r.set(t.trim(),e?.trim())}),r},"styles2Map"),P9=Ae(t=>{let e=D9(t).stylesArray,r=[],n=[],i=[],a=[];return e.forEach(t=>{var e=t[0];"color"===e||"font-size"===e||"font-family"===e||"font-weight"===e||"font-style"===e||"text-decoration"===e||"text-align"===e||"text-transform"===e||"line-height"===e||"letter-spacing"===e||"word-spacing"===e||"text-shadow"===e||"text-overflow"===e||"white-space"===e||"word-wrap"===e||"word-break"===e||"overflow-wrap"===e||"hyphens"===e?r.push(t.join(":")+" !important"):(n.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),B9=Ae((t,e)=>{var{themeVariables:r,handDrawnSeed:n}=D(),{nodeBorder:r,mainBkg:i}=r,t=D9(t).stylesMap;return Object.assign({roughness:.7,fill:t.get("fill")||i,fillStyle:"hachure",fillWeight:4,stroke:t.get("stroke")||r,seed:n,strokeWidth:1.3},e)},"userNodeOverrides")}),X9=i(()=>{wc(),al(),t(),yC(),i3(),S9(),eS(),C9(),Y9(),H9(),V9(),F9=Ae(async(n,i)=>{R.info("Creating subgraph rect for ",i.id,i);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=P9(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=$o(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await tS(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();$o(t.flowchart.htmlLabels)&&(n=g.children[0],m=O(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;R.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let t=T9.svg(u),e=B9(i,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=t.path(M9(y,v,n,m,0),e);(x=u.insert(()=>(R.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",i.rx).attr("ry",i.ry).attr("x",y).attr("y",v).attr("width",n).attr("height",m);return y=gC(t).subGraphTitleTopMargin,p.attr("transform",`translate(${i.x-f.width/2}, ${i.y-i.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),n=x.node().getBBox(),i.offsetX=0,i.width=n.width,i.height=n.height,i.offsetY=f.height-i.padding/2,i.intersect=function(t){return E9(i,t)},{cluster:u,labelBBox:f}},"rect"),$9=Ae((t,e)=>{var r=(t=t.insert("g").attr("class","note-cluster").attr("id",e.id)).insert("rect",":first-child"),n=0*e.padding,i=n/2,i=(r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none"),r.node().getBBox());return e.width=i.width,e.height=i.height,e.intersect=function(t){return E9(e,t)},{cluster:t,labelBBox:{width:0,height:0}}},"noteGroup"),z9=Ae(async(i,a)=>{let t=D(),{themeVariables:e,handDrawnSeed:s}=t,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=e,u=i.insert("g").attr("class",a.cssClasses).attr("id",a.id).attr("data-id",a.id).attr("data-look",a.look),r=u.insert("g",":first-child"),n=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=n.node().appendChild(await I9(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();$o(t.flowchart.htmlLabels)&&(i=p.children[0],f=O(p),g=i.getBoundingClientRect(),f.attr("width",g.width),f.attr("height",g.height));var f=(i=0*a.padding)/2,m=(a.width<=g.width+a.padding?g.width+a.padding:a.width)+i,y=(a.width<=g.width+a.padding?a.diff=(m-a.width)/2-a.padding:a.diff=-a.padding,a.height+i),i=a.height+i-g.height-6,v=a.x-m/2,x=a.y-y/2;a.width=m;let b=a.y-a.height/2-f+g.height+2,w;if("handDrawn"===a.look){let t=a.cssClasses.includes("statediagram-cluster-alt"),e=T9.svg(u),r=a.rx||a.ry?e.path(M9(v,x,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):e.rectangle(v,x,m,y,{seed:s}),n=(w=u.insert(()=>r,":first-child"),e.rectangle(v,b,m,i,{fill:t?o:l,fillStyle:t?"hachure":"solid",stroke:h,seed:s}));w=u.insert(()=>r,":first-child"),d=u.insert(()=>n)}else(w=r.insert("rect",":first-child")).attr("class","outer").attr("x",v).attr("y",x).attr("width",m).attr("height",y).attr("data-look",a.look),d.attr("class","inner").attr("x",v).attr("y",b).attr("width",m).attr("height",i);return n.attr("transform",`translate(${a.x-g.width/2}, ${1+x-($o(t.flowchart.htmlLabels)?0:3)})`),f=w.node().getBBox(),a.height=f.height,a.offsetX=0,a.offsetY=g.height-a.padding/2,a.labelBBox=g,a.intersect=function(t){return E9(a,t)},{cluster:u,labelBBox:g}},"roundedWithTitle"),q9=Ae((e,r)=>{var{themeVariables:n,handDrawnSeed:i}=D(),n=n.nodeBorder,t=(e=e.insert("g").attr("class",r.cssClasses).attr("id",r.id).attr("data-look",r.look)).insert("g",":first-child"),a=0*r.padding,s=r.width+a,a=(r.diff=-r.padding,r.height+a),o=r.x-s/2,l=r.y-a/2;r.width=s;let c;if("handDrawn"===r.look){let t=T9.svg(e).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:i});c=e.insert(()=>t,":first-child")}else(c=t.insert("rect",":first-child")).attr("class","divider").attr("x",o).attr("y",l).attr("width",s).attr("height",a).attr("data-look",r.look);return n=c.node().getBBox(),r.height=n.height,r.offsetX=0,r.offsetY=0,r.intersect=function(t){return E9(r,t)},{cluster:e,labelBBox:{}}},"divider"),U9={rect:F9,squareRect:F9,roundedWithTitle:z9,noteGroup:$9,divider:q9},j9=new Map,G9=Ae(async(t,e)=>{var r=e.shape||"rect",r=await U9[r](t,e);return j9.set(e.id,r),r},"insertCluster"),W9=Ae(()=>{j9=new Map},"clear")});function K9(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=Q9(t),e=Q9(e);var[t,r]=[t.x,t.y],[e,n]=[e.x,e.y],e=e-t,t=n-r;return{angle:Math.atan(t/e),deltaX:e,deltaY:t}}var Z9,Q9,J9,tA,eA,rA,nA=i(()=>{Z9={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4},Ae(K9,"calculateDeltaAndAngle"),Q9=Ae(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),J9=Ae(s=>({x:Ae(function(t,e,r){let n=0;var i,a;return 0===e&&Object.hasOwn(Z9,s.arrowTypeStart)?({angle:i,deltaX:a}=K9(r[0],r[1]),n=Z9[s.arrowTypeStart]*Math.cos(i)*(0<=a?1:-1)):e===r.length-1&&Object.hasOwn(Z9,s.arrowTypeEnd)&&({angle:i,deltaX:a}=K9(r[r.length-1],r[r.length-2]),n=Z9[s.arrowTypeEnd]*Math.cos(i)*(0<=a?1:-1)),Q9(t).x+n},"x"),y:Ae(function(t,e,r){let n=0;var i,a;return 0===e&&Object.hasOwn(Z9,s.arrowTypeStart)?({angle:i,deltaY:a}=K9(r[0],r[1]),n=Z9[s.arrowTypeStart]*Math.abs(Math.sin(i))*(0<=a?1:-1)):e===r.length-1&&Object.hasOwn(Z9,s.arrowTypeEnd)&&({angle:i,deltaY:a}=K9(r[r.length-1],r[r.length-2]),n=Z9[s.arrowTypeEnd]*Math.abs(Math.sin(i))*(0<=a?1:-1)),Q9(t).y+n},"y")}),"getLineFunctionsWithOffset")}),iA=i(()=>{t(),tA=Ae((t,e,r,n,i)=>{e.arrowTypeStart&&rA(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&rA(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),eA={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},rA=Ae((t,e,r,n,i,a)=>{var s=eA[r];s?t.attr("marker-"+e,`url(${n}#${i}_${a}-${s}${"start"===e?"Start":"End"})`):R.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function aA(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}function sA(e){var r=[],n=[];for(let t=1;t{wc(),al(),t(),eS(),rT(),nA(),yC(),i3(),S9(),Y9(),iA(),oA=new Map,lA=new Map,cA=Ae(()=>{oA.clear(),lA.clear()},"clear"),hA=Ae(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),uA=Ae(async(t,e)=>{var r,n=$o(D().flowchart.htmlLabels),i=await tS(t,e.label,{style:hA(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1}),a=(R.info("abc82",e,e.labelType),t.insert("g").attr("class","edgeLabel")),s=a.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();n&&(n=i.children[0],r=O(i),o=n.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),oA.set(e.id,a),e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(n=await I9(e.startLabelLeft,hA(e.labelStyle)),s=(r=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a=n.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),lA.get(e.id)||lA.set(e.id,{}),lA.get(e.id).startLeft=r,aA(l,e.startLabelLeft)),e.startLabelRight&&(n=await I9(e.startLabelRight,hA(e.labelStyle)),a=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a.node().appendChild(n),r=n.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),lA.get(e.id)||lA.set(e.id,{}),lA.get(e.id).startRight=s,aA(l,e.startLabelRight)),e.endLabelLeft&&(n=await I9(e.endLabelLeft,hA(e.labelStyle)),r=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(n),s=n.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(n),lA.get(e.id)||lA.set(e.id,{}),lA.get(e.id).endLeft=a,aA(l,e.endLabelLeft)),e.endLabelRight&&(r=await I9(e.endLabelRight,hA(e.labelStyle)),n=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=n.node().appendChild(r),a=r.getBBox(),n.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),lA.get(e.id)||lA.set(e.id,{}),lA.get(e.id).endRight=s,aA(l,e.endLabelRight)),i},"insertEdgeLabel"),Ae(aA,"setTerminalWidth"),dA=Ae((n,i)=>{R.debug("Moving label abc88 ",n.id,n.label,oA.get(n.id),i);var a,s=i.updatedPath||i.originalPath,o=D(),o=gC(o).subGraphTitleTotalMargin;if(n.label){let t=oA.get(n.id),e=n.x,r=n.y;s&&(a=Q8.calcLabelPosition(s),R.debug("Moving label "+n.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+o/2})`)}if(n.startLabelLeft){let t=lA.get(n.id).startLeft,e=n.x,r=n.y;s&&(i=Q8.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.startLabelRight){let t=lA.get(n.id).startRight,e=n.x,r=n.y;s&&(a=Q8.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelLeft){let t=lA.get(n.id).endLeft,e=n.x,r=n.y;s&&(o=Q8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelRight){let t=lA.get(n.id).endRight,e=n.x,r=n.y;s&&(i=Q8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),pA=Ae((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n),n=t.width/2,t=t.height/2;return n<=r||t<=e},"outsideNode"),gA=Ae((t,n,i)=>{R.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(n)} + insidePoint : ${JSON.stringify(i)} + node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-i.x),s=t.width/2,o=i.xMath.abs(a-n.x)*l)return t=i.y{R.warn("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],s=!1;return t.forEach(t=>{if(R.info("abc88 checking point",t,n),pA(n,t)||s)R.warn("abc88 outside",t,a),a=t,s||i.push(t);else{let e=gA(n,a,t),r=(R.debug("abc88 inside",t,a,e),R.debug("abc88 intersection",e,n),!1);i.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),i.some(t=>t.x===e.x&&t.y===e.y)?R.warn("abc88 no intersect",e,i):i.push(e),s=!0}}),R.debug("returning points",i),i},"cutPathAtIntersect"),Ae(sA,"extractCornerPoints"),mA=Ae(function(t,e,r){var n=e.x-t.x,t=e.y-t.y,r=r/Math.sqrt(n*n+t*t);return{x:e.x-r*n,y:e.y-r*t}},"findAdjacentPoint"),yA=Ae(function(n){var t=sA(n).cornerPointPositions,i=[];for(let r=0;r!Number.isNaN(t.y)),i=(a=yA(a))[a.length-1];1t+";"+e,""):"")).attr("d"),y.attr("d",u),t.node().appendChild(y.node())):y=t.append("path").attr("d",v).attr("id",e.id).attr("class"," "+m+(e.classes?" "+e.classes:"")).attr("style",x?x.reduce((t,e)=>t+";"+e,""):""),"");return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(b=(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(").replace(/\)/g,"\\)")),R.info("arrowTypeStart",e.arrowTypeStart),R.info("arrowTypeEnd",e.arrowTypeEnd),tA(y,e,b,s,n),a={},c&&(a.updatedPath=l),a.originalPath=e.points,a},"insertEdge")}),OA=i(()=>{t(),xA=Ae((e,t,r,n)=>{t.forEach(t=>{LA[t](e,r,n)})},"insertMarkers"),bA=Ae((t,e,r)=>{R.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),wA=Ae((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),kA=Ae((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),TA=Ae((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),_A=Ae((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),EA=Ae((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),SA=Ae((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),CA=Ae((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),AA=Ae((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),LA={extension:bA,composition:wA,aggregation:kA,dependency:TA,lollipop:_A,point:EA,circle:SA,cross:CA,barb:AA},NA=xA}),PA=i(()=>{eS(),wc(),i3(),al(),rT(),IA=Ae(async(t,e,r)=>{var n=e.useHtmlLabels||$o(D().flowchart.htmlLabels),i=(i=r||"node default",t.insert("g").attr("class",i).attr("id",e.domId||e.id)),a=i.insert("g").attr("class","label").attr("style",e.labelStyle),s=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let o=(r=await tS(a,Mo(tT(s),D()),{useHtmlLabels:n,width:e.width||D().flowchart.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle})).getBBox(),l=e.padding/2;if($o(D().flowchart.htmlLabels)){var t=r.children[0],r=O(r),c=t.getElementsByTagName("img");if(c){let n=""===s.replace(/]*>/g,"").trim();await Promise.all([...c].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=(D().fontSize?D():window.getComputedStyle(document.body)).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}Ae(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}o=t.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)}return n?a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):a.attr("transform","translate(0, "+-o.height/2+")"),e.centerLabel&&a.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:i,bbox:o,halfPadding:l,label:a}},"labelHelper"),MA=Ae((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),RA=Ae((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses")});function BA(t,e){return t.intersect(e)}var FA,$A=i(()=>{Ae(BA,"intersectNode"),FA=BA});function zA(t,e,r,n){var i=t.x,t=t.y,a=i-n.x,s=t-n.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(n.x{Ae(zA,"intersectEllipse"),qA=zA});function jA(t,e,r){return qA(t,e,e,r)}var GA,WA=i(()=>{UA(),Ae(jA,"intersectCircle"),GA=jA});function YA(t,e,r,n){var i,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.y,u=l*r.x+c*r.y+h,d=l*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0{Ae(YA,"intersectLine"),Ae(HA,"sameSign"),VA=YA});function KA(e,r,n){let t=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof r.forEach?r.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,r.x),o=Math.min(o,r.y));var l=t-e.width/2-s,c=i-e.height/2-o;for(let t=0;t{XA(),Ae(KA,"intersectPolygon"),ZA=KA}),uL=i(()=>{$A(),WA(),UA(),hL(),C9(),QA={node:FA,circle:GA,ellipse:qA,polygon:ZA,rect:E9}}),dL=i(()=>{PA(),uL(),H9(),V9(),S9(),JA=Ae(async(t,n,e)=>{var{labelStyles:r,nodeStyles:i}=P9(n);n.labelStyle=r;let{shapeSvg:a,bbox:s}=await IA(t,n,RA(n)),o=Math.max(s.width+2*e.labelPaddingX,n?.width||0),l=Math.max(s.height+2*e.labelPaddingY,n?.height||0),c=-o/2,h=-l/2,u,{rx:d,ry:p}=n,g=n.cssStyles;if(e?.rx&&e.ry&&(d=e.rx,p=e.ry),"handDrawn"===n.look){let t=T9.svg(a),e=B9(n,{}),r=d||p?t.path(M9(c,h,o,l,d||0),e):t.rectangle(c,h,o,l,e);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",g)}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",i).attr("rx",d).attr("data-id","abc").attr("data-et","node").attr("ry",p).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return MA(n,u),n.intersect=function(t){return QA.rect(n,t)},a},"drawRect")}),pL=i(()=>{dL(),tL=Ae(async(t,e)=>JA(t,e,{rx:5,ry:5,classes:"flowchart-node"}),"state")}),gL=i(()=>{dL(),eL=Ae(async(t,e)=>{var r={rx:5,ry:5,classes:"",labelPaddingX:+(e?.padding||0),labelPaddingY:+(e?.padding||0)};return JA(t,e,r)},"roundedRect")}),fL=i(()=>{dL(),rL=Ae(async(t,e)=>{var r={rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:+(e?.padding||0)};return JA(t,e,r)},"squareRect")}),mL=i(()=>{PA(),uL(),S9(),V9(),wc(),nL=Ae((t,e)=>{let r=D().themeVariables,n=r.lineColor,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if("handDrawn"===e.look){let t=T9.svg(i).circle(0,0,14,R9(n));a=i.insert(()=>t)}else a=i.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),MA(e,a),e.intersect=function(t){return QA.circle(e,7,t)},i},"stateStart")}),yL=i(()=>{PA(),uL(),S9(),V9(),wc(),iL=Ae((t,e)=>{let r=D().themeVariables,n=r.lineColor,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a,s;if("handDrawn"===e.look){let t=T9.svg(i),e=t.circle(0,0,14,{...R9(n),roughness:.5}),r=t.circle(0,0,5,{...R9(n),fillStyle:"solid"});a=i.insert(()=>e),s=i.insert(()=>r)}else s=i.insert("circle",":first-child"),(a=i.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),s.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10);return MA(e,a),e.intersect=function(t){return QA.circle(e,7,t)},i},"stateEnd")}),vL=i(()=>{PA(),uL(),S9(),V9(),wc(),aL=Ae((t,e,r)=>{let n=D().themeVariables,i=n.lineColor,a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),s=70,o=10,l=("LR"===r&&(s=10,o=70),-1*s/2),c=-1*o/2,h;if("handDrawn"===e.look){let t=T9.svg(a).rectangle(l,c,s,o,R9(i));h=a.insert(()=>t)}else h=a.append("rect").attr("x",l).attr("y",c).attr("width",s).attr("height",o).attr("class","fork-join");MA(e,h);let u=0,d=0,p=10;return e.height&&(u=e.height),e.width&&(d=e.width),e.padding&&(p=e.padding),e.height=u+p/2,e.width=d+p/2,e.intersect=function(t){return QA.rect(e,t)},a},"forkJoin")}),xL=i(()=>{uL(),S9(),V9(),wc(),sL=Ae((t,e)=>{var{labelStyles:r,nodeStyles:n}=P9(e);e.labelStyle=r;let i=D().themeVariables,a=i.lineColor,s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),o=[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}],l;if("handDrawn"===e.look){let t=T9.svg(s),e=o.map(function(t){return[t.x,t.y]}),r=t.polygon(e,R9(a));l=s.insert(()=>r)}else l=s.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" "));return l.attr("class","state-start").attr("r",7).attr("width",28).attr("height",28).attr("style",n),e.width=28,e.height=28,e.intersect=function(t){return QA.circle(e,14,t)},s},"choice")}),bL=i(()=>{t(),PA(),uL(),wc(),S9(),oL=Ae(async(e,r)=>{var{themeVariables:n,handDrawnSeed:i}=D(),{noteBorderColor:n,noteBkgColor:a}=n,{shapeSvg:e,bbox:t}=(r.useHtmlLabels||(r.centerLabel=!0),await IA(e,r,"node "+r.cssClasses));R.info("Classes = ",r.cssClasses);let s=r.cssStyles,o,l=t.width+r.padding,c=t.height+r.padding,h=-l/2,u=-c/2;if("handDrawn"===r.look){let t=T9.svg(e).rectangle(h,u,l,c,{roughness:.7,fill:a,fillWeight:3,seed:i,stroke:n});(o=e.insert(()=>t,":first-child")).attr("class","basic label-container").attr("style",s)}else(o=e.insert("rect",":first-child")).attr("rx",r.rx).attr("ry",r.ry).attr("x",h).attr("y",u).attr("width",l).attr("height",c);return MA(r,o),r.intersect=function(t){return QA.rect(r,t)},e},"note")}),wL=i(()=>{PA(),uL(),V9(),S9(),H9(),lL=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=P9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await IA(t,i,RA(i)),s=n.height+i.padding,o=n.width+s/4+i.padding,l,c=i.cssStyles;if("handDrawn"===i.look){let t=T9.svg(a),e=B9(i,{}),r=M9(-o/2,-s/2,o,s,s/2),n=t.path(r,e);(l=a.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",c)}else(l=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",r).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return MA(i,l),i.intersect=function(t){return QA.rect(i,t)},a},"stadium")}),kL=i(()=>{i3(),al(),PA(),Y9(),uL(),V9(),S9(),wc(),H9(),t(),cL=Ae(async(i,a)=>{var{labelStyles:t,nodeStyles:e}=P9(a);a.labelStyle=t;let r,s=(r=a.cssClasses?"node "+a.cssClasses:"node default",i.insert("g").attr("class",r).attr("id",a.domId||a.id)),n=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",e),l=a.description,c=a.label,h=o.node().appendChild(await I9(c,a.labelStyle,!0,!0)),u={width:0,height:0};$o(D()?.flowchart?.htmlLabels)&&(t=h.children[0],i=O(h),u=t.getBoundingClientRect(),i.attr("width",u.width),i.attr("height",u.height)),R.info("Text 2",l);var t=l||[],i=h.getBBox(),d=(t=o.node().appendChild(await I9(t.join?t.join("
"):t,a.labelStyle,!0,!0))).children[0],p=O(t),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);O(t).attr("transform","translate( "+(u.width>i.width?0:(i.width-u.width)/2)+", "+(i.height+d+5)+")"),O(h).attr("transform","translate( "+(u.width(R.debug("Rough node insert CXC",r),n),":first-child"),v=s.insert(()=>(R.debug("Rough node insert CXC",r),r),":first-child")}else v=n.insert("rect",":first-child"),x=n.insert("line"),v.attr("class","outer title-state").attr("style",e).attr("x",-u.width/2-d).attr("y",-u.height/2-d).attr("width",u.width+(a.padding||0)).attr("height",u.height+(a.padding||0)),x.attr("class","divider").attr("x1",-u.width/2-d).attr("x2",u.width/2+d).attr("y1",-u.height/2-d+i.height+d).attr("y2",-u.height/2-d+i.height+d);return MA(a,v),a.intersect=function(t){return QA.rect(a,t)},s},"rectWithTitle")});function TL(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var _L,EL,SL,CL,AL,LL,NL,IL,ML,RL,DL,OL,PL,BL,FL,$L,zL,qL,UL,jL,GL,WL,YL,HL,VL,XL,KL,ZL,QL,JL=i(()=>{Ae(TL,"insertPolygonShape")}),tN=i(()=>{PA(),uL(),V9(),S9(),JL(),_L=Ae(async(a,s)=>{var{labelStyles:o,nodeStyles:t}=P9(s);s.labelStyle=o;let{shapeSvg:l,bbox:e}=await IA(a,s,RA(s)),r=(s?.padding||0)/2,c=e.width+s.padding,h=e.height+s.padding,u=-e.width/2-r,d=-e.height/2-r,n=[{x:0,y:0},{x:c,y:0},{x:c,y:-h},{x:0,y:-h},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-h},{x:-8,y:-h},{x:-8,y:0}];if("handDrawn"===s.look){let t=T9.svg(l),e=B9(s,{}),r=t.rectangle(u-8,d,c+16,h,e),n=t.line(u,d,u,d+h,e),i=t.line(u+c,d,u+c,d+h,e);l.insert(()=>n,":first-child"),l.insert(()=>i,":first-child"),o=l.insert(()=>r,":first-child"),a=s.cssStyles,o.attr("class","basic label-container").attr("style",a),MA(s,o)}else a=TL(l,c,h,n),t&&a.attr("style",t),MA(s,a);return s.intersect=function(t){return QA.polygon(s,n,t)},l},"subroutine")}),eN=i(()=>{PA(),uL(),V9(),S9(),EL=Ae((t,e,r,n,i,a)=>[`M${t},`+(e+a),`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createCylinderPathD"),SL=Ae((t,e,r,n,i,a)=>[`M${t},`+(e+a),`M${t+r},`+(e+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createOuterCylinderPathD"),CL=Ae((t,e,r,n,i,a)=>[`M${t-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),AL=Ae(async(t,a)=>{var{labelStyles:e,nodeStyles:r}=P9(a);a.labelStyle=e;let{shapeSvg:s,bbox:n}=await IA(t,a,RA(a)),o=n.width+a.padding,l=o/2,c=l/(2.5+o/50),h=n.height+c+a.padding,u,d=a.cssStyles;if("handDrawn"===a.look){let t=T9.svg(s),e=SL(0,0,o,h,l,c),r=CL(0,c,o,h,l,c),n=t.path(e,B9(a,{})),i=t.path(r,B9(a,{fill:"none"}));u=s.insert(()=>i,":first-child"),(u=s.insert(()=>n,":first-child")).attr("class","basic label-container"),d&&u.attr("style",d)}else e=EL(0,0,o,h,l,c),u=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",d).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),MA(a,u),a.intersect=function(e){var r=QA.rect(a,e),n=r.x-(a.x??0);if(0!=l&&(Math.abs(n)<(a.width??0)/2||Math.abs(n)==(a.width??0)/2&&Math.abs(r.y-(a.y??0))>(a.height??0)/2-c)){let t=c*c*(1-n*n/(l*l));0{t(),PA(),uL(),V9(),S9(),LL=Ae(async(t,n)=>{var{labelStyles:e,nodeStyles:r}=P9(n);n.labelStyle=e;let{shapeSvg:i,bbox:a,halfPadding:s}=await IA(t,n,RA(n)),o=a.width/2+s,l,c=n.cssStyles;if("handDrawn"===n.look){let t=T9.svg(i),e=B9(n,{}),r=t.circle(0,0,2*o,e);(l=i.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",c)}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",o).attr("cx",0).attr("cy",0);return MA(n,l),n.intersect=function(t){return R.info("Circle intersect",n,o,t),QA.circle(n,o,t)},i},"circle")}),nN=i(()=>{t(),PA(),uL(),V9(),S9(),NL=Ae(async(t,e)=>{var r,{labelStyles:n,nodeStyles:i}=P9(e);e.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:o}=await IA(t,e,RA(e)),l=s.width/2+o+5,c=s.width/2+o,h,u=e.cssStyles;return"handDrawn"===e.look?(n=T9.svg(a),t=B9(e,{roughness:.2,strokeWidth:2.5}),r=B9(e,{roughness:.2,strokeWidth:1.5}),t=n.circle(0,0,2*l,t),n=n.circle(0,0,2*c,r),(h=a.insert("g",":first-child")).attr("class",e.cssClasses).attr("style",u),h.node()?.appendChild(t),h.node()?.appendChild(n)):(r=(h=a.insert("g",":first-child")).insert("circle",":first-child"),t=h.insert("circle"),h.attr("class","basic label-container").attr("style",i),r.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),t.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)),MA(e,h),e.intersect=function(t){return R.info("DoubleCircle intersect",e,l,t),QA.circle(e,l,t)},a},"doublecircle")}),iN=i(()=>{PA(),uL(),V9(),S9(),JL(),IL=Ae((t,e,r,n)=>[`M${t-n/2},`+e,`L${t+r},`+e,`L${t+r},`+(e-n),`L${t-n/2},`+(e-n),`L${t},`+(e-n/2),"Z"].join(" "),"createPolygonPathD"),ML=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=P9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await IA(t,i,RA(i)),s=n.width+i.padding,o=n.height+i.padding,l=[{x:-o/2,y:0},{x:s,y:0},{x:s,y:-o},{x:-o/2,y:-o},{x:0,y:-o/2}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=T9.svg(a),e=B9(i,{}),r=IL(0,0,s,o),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=TL(a,s,o,l);return r&&c.attr("style",r),i.width=s+o,i.height=o,MA(i,c),i.intersect=function(t){return QA.polygon(i,l,t)},a},"rect_left_inv_arrow")}),aN=i(()=>{t(),PA(),uL(),V9(),S9(),JL(),RL=Ae((t,e,r)=>[`M${t+r/2},`+e,`L${t+r},`+(e-r/2),`L${t+r/2},`+(e-r),`L${t},`+(e-r/2),"Z"].join(" "),"createDecisionBoxPathD"),DL=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=P9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await IA(t,i,RA(i)),s=n.width+i.padding,o=n.height+i.padding,l=s+o,c=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}],h,u=i.cssStyles;if("handDrawn"===i.look){let t=T9.svg(a),e=B9(i,{}),r=RL(0,0,l),n=t.path(r,e);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=TL(a,l,l,c);return r&&h.attr("style",r),MA(i,h),i.intersect=function(t){return R.debug(`APA12 Intersect called SPLIT +point:`,t,` +node: +`,i,` +res:`,QA.polygon(i,c,t)),QA.polygon(i,c,t)},a},"question")}),sN=i(()=>{PA(),uL(),V9(),S9(),JL(),OL=Ae((t,e,r,n,i)=>[`M${t+i},`+e,`L${t+r-i},`+e,`L${t+r},`+(e-n/2),`L${t+r-i},`+(e-n),`L${t+i},`+(e-n),`L${t},`+(e-n/2),"Z"].join(" "),"createHexagonPathD"),PL=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=P9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await IA(t,i,RA(i)),s=n.height+i.padding,o=s/4,l=n.width+2*o+i.padding,c=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}],h,u=i.cssStyles;if("handDrawn"===i.look){let t=T9.svg(a),e=B9(i,{}),r=OL(0,0,l,s,o),n=t.path(r,e);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),u&&h.attr("style",u)}else h=TL(a,l,s,c);return r&&h.attr("style",r),i.width=l,i.height=s,MA(i,h),i.intersect=function(t){return QA.polygon(i,c,t)},a},"hexagon")}),oN=i(()=>{PA(),uL(),V9(),S9(),JL(),BL=Ae((t,e,r,n)=>[`M${t-2*n/6},`+e,`L${t+r-n/6},`+e,`L${t+r+2*n/6},`+(e-n),`L${t+n/6},`+(e-n),"Z"].join(" "),"createLeanRightPathD"),FL=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=P9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await IA(t,i,RA(i)),s=n.width+i.padding,o=n.height+i.padding,l=[{x:-2*o/6,y:0},{x:s-o/6,y:0},{x:s+2*o/6,y:-o},{x:o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=T9.svg(a),e=B9(i,{}),r=BL(0,0,s,o),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=TL(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,MA(i,c),i.intersect=function(t){return QA.polygon(i,l,t)},a},"lean_right")}),lN=i(()=>{PA(),uL(),V9(),S9(),JL(),$L=Ae((t,e,r,n)=>[`M${t+2*n/6},`+e,`L${t+r+n/6},`+e,`L${t+r-2*n/6},`+(e-n),`L${t-n/6},`+(e-n),"Z"].join(" "),"createLeanLeftPathD"),zL=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=P9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await IA(t,i,RA(i)),s=n.width+i.padding,o=n.height+i.padding,l=[{x:2*o/6,y:0},{x:s+o/6,y:0},{x:s-2*o/6,y:-o},{x:-o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=T9.svg(a),e=B9(i,{}),r=$L(0,0,s,o),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=TL(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,MA(i,c),i.intersect=function(t){return QA.polygon(i,l,t)},a},"lean_left")}),cN=i(()=>{PA(),uL(),V9(),S9(),JL(),qL=Ae((t,e,r,n)=>[`M${t-2*n/6},`+e,`L${t+r+2*n/6},`+e,`L${t+r-n/6},`+(e-n),`L${t+n/6},`+(e-n),"Z"].join(" "),"createTrapezoidPathD"),UL=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=P9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await IA(t,i,RA(i)),s=n.width+i.padding,o=n.height+i.padding,l=[{x:-2*o/6,y:0},{x:s+2*o/6,y:0},{x:s-o/6,y:-o},{x:o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=T9.svg(a),e=B9(i,{}),r=qL(0,0,s,o),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=TL(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,MA(i,c),i.intersect=function(t){return QA.polygon(i,l,t)},a},"trapezoid")}),hN=i(()=>{PA(),uL(),V9(),S9(),JL(),jL=Ae((t,e,r,n)=>[`M${t+n/6},`+e,`L${t+r-n/6},`+e,`L${t+r+2*n/6},`+(e-n),`L${t-2*n/6},`+(e-n),"Z"].join(" "),"createInvertedTrapezoidPathD"),GL=Ae(async(t,i)=>{var{labelStyles:e,nodeStyles:r}=P9(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await IA(t,i,RA(i)),s=n.width+i.padding,o=n.height+i.padding,l=[{x:o/6,y:0},{x:s-o/6,y:0},{x:s+2*o/6,y:-o},{x:-2*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=T9.svg(a),e=B9(i,{}),r=jL(0,0,s,o),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=TL(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,MA(i,c),i.intersect=function(t){return QA.polygon(i,l,t)},a},"inv_trapezoid")}),uN=i(()=>{dL(),PA(),uL(),WL=Ae(async(t,e)=>{var r=(t=(await IA(t,e,"label")).shapeSvg).insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),t.attr("class","label edgeLabel"),MA(e,r),e.intersect=function(t){return QA.rect(e,t)},t},"labelRect")}),dN=i(()=>{t(),pL(),gL(),fL(),mL(),yL(),vL(),xL(),bL(),wL(),kL(),wc(),tN(),eN(),rN(),nN(),iN(),aN(),sN(),oN(),lN(),cN(),hN(),uN(),YL={state:tL,stateStart:nL,stateEnd:iL,fork:aL,join:aL,choice:sL,note:oL,roundedRect:eL,rectWithTitle:cL,squareRect:rL,stadium:lL,subroutine:_L,cylinder:AL,circle:LL,doublecircle:NL,odd:ML,diamond:DL,hexagon:PL,lean_right:FL,lean_left:zL,trapezoid:UL,inv_trapezoid:GL,labelRect:WL},HL=new Map,VL=Ae(async(e,r,n)=>{let i,a;if("rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect"),r.link){let t;"sandbox"===D().securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t),a=await YL[r.shape](i,r,n)}else a=await YL[r.shape](e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),HL.set(r.id,i),r.haveCallback&&HL.get(r.id).attr("class",HL.get(r.id).attr("class")+" clickable"),i},"insertNode"),XL=Ae((t,e)=>{HL.set(e.id,t)},"setNodeElem"),KL=Ae(()=>{HL.clear()},"clear"),ZL=Ae(t=>{var e=HL.get(t.id),r=(R.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")}),pN=i(()=>{Pr(),al(),t(),X9(),DA(),OA(),dN(),PA(),rT(),QL={common:L,getConfig:Be,insertCluster:G9,insertEdge:vA,insertEdgeLabel:uA,insertMarkers:NA,insertNode:VL,interpolateToCurve:f8,labelHelper:IA,log:R,positionEdgeLabel:dA}});function gN(t){return"symbol"==typeof t||V7(t)&&"[object Symbol]"==S3(t)}var fN,mN=i(()=>{C3(),X7(),Ae(gN,"isSymbol"),fN=gN});function yN(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r{Ae(yN,"arrayMap"),vN=yN});function bN(t){var e;return"string"==typeof t?t:nw(t)?vN(t,bN)+"":fN(t)?TN?TN.call(t):"":"0"==(e=t+"")&&1/t==-wN?"-0":e}var wN,kN,TN,_N,EN=i(()=>{u3(),xN(),sw(),mN(),wN=1/0,kN=Jb?Jb.prototype:void 0,TN=kN?kN.toString:void 0,Ae(bN,"baseToString"),_N=bN});function SN(t){for(var e=t.length;e--&&CN.test(t.charAt(e)););return e}var CN,AN,LN=i(()=>{CN=/\s/,Ae(SN,"trimmedEndIndex"),AN=SN});function NN(t){return t&&t.slice(0,AN(t)+1).replace(IN,"")}var IN,MN,RN=i(()=>{LN(),IN=/^\s+/,Ae(NN,"baseTrim"),MN=NN});function DN(t){if("number"==typeof t)return t;if(fN(t))return ON;if(L3(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=L3(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=MN(t);var e=BN.test(t);return e||FN.test(t)?$N(t.slice(2),e?2:8):PN.test(t)?ON:+t}var ON,PN,BN,FN,$N,zN,qN=i(()=>{RN(),N3(),mN(),ON=NaN,PN=/^[-+]0x[0-9a-f]+$/i,BN=/^0b[01]+$/i,FN=/^0o[0-7]+$/i,$N=parseInt,Ae(DN,"toNumber"),zN=DN});function UN(t){return t?(t=zN(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}var jN,GN=i(()=>{qN(),Ae(UN,"toFinite"),jN=UN});function WN(t){var e=(t=jN(t))%1;return t==t?e?t-e:t:0}var YN,HN,VN,XN=i(()=>{GN(),Ae(WN,"toInteger"),YN=WN}),KN=i(()=>{o5(),h3(),HN=i5(Zb,"WeakMap"),VN=HN});function ZN(){}var QN,JN=i(()=>{Ae(ZN,"noop"),QN=ZN});function tI(t,e){for(var r=-1,n=null==t?0:t.length;++r{Ae(tI,"arrayEach"),eI=tI});function nI(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{Ae(nI,"baseFindIndex"),iI=nI});function sI(t){return t!=t}var oI,lI=i(()=>{Ae(sI,"baseIsNaN"),oI=sI});function cI(t,e,r){for(var n=r-1,i=t.length;++n{Ae(cI,"strictIndexOf"),hI=cI});function dI(t,e,r){return e==e?hI(t,e,r):iI(t,oI,r)}var pI,gI=i(()=>{aI(),lI(),uI(),Ae(dI,"baseIndexOf"),pI=dI});function fI(t,e){return!(null==t||!t.length)&&-1{gI(),Ae(fI,"arrayIncludes"),mI=fI}),bI=i(()=>{F7(),yI=O7(Object.keys,Object),vI=yI});function wI(t){if(!U7(t))return vI(t);var e,r=[];for(e in Object(t))TI.call(t,e)&&"constructor"!=e&&r.push(e);return r}var kI,TI,_I,EI=i(()=>{j7(),bI(),kI=Object.prototype,TI=kI.hasOwnProperty,Ae(wI,"baseKeys"),_I=wI});function SI(t){return(uw(t)?pk:_I)(t)}var CI,AI,LI,NI,II=i(()=>{gk(),EI(),dw(),Ae(SI,"keys"),CI=SI}),MI=i(()=>{Jw(),rk(),p8(),dw(),j7(),II(),LI=Object.prototype,AI=LI.hasOwnProperty,LI=h8(function(t,e){if(U7(e)||uw(e))ek(e,CI(e),t);else for(var r in e)AI.call(e,r)&&Qw(t,r,e[r])}),NI=LI});function RI(t,e){var r;return!nw(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!fN(t))||OI.test(t)||!DI.test(t)||null!=e&&t in Object(e))}var DI,OI,PI,BI=i(()=>{sw(),mN(),DI=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,OI=/^\w*$/,Ae(RI,"isKey"),PI=RI});function FI(t){var e=(t=M6(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}var $I,zI,qI,UI,jI,GI=i(()=>{R6(),Ae(FI,"memoizeCapped"),$I=FI}),WI=i(()=>{GI(),zI=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qI=/\\(\\)?/g,UI=$I(function(t){var i=[];return 46===t.charCodeAt(0)&&i.push(""),t.replace(zI,function(t,e,r,n){i.push(r?n.replace(qI,"$1"):e||t)}),i}),jI=UI});function YI(t){return null==t?"":_N(t)}var HI,VI=i(()=>{EN(),Ae(YI,"toString"),HI=YI});function XI(t,e){return nw(t)?t:PI(t,e)?[t]:jI(HI(t))}var KI,ZI=i(()=>{sw(),BI(),WI(),VI(),Ae(XI,"castPath"),KI=XI});function QI(t){var e;return"string"==typeof t||fN(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e}var JI,tM=i(()=>{mN(),Ae(QI,"toKey"),JI=QI});function eM(t,e){for(var r=0,n=(e=KI(e,t)).length;null!=t&&r{ZI(),tM(),Ae(eM,"baseGet"),rM=eM});function iM(t,e,r){return void 0===(t=null==t?void 0:rM(t,e))?r:t}var aM,sM=i(()=>{nM(),Ae(iM,"get"),aM=iM});function oM(t,e){for(var r=-1,n=e.length,i=t.length;++r{Ae(oM,"arrayPush"),lM=oM});function hM(t){return nw(t)||ew(t)||!!(uM&&t&&t[uM])}var uM,dM,pM=i(()=>{u3(),aw(),sw(),uM=Jb?Jb.isConcatSpreadable:void 0,Ae(hM,"isFlattenable"),dM=hM});function gM(t,e,r,n,i){var a=-1,s=t.length;for(r=r||dM,i=i||[];++a{cM(),pM(),Ae(gM,"baseFlatten"),fM=gM});function yM(t){return null!=t&&t.length?fM(t,1):[]}var vM,xM=i(()=>{mM(),Ae(yM,"flatten"),vM=yM});function bM(t){return t8(jk(t,void 0,vM),t+"")}var wM,kM=i(()=>{xM(),Gk(),r8(),Ae(bM,"flatRest"),wM=bM});function TM(t,e,r){var n=-1,i=t.length;(r=i>>0,e>>>=0;for(var a=Array(i);++n{Ae(TM,"baseSlice"),_M=TM});function SM(t){return CM.test(t)}var CM,AM,LM=i(()=>{CM=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),Ae(SM,"hasUnicode"),AM=SM});function NM(t,e,r,n){var i=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++i]);++i{Ae(NM,"arrayReduce"),IM=NM});function RM(t,e){return t&&ek(e,CI(e),t)}var DM,OM=i(()=>{rk(),II(),Ae(RM,"baseAssign"),DM=RM});function PM(t,e){return t&&ek(e,_k(e),t)}var BM,FM=i(()=>{rk(),Ek(),Ae(PM,"baseAssignIn"),BM=PM});function $M(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r{Ae($M,"arrayFilter"),zM=$M});function UM(){return[]}var jM,GM,WM,YM,HM,VM=i(()=>{Ae(UM,"stubArray"),jM=UM}),XM=i(()=>{qM(),VM(),GM=Object.prototype,WM=GM.propertyIsEnumerable,YM=Object.getOwnPropertySymbols,HM=YM?function(e){return null==e?[]:(e=Object(e),zM(YM(e),function(t){return WM.call(e,t)}))}:jM});function KM(t,e){return ek(t,HM(t),e)}var ZM,QM,JM,tR=i(()=>{rk(),XM(),Ae(KM,"copySymbols"),ZM=KM}),eR=i(()=>{cM(),$7(),XM(),VM(),QM=Object.getOwnPropertySymbols,JM=QM?function(t){for(var e=[];t;)lM(e,HM(t)),t=B7(t);return e}:jM});function rR(t,e){return ek(t,JM(t),e)}var nR,iR=i(()=>{rk(),eR(),Ae(rR,"copySymbolsIn"),nR=rR});function aR(t,e,r){return e=e(t),nw(t)?e:lM(e,r(t))}var sR,oR=i(()=>{cM(),sw(),Ae(aR,"baseGetAllKeys"),sR=aR});function lR(t){return sR(t,CI,HM)}var cR,hR=i(()=>{oR(),XM(),II(),Ae(lR,"getAllKeys"),cR=lR});function uR(t){return sR(t,_k,JM)}var dR,pR,gR,fR,mR,yR,vR,xR,bR,wR,kR,TR,_R,ER,SR,CR,AR,LR,NR,IR=i(()=>{oR(),eR(),Ek(),Ae(uR,"getAllKeysIn"),dR=uR}),MR=i(()=>{o5(),h3(),pR=i5(Zb,"DataView"),gR=pR}),RR=i(()=>{o5(),h3(),fR=i5(Zb,"Promise"),mR=fR}),DR=i(()=>{o5(),h3(),yR=i5(Zb,"Set"),vR=yR}),OR=i(()=>{MR(),a6(),RR(),DR(),KN(),C3(),W3(),xR="[object Map]",bR="[object Promise]",wR="[object Set]",kR="[object WeakMap]",TR="[object DataView]",_R=G3(gR),ER=G3(n6),SR=G3(mR),CR=G3(vR),AR=G3(VN),LR=S3,(gR&&LR(new gR(new ArrayBuffer(1)))!=TR||n6&&LR(new n6)!=xR||mR&&LR(mR.resolve())!=bR||vR&&LR(new vR)!=wR||VN&&LR(new VN)!=kR)&&(LR=Ae(function(t){var e=S3(t);if(t=(t="[object Object]"==e?t.constructor:void 0)?G3(t):"")switch(t){case _R:return TR;case ER:return xR;case SR:return bR;case CR:return wR;case AR:return kR}return e},"getTag")),NR=LR});function PR(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&FR.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var BR,FR,$R,zR=i(()=>{BR=Object.prototype,FR=BR.hasOwnProperty,Ae(PR,"initCloneArray"),$R=PR});function qR(t,e){return e=e?T7(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)}var UR,jR=i(()=>{_7(),Ae(qR,"cloneDataView"),UR=qR});function GR(t){var e=new t.constructor(t.source,WR.exec(t));return e.lastIndex=t.lastIndex,e}var WR,YR,HR=i(()=>{WR=/\w*$/,Ae(GR,"cloneRegExp"),YR=GR});function VR(t){return KR?Object(KR.call(t)):{}}var XR,KR,ZR,QR=i(()=>{u3(),XR=Jb?Jb.prototype:void 0,KR=XR?XR.valueOf:void 0,Ae(VR,"cloneSymbol"),ZR=VR});function JR(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return T7(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return UR(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return S7(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return YR(t);case"[object Set]":return new n;case"[object Symbol]":return ZR(t)}}var tD,eD=i(()=>{_7(),jR(),HR(),QR(),C7(),Ae(JR,"initCloneByTag"),tD=JR});function rD(t){return V7(t)&&"[object Map]"==NR(t)}var nD,iD,aD,sD=i(()=>{OR(),X7(),Ae(rD,"baseIsMap"),nD=rD}),oD=i(()=>{sD(),jw(),Gw(),iD=(iD=zw&&zw.isMap)?Pw(iD):nD,aD=iD});function lD(t){return V7(t)&&"[object Set]"==NR(t)}var cD,hD,uD,dD=i(()=>{OR(),X7(),Ae(lD,"baseIsSet"),cD=lD}),pD=i(()=>{dD(),jw(),Gw(),hD=(hD=zw&&zw.isSet)?Pw(hD):cD,uD=hD});function gD(r,n,i,t,e,a){var s,o=n&fD,l=n&mD,c=n&yD;if(void 0===(s=i?e?i(r,t,e,a):i(r):s)){if(!L3(r))return r;if(t=nw(r)){if(s=$R(r),!o)return L7(r,s)}else{var h=NR(r),u=h==xD||h==bD;if(bw(r))return y7(r,o);if(h==wD||h==vD||u&&!e){if(s=l||u?{}:W7(r),!o)return l?nR(r,BM(s,r)):ZM(r,DM(s,r))}else{if(!kD[h])return e?r:{};s=tD(r,h,o)}}if(u=(a=a||new K6).get(r))return u;a.set(r,s),uD(r)?r.forEach(function(t){s.add(gD(t,n,i,t,r,a))}):aD(r)&&r.forEach(function(t,e){s.set(e,gD(t,n,i,e,r,a))});var d=t?void 0:(c?l?dR:cR:l?_k:CI)(r);eI(d||r,function(t,e){d&&(t=r[e=t]),Qw(s,e,gD(t,n,i,e,r,a))})}return s}var fD,mD,yD,vD,xD,bD,wD,kD,TD,_D=i(()=>{J6(),rI(),Jw(),OM(),FM(),b7(),M7(),tR(),iR(),hR(),IR(),OR(),zR(),eD(),Y7(),sw(),kw(),oD(),N3(),pD(),II(),Ek(),fD=1,mD=2,yD=4,xD="[object Function]",bD="[object GeneratorFunction]",wD="[object Object]",(kD={})[vD="[object Arguments]"]=kD["[object Array]"]=kD["[object ArrayBuffer]"]=kD["[object DataView]"]=kD["[object Boolean]"]=kD["[object Date]"]=kD["[object Float32Array]"]=kD["[object Float64Array]"]=kD["[object Int8Array]"]=kD["[object Int16Array]"]=kD["[object Int32Array]"]=kD["[object Map]"]=kD["[object Number]"]=kD[wD]=kD["[object RegExp]"]=kD["[object Set]"]=kD["[object String]"]=kD["[object Symbol]"]=kD["[object Uint8Array]"]=kD["[object Uint8ClampedArray]"]=kD["[object Uint16Array]"]=kD["[object Uint32Array]"]=!0,kD["[object Error]"]=kD[xD]=kD["[object WeakMap]"]=!1,Ae(gD,"baseClone"),TD=gD});function ED(t){return TD(t,4)}var SD,CD=i(()=>{_D(),Ae(ED,"clone"),SD=ED});function AD(t){return TD(t,5)}var LD,ND=i(()=>{_D(),Ae(AD,"cloneDeep"),LD=AD});function ID(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e{Ae(ID,"compact"),MD=ID});function DD(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}var OD,PD=i(()=>{Ae(DD,"setCacheAdd"),OD=DD});function BD(t){return this.__data__.has(t)}var FD,$D=i(()=>{Ae(BD,"setCacheHas"),FD=BD});function zD(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new A6;++e{L6(),PD(),$D(),Ae(zD,"SetCache"),zD.prototype.add=zD.prototype.push=OD,zD.prototype.has=FD,qD=zD});function jD(t,e){for(var r=-1,n=null==t?0:t.length;++r{Ae(jD,"arraySome"),GD=jD});function YD(t,e){return t.has(e)}var HD,VD=i(()=>{Ae(YD,"cacheHas"),HD=YD});function XD(t,e,r,n,i,a){var s=1&r,o=t.length;if(o!=(l=e.length)&&!(s&&o{UD(),WD(),VD(),Ae(XD,"equalArrays"),KD=XD});function QD(t){var r=-1,n=Array(t.size);return t.forEach(function(t,e){n[++r]=[e,t]}),n}var JD,tO=i(()=>{Ae(QD,"mapToArray"),JD=QD});function eO(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}var rO,nO=i(()=>{Ae(eO,"setToArray"),rO=eO});function iO(t,e,r,n,i,a,s){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new x7(t),new x7(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return O5(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var o=JD;case"[object Set]":var l,o=o||rO;return!!(t.size==e.size||1&n)&&((l=s.get(t))?l==e:(n|=2,s.set(t,e),l=KD(o(t),o(e),n,i,a,s),s.delete(t),l));case"[object Symbol]":if(sO)return sO.call(t)==sO.call(e)}return!1}var aO,sO,oO,lO=i(()=>{u3(),w7(),P5(),ZD(),tO(),nO(),aO=Jb?Jb.prototype:void 0,sO=aO?aO.valueOf:void 0,Ae(iO,"equalByTag"),oO=iO});function cO(t,e,r,n,i,a){var s=1&r,o=cR(t),l=o.length;if(l!=cR(e).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in e:uO.call(e,h)))return!1}var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var g=s;++c{hR(),hO=Object.prototype,uO=hO.hasOwnProperty,Ae(cO,"equalObjects"),dO=cO});function gO(t,e,r,n,i,a){var s=nw(t),o=nw(e),l=s?mO:NR(t),o=o?mO:NR(e),c=(l=l==fO?yO:l)==yO,h=(o=o==fO?yO:o)==yO;if((o=l==o)&&bw(t)){if(!bw(e))return!1;c=!(s=!0)}return o&&!c?(a=a||new K6,s||Uw(t)?KD(t,e,r,n,i,a):oO(t,e,l,r,n,i,a)):1&r||(s=c&&xO.call(t,"__wrapped__"),l=h&&xO.call(e,"__wrapped__"),!s&&!l)?o&&(a=a||new K6,dO(t,e,r,n,i,a)):i(s?t.value():t,l?e.value():e,r,n,a=a||new K6)}var fO,mO,yO,vO,xO,bO,wO=i(()=>{J6(),ZD(),lO(),pO(),OR(),sw(),kw(),Ww(),fO="[object Arguments]",mO="[object Array]",yO="[object Object]",vO=Object.prototype,xO=vO.hasOwnProperty,Ae(gO,"baseIsEqualDeep"),bO=gO});function kO(t,e,r,n,i){return t===e||(null==t||null==e||!V7(t)&&!V7(e)?t!=t&&e!=e:bO(t,e,r,n,kO,i))}var TO,_O=i(()=>{wO(),X7(),Ae(kO,"baseIsEqual"),TO=kO});function EO(t,e,r,n){var i=r.length,a=i,s=!n;if(null==t)return!a;for(t=Object(t);i--;){var o=r[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i{J6(),_O(),Ae(EO,"baseIsMatch"),SO=EO});function AO(t){return t==t&&!L3(t)}var LO,NO=i(()=>{N3(),Ae(AO,"isStrictComparable"),LO=AO});function IO(t){for(var e=CI(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,LO(i)]}return e}var MO,RO=i(()=>{NO(),II(),Ae(IO,"getMatchData"),MO=IO});function DO(e,r){return function(t){return null!=t&&t[e]===r&&(void 0!==r||e in Object(t))}}var OO,PO=i(()=>{Ae(DO,"matchesStrictComparable"),OO=DO});function BO(e){var r=MO(e);return 1==r.length&&r[0][2]?OO(r[0][0],r[0][1]):function(t){return t===e||SO(t,e,r)}}var FO,$O=i(()=>{CO(),RO(),PO(),Ae(BO,"baseMatches"),FO=BO});function zO(t,e){return null!=t&&e in Object(t)}var qO,UO=i(()=>{Ae(zO,"baseHasIn"),qO=zO});function jO(t,e,r){for(var n=-1,i=(e=KI(e,t)).length,a=!1;++n{ZI(),aw(),sw(),ck(),cw(),tM(),Ae(jO,"hasPath"),GO=jO});function YO(t,e){return null!=t&&GO(t,e,qO)}var HO,VO=i(()=>{UO(),WO(),Ae(YO,"hasIn"),HO=YO});function XO(r,n){return PI(r)&&LO(n)?OO(JI(r),n):function(t){var e=aM(t,r);return void 0===e&&e===n?HO(t,r):TO(n,e,3)}}var KO,ZO=i(()=>{_O(),sM(),VO(),BI(),NO(),PO(),tM(),Ae(XO,"baseMatchesProperty"),KO=XO});function QO(e){return function(t){return t?.[e]}}var JO,tP=i(()=>{Ae(QO,"baseProperty"),JO=QO});function eP(e){return function(t){return rM(t,e)}}var rP,nP=i(()=>{nM(),Ae(eP,"basePropertyDeep"),rP=eP});function iP(t){return PI(t)?JO(JI(t)):rP(t)}var aP,sP=i(()=>{tP(),nP(),BI(),tM(),Ae(iP,"property"),aP=iP});function oP(t){return"function"==typeof t?t:null==t?Pk:"object"==typeof t?nw(t)?KO(t[0],t[1]):FO(t):aP(t)}var lP,cP=i(()=>{$O(),ZO(),Bk(),sw(),sP(),Ae(oP,"baseIteratee"),lP=oP});function hP(t,e,r,n){for(var i=-1,a=null==t?0:t.length;++i{Ae(hP,"arrayAggregator"),uP=hP});function pP(t,e){return t&&h7(t,e,CI)}var gP,fP=i(()=>{d7(),II(),Ae(pP,"baseForOwn"),gP=pP});function mP(a,s){return function(t,e){if(null!=t){if(!uw(t))return a(t,e);for(var r=t.length,n=s?r:-1,i=Object(t);(s?n--:++n{dw(),Ae(mP,"createBaseEach"),yP=mP}),wP=i(()=>{fP(),bP(),vP=yP(gP),xP=vP});function kP(t,n,i,a){return xP(t,function(t,e,r){n(a,t,i(t),r)}),a}var TP,_P=i(()=>{wP(),Ae(kP,"baseAggregator"),TP=kP});function EP(i,a){return function(t,e){var r=nw(t)?uP:TP,n=a?a():{};return r(t,i,lP(e,2),n)}}var SP,CP,AP,LP,NP,IP,MP,RP=i(()=>{dP(),_P(),cP(),sw(),Ae(EP,"createAggregator"),SP=EP}),DP=i(()=>{h3(),CP=Ae(function(){return Zb.Date.now()},"now"),AP=CP}),OP=i(()=>{a8(),P5(),l8(),Ek(),LP=Object.prototype,NP=LP.hasOwnProperty,IP=i8(function(t,e){t=Object(t);var r=-1,n=e.length,i=2{Ae(PP,"arrayIncludesWith"),BP=PP});function $P(t,e,r,n){var i=-1,a=mI,s=!0,o=t.length,l=[],c=e.length;if(o){r&&(e=vN(e,Pw(r))),n?(a=BP,s=!1):200<=e.length&&(a=HD,s=!1,e=new qD(e));t:for(;++i{UD(),xI(),FP(),xN(),jw(),VD(),Ae($P,"baseDifference"),zP=$P}),GP=i(()=>{jP(),mM(),a8(),fw(),qP=i8(function(t,e){return gw(t)?zP(t,fM(e,1,gw,!0)):[]}),UP=qP});function WP(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var YP,HP=i(()=>{Ae(WP,"last"),YP=WP});function VP(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:YN(e),_M(t,e<0?0:e,n)):[]}var XP,KP=i(()=>{EM(),XN(),Ae(VP,"drop"),XP=VP});function ZP(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:YN(e),_M(t,0,(e=n-e)<0?0:e)):[]}var QP,JP=i(()=>{EM(),XN(),Ae(ZP,"dropRight"),QP=ZP});function tB(t){return"function"==typeof t?t:Pk}var eB,rB=i(()=>{Bk(),Ae(tB,"castFunction"),eB=tB});function nB(t,e){return(nw(t)?eI:xP)(t,eB(e))}var v,iB=i(()=>{rI(),wP(),rB(),sw(),Ae(nB,"forEach"),v=nB}),aB=i(()=>{iB()});function sB(t,e){for(var r=-1,n=null==t?0:t.length;++r{Ae(sB,"arrayEvery"),oB=sB});function cB(t,n){var i=!0;return xP(t,function(t,e,r){return i=!!n(t,e,r)}),i}var hB,uB=i(()=>{wP(),Ae(cB,"baseEvery"),hB=cB});function dB(t,e,r){var n=nw(t)?oB:hB;return r&&o8(t,e,r)&&(e=void 0),n(t,lP(e,3))}var pB,gB=i(()=>{lB(),uB(),cP(),sw(),l8(),Ae(dB,"every"),pB=dB});function fB(t,n){var i=[];return xP(t,function(t,e,r){n(t,e,r)&&i.push(t)}),i}var mB,yB=i(()=>{wP(),Ae(fB,"baseFilter"),mB=fB});function vB(t,e){return(nw(t)?zM:mB)(t,lP(e,3))}var xB,bB=i(()=>{qM(),yB(),cP(),sw(),Ae(vB,"filter"),xB=vB});function wB(a){return function(t,e,r){var n,i=Object(t);return uw(t)||(n=lP(e,3),t=CI(t),e=Ae(function(t){return n(i[t],t,i)},"predicate")),-1<(e=a(t,e,r))?i[n?t[e]:e]:void 0}}var kB,TB=i(()=>{cP(),dw(),II(),Ae(wB,"createFind"),kB=wB});function _B(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:YN(r))<0&&(r=EB(n+r,0)),iI(t,lP(e,3),r)):-1}var EB,SB,CB,AB,LB=i(()=>{aI(),cP(),XN(),EB=Math.max,Ae(_B,"findIndex"),SB=_B}),NB=i(()=>{TB(),LB(),CB=kB(SB),AB=CB});function IB(t){return t&&t.length?t[0]:void 0}var MB,RB=i(()=>{Ae(IB,"head"),MB=IB}),DB=i(()=>{RB()});function OB(t,n){var i=-1,a=uw(t)?Array(t.length):[];return xP(t,function(t,e,r){a[++i]=n(t,e,r)}),a}var PB,BB=i(()=>{wP(),dw(),Ae(OB,"baseMap"),PB=OB});function FB(t,e){return(nw(t)?vN:PB)(t,lP(e,3))}var x,$B=i(()=>{xN(),cP(),BB(),sw(),Ae(FB,"map"),x=FB});function zB(t,e){return fM(x(t,e),1)}var qB,UB=i(()=>{mM(),$B(),Ae(zB,"flatMap"),qB=zB});function jB(t,e){return null==t?t:h7(t,eB(e),_k)}var GB,WB=i(()=>{d7(),rB(),Ek(),Ae(jB,"forIn"),GB=jB});function YB(t,e){return t&&gP(t,eB(e))}var HB,VB,XB,KB,ZB=i(()=>{fP(),rB(),Ae(YB,"forOwn"),HB=YB}),QB=i(()=>{n7(),RP(),XB=Object.prototype,VB=XB.hasOwnProperty,XB=SP(function(t,e,r){VB.call(t,r)?t[r].push(e):r7(t,r,[e])}),KB=XB});function JB(t,e){return e{Ae(JB,"baseGt"),tF=JB});function rF(t,e){return null!=t&&iF.call(t,e)}var nF,iF,aF,sF=i(()=>{nF=Object.prototype,iF=nF.hasOwnProperty,Ae(rF,"baseHas"),aF=rF});function oF(t,e){return null!=t&&GO(t,e,aF)}var b,lF=i(()=>{sF(),WO(),Ae(oF,"has"),b=oF});function cF(t){return"string"==typeof t||!nw(t)&&V7(t)&&"[object String]"==S3(t)}var hF,uF=i(()=>{C3(),sw(),X7(),Ae(cF,"isString"),hF=cF});function dF(e,t){return vN(t,function(t){return e[t]})}var pF,gF=i(()=>{xN(),Ae(dF,"baseValues"),pF=dF});function fF(t){return null==t?[]:pF(t,CI(t))}var mF,yF=i(()=>{gF(),II(),Ae(fF,"values"),mF=fF});function vF(t,e,r,n){return t=uw(t)?t:mF(t),r=r&&!n?YN(r):0,n=t.length,r<0&&(r=xF(n+r,0)),hF(t)?r<=n&&-1{gI(),dw(),uF(),XN(),yF(),xF=Math.max,Ae(vF,"includes"),bF=vF});function kF(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:YN(r))<0&&(r=TF(n+r,0)),pI(t,e,r)):-1}var TF,_F,EF=i(()=>{gI(),XN(),TF=Math.max,Ae(kF,"indexOf"),_F=kF});function SF(t){if(null!=t){if(uw(t)&&(nw(t)||"string"==typeof t||"function"==typeof t.splice||bw(t)||Uw(t)||ew(t)))return!t.length;var e,r=NR(t);if("[object Map]"==r||"[object Set]"==r)return!t.size;if(U7(t))return!_I(t).length;for(e in t)if(AF.call(t,e))return!1}return!0}var CF,AF,LF,NF=i(()=>{EI(),OR(),aw(),sw(),dw(),kw(),j7(),Ww(),CF=Object.prototype,AF=CF.hasOwnProperty,Ae(SF,"isEmpty"),LF=SF});function IF(t){return V7(t)&&"[object RegExp]"==S3(t)}var MF,RF,DF,OF=i(()=>{C3(),X7(),Ae(IF,"baseIsRegExp"),MF=IF}),PF=i(()=>{OF(),jw(),Gw(),RF=(RF=zw&&zw.isRegExp)?Pw(RF):MF,DF=RF});function BF(t){return void 0===t}var FF,$F=i(()=>{Ae(BF,"isUndefined"),FF=BF});function zF(t,e){return t{Ae(zF,"baseLt"),qF=zF});function jF(t,n){var i={};return n=lP(n,3),gP(t,function(t,e,r){r7(i,e,n(t,e,r))}),i}var GF,WF=i(()=>{n7(),fP(),cP(),Ae(jF,"mapValues"),GF=jF});function YF(t,e,r){for(var n=-1,i=t.length;++n{mN(),Ae(YF,"baseExtremum"),HF=YF});function XF(t){return t&&t.length?HF(t,Pk,tF):void 0}var KF,ZF=i(()=>{VF(),eF(),Bk(),Ae(XF,"max"),KF=XF});function QF(t){return t&&t.length?HF(t,Pk,qF):void 0}var JF,t$=i(()=>{VF(),UF(),Bk(),Ae(QF,"min"),JF=QF});function e$(t,e){return t&&t.length?HF(t,lP(e,2),qF):void 0}var r$,n$=i(()=>{VF(),cP(),UF(),Ae(e$,"minBy"),r$=e$});function i$(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var a$,s$=i(()=>{Ae(i$,"negate"),a$=i$});function o$(t,e,r,n){if(L3(t))for(var i=-1,a=(e=KI(e,t)).length,s=a-1,o=t;null!=o&&++i{Jw(),ZI(),ck(),N3(),tM(),Ae(o$,"baseSet"),l$=o$});function h$(t,e,r){for(var n=-1,i=e.length,a={};++n{nM(),c$(),ZI(),Ae(h$,"basePickBy"),u$=h$});function p$(t,r){var e;return null==t?{}:(e=vN(dR(t),function(t){return[t]}),r=lP(r),u$(t,e,function(t,e){return r(t,e[0])}))}var g$,f$=i(()=>{xN(),cP(),d$(),IR(),Ae(p$,"pickBy"),g$=p$});function m$(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var y$,v$=i(()=>{Ae(m$,"baseSortBy"),y$=m$});function x$(t,e){if(t!==e){var r=void 0!==t,n=null===t,i=t==t,a=fN(t),s=void 0!==e,o=null===e,l=e==e,c=fN(e);if(!o&&!c&&!a&&e{mN(),Ae(x$,"compareAscending"),b$=x$});function k$(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,s=i.length,o=r.length;++n{w$(),Ae(k$,"compareMultiple"),T$=k$});function E$(t,n,r){n=n.length?vN(n,function(e){return nw(e)?function(t){return rM(t,1===e.length?e[0]:e)}:e}):[Pk];var i=-1,t=(n=vN(n,Pw(lP)),PB(t,function(e,t,r){return{criteria:vN(n,function(t){return t(e)}),index:++i,value:e}}));return y$(t,function(t,e){return T$(t,e,r)})}var S$,C$,A$,L$=i(()=>{xN(),nM(),cP(),BB(),v$(),jw(),_$(),Bk(),sw(),Ae(E$,"baseOrderBy"),S$=E$}),N$=i(()=>{tP(),C$=JO("length"),A$=C$});function I$(t){for(var e=$$.lastIndex=0;$$.test(t);)++e;return e}var M$,R$,D$,O$,P$,B$,F$,$$,z$,q$=i(()=>{M$="["+(O$="\\ud800-\\udfff")+"]",R$="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",D$="\\ud83c[\\udffb-\\udfff]",F$="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",B$="[\\ufe0e\\ufe0f]?",P$="(?:\\u200d(?:"+[O$="[^"+O$+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+B$+F$+")*",B$=B$+F$+P$,F$="(?:"+[O$+R$+"?",R$,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",M$].join("|")+")",$$=RegExp(D$+"(?="+D$+")|"+F$+B$,"g"),Ae(I$,"unicodeSize"),z$=I$});function U$(t){return(AM(t)?z$:A$)(t)}var j$,G$=i(()=>{N$(),LM(),q$(),Ae(U$,"stringSize"),j$=U$});function W$(r,t){return u$(r,t,function(t,e){return HO(r,e)})}var Y$,H$,V$,X$=i(()=>{d$(),VO(),Ae(W$,"basePick"),Y$=W$}),K$=i(()=>{X$(),kM(),H$=wM(function(t,e){return null==t?{}:Y$(t,e)}),V$=H$});function Z$(t,e,r,n){for(var i=-1,a=J$(Q$((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s}var Q$,J$,tz,ez=i(()=>{Q$=Math.ceil,J$=Math.max,Ae(Z$,"baseRange"),tz=Z$});function rz(n){return function(t,e,r){return r&&"number"!=typeof r&&o8(t,e,r)&&(e=r=void 0),t=jN(t),void 0===e?(e=t,t=0):e=jN(e),r=void 0===r?t{ez(),l8(),GN(),Ae(rz,"createRange"),nz=rz}),oz=i(()=>{sz(),iz=nz(),az=iz});function lz(t,n,i,a,e){return e(t,function(t,e,r){i=a?(a=!1,t):n(i,t,e,r)}),i}var cz,hz=i(()=>{Ae(lz,"baseReduce"),cz=lz});function uz(t,e,r){var n=nw(t)?IM:cz,i=arguments.length<3;return n(t,lP(e,4),r,i,xP)}var dz,pz=i(()=>{MM(),wP(),cP(),hz(),sw(),Ae(uz,"reduce"),dz=uz});function gz(t,e){return(nw(t)?zM:mB)(t,a$(lP(e,3)))}var fz,mz=i(()=>{qM(),yB(),cP(),sw(),s$(),Ae(gz,"reject"),fz=gz});function yz(t){var e;return null==t?0:uw(t)?hF(t)?j$(t):t.length:"[object Map]"==(e=NR(t))||"[object Set]"==e?t.size:_I(t).length}var vz,xz=i(()=>{EI(),OR(),dw(),uF(),G$(),Ae(yz,"size"),vz=yz});function bz(t,n){var i;return xP(t,function(t,e,r){return!(i=n(t,e,r))}),!!i}var wz,kz=i(()=>{wP(),Ae(bz,"baseSome"),wz=bz});function Tz(t,e,r){var n=nw(t)?GD:wz;return r&&o8(t,e,r)&&(e=void 0),n(t,lP(e,3))}var _z,Ez,Sz,Cz,Az,Lz=i(()=>{WD(),cP(),kz(),sw(),l8(),Ae(Tz,"some"),_z=Tz}),Nz=i(()=>{mM(),L$(),a8(),l8(),Ez=i8(function(t,e){var r;return null==t?[]:(1<(r=e.length)&&o8(t,e[0],e[1])?e=[]:2{DR(),JN(),nO(),Cz=vR&&1/rO(new vR([,-0]))[1]==1/0?function(t){return new vR(t)}:QN,Az=Cz});function Mz(t,e,r){var n=-1,i=mI,a=t.length,s=!0,o=[],l=o;if(r)s=!1,i=BP;else if(200<=a){var c=e?null:Az(t);if(c)return rO(c);s=!1,i=HD,l=new qD}else l=e?[]:o;t:for(;++n{UD(),xI(),FP(),VD(),Iz(),nO(),Ae(Mz,"baseUniq"),Rz=Mz}),Bz=i(()=>{mM(),a8(),Pz(),fw(),Dz=i8(function(t){return Rz(fM(t,1,gw,!0))}),Oz=Dz});function Fz(t){return t&&t.length?Rz(t):[]}var $z,zz=i(()=>{Pz(),Ae(Fz,"uniq"),$z=Fz});function qz(t,e){return t&&t.length?Rz(t,lP(e,2)):[]}var Uz,jz=i(()=>{cP(),Pz(),Ae(qz,"uniqBy"),Uz=qz});function Gz(t){var e=++Wz;return HI(t)+e}var Wz,Yz,Hz=i(()=>{VI(),Wz=0,Ae(Gz,"uniqueId"),Yz=Gz});function Vz(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++n{Ae(Vz,"baseZipObject"),Xz=Vz});function Zz(t,e){return Xz(t||[],e||[],Qw)}var Qz,Jz=i(()=>{Jw(),Kz(),Ae(Zz,"zipObject"),Qz=Zz}),tq=i(()=>{MI(),CD(),ND(),RD(),Vk(),OP(),GP(),KP(),JP(),aB(),gB(),bB(),NB(),DB(),UB(),xM(),iB(),WB(),ZB(),QB(),lF(),Bk(),wF(),EF(),sw(),NF(),O3(),N3(),PF(),uF(),$F(),II(),HP(),$B(),WF(),ZF(),g8(),t$(),n$(),JN(),DP(),K$(),f$(),oz(),pz(),mz(),xz(),Lz(),Nz(),Bz(),zz(),Hz(),yF(),Jz()});function eq(t,e){t[e]?t[e]++:t[e]=1}function rq(t,e){--t[e]||delete t[e]}function nq(t,e,r,n){return e=""+e,r=""+r,!t&&r{tq(),sq="\0",(oq=class{static{Ae(this,"Graph")}constructor(t={}){this._isDirected=!b(t,"directed")||t.directed,this._isMultigraph=!!b(t,"multigraph")&&t.multigraph,this._isCompound=!!b(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=Yk(void 0),this._defaultEdgeLabelFn=Yk(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[sq]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return M3(t)||(t=Yk(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return CI(this._nodes)}sources(){var e=this;return xB(this.nodes(),function(t){return LF(e._in[t])})}sinks(){var e=this;return xB(this.nodes(),function(t){return LF(e._out[t])})}setNodes(t,e){var r=arguments,n=this;return v(t,function(t){1{lq()});function hq(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function uq(t,e){if("_next"!==t&&"_prev"!==t)return e}var dq,pq=i(()=>{dq=class{static{Ae(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,e=t._prev;if(e!==t)return hq(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&hq(t),t._next=e._next,e._next._prev=t,(e._next=t)._prev=e}toString(){for(var t=[],e=this._sentinel,r=e._prev;r!==e;)t.push(JSON.stringify(r,uq)),r=r._prev;return"["+t.join(", ")+"]"}},Ae(hq,"unlink"),Ae(uq,"filterOutLinks")});function gq(e,t){return e.nodeCount()<=1?[]:(t=fq((t=yq(e,t||xq)).graph,t.buckets,t.zeroIdx),vM(x(t,function(t){return e.outEdges(t.v,t.w)})))}function fq(t,e,r){for(var n,i=[],a=e[e.length-1],s=e[0];t.nodeCount();){for(;n=s.dequeue();)mq(t,e,r,n);for(;n=a.dequeue();)mq(t,e,r,n);if(t.nodeCount())for(var o=e.length-2;0{tq(),cq(),pq(),xq=Yk(1),Ae(gq,"greedyFAS"),Ae(fq,"doGreedyFAS"),Ae(mq,"removeNode"),Ae(yq,"buildState"),Ae(vq,"assignBucket")});function wq(r){var t="greedy"===r.graph().acyclicer?gq(r,e(r)):kq(r);function e(e){return function(t){return e.edge(t).weight}}v(t,function(t){var e=r.edge(t);r.removeEdge(t),e.forwardName=t.name,e.reversed=!0,r.setEdge(t.w,t.v,e,Yz("rev"))}),Ae(e,"weightFn")}function kq(e){var r=[],n={},i={};function a(t){b(i,t)||(i[t]=!0,n[t]=!0,v(e.outEdges(t),function(t){b(n,t.w)?r.push(t):a(t.w)}),delete n[t])}return Ae(a,"dfs"),v(e.nodes(),a),r}function Tq(n){v(n.edges(),function(t){var e,r=n.edge(t);r.reversed&&(n.removeEdge(t),e=r.forwardName,delete r.reversed,delete r.forwardName,n.setEdge(t.w,t.v,r,e))})}var _q=i(()=>{tq(),bq(),Ae(wq,"run"),Ae(kq,"dfsFAS"),Ae(Tq,"undo")});function Eq(t,e,r,n){for(var i;i=Yz(n),t.hasNode(i););return r.dummy=e,t.setNode(i,r),i}function Sq(n){var i=(new oq).setGraph(n.graph());return v(n.nodes(),function(t){i.setNode(t,n.node(t))}),v(n.edges(),function(t){var e=i.edge(t.v,t.w)||{weight:0,minlen:1},r=n.edge(t);i.setEdge(t.v,t.w,{weight:e.weight+r.weight,minlen:Math.max(e.minlen,r.minlen)})}),i}function Cq(e){var r=new oq({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(t){e.children(t).length||r.setNode(t,e.node(t))}),v(e.edges(),function(t){r.setEdge(t,e.edge(t))}),r}function Aq(t,e){var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2;if(a||e)return t=Math.abs(e)*s>Math.abs(a)*t?(r=(t=e<0?-t:t)*a/e,t):(r=a<0?-s:s)*e/a,{x:n+r,y:i+t};throw new Error("Not possible to find intersection inside of the rectangle")}function Lq(n){var i=x(az(Rq(n)+1),function(){return[]});return v(n.nodes(),function(t){var e=n.node(t),r=e.rank;FF(r)||(i[r][e.order]=t)}),i}function Nq(e){var r=JF(x(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(t){t=e.node(t),b(t,"rank")&&(t.rank-=r)})}function Iq(r){var n=JF(x(r.nodes(),function(t){return r.node(t).rank})),i=[],a=(v(r.nodes(),function(t){var e=r.node(t).rank-n;i[e]||(i[e]=[]),i[e].push(t)}),0),s=r.graph().nodeRankFactor;v(i,function(t,e){FF(t)&&e%s!=0?--a:a&&v(t,function(t){r.node(t).rank+=a})})}function Mq(t,e,r,n){var i={width:0,height:0};return 4<=arguments.length&&(i.rank=r,i.order=n),Eq(t,"border",i,e)}function Rq(e){return KF(x(e.nodes(),function(t){if(t=e.node(t).rank,!FF(t))return t}))}function Dq(t,e){var r={lhs:[],rhs:[]};return v(t,function(t){(e(t)?r.lhs:r.rhs).push(t)}),r}function Oq(t,e){var r=AP();try{return e()}finally{console.log(t+" time: "+(AP()-r)+"ms")}}function Pq(t,e){return e()}var Bq=i(()=>{tq(),cq(),Ae(Eq,"addDummyNode"),Ae(Sq,"simplify"),Ae(Cq,"asNonCompoundGraph"),Ae(Aq,"intersectRect"),Ae(Lq,"buildLayerMatrix"),Ae(Nq,"normalizeRanks"),Ae(Iq,"removeEmptyRanks"),Ae(Mq,"addBorderNode"),Ae(Rq,"maxRank"),Ae(Dq,"partition"),Ae(Oq,"time"),Ae(Pq,"notime")});function Fq(a){function s(t){var e=a.children(t),r=a.node(t);if(e.length&&v(e,s),b(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var n=r.minRank,i=r.maxRank+1;n{tq(),Bq(),Ae(Fq,"addBorderSegments"),Ae($q,"addBorderNode")});function qq(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||jq(t)}function Uq(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||Wq(t),"lr"!==e&&"rl"!==e||(Hq(t),jq(t))}function jq(e){v(e.nodes(),function(t){Gq(e.node(t))}),v(e.edges(),function(t){Gq(e.edge(t))})}function Gq(t){var e=t.width;t.width=t.height,t.height=e}function Wq(e){v(e.nodes(),function(t){Yq(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,Yq),b(t,"y")&&Yq(t)})}function Yq(t){t.y=-t.y}function Hq(e){v(e.nodes(),function(t){Vq(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,Vq),b(t,"x")&&Vq(t)})}function Vq(t){var e=t.x;t.x=t.y,t.y=e}var Xq=i(()=>{tq(),Ae(qq,"adjust"),Ae(Uq,"undo"),Ae(jq,"swapWidthHeight"),Ae(Gq,"swapWidthHeightOne"),Ae(Wq,"reverseY"),Ae(Yq,"reverseYOne"),Ae(Hq,"swapXY"),Ae(Vq,"swapXYOne")});function Kq(e){e.graph().dummyChains=[],v(e.edges(),function(t){Zq(e,t)})}function Zq(t,e){var r,n,i,a=e.v,s=t.node(a).rank,o=e.w,l=t.node(o).rank,c=e.name,h=t.edge(e),u=h.labelRank;if(l!==s+1){for(t.removeEdge(e),i=0,++s;s{tq(),Bq(),Ae(Kq,"run"),Ae(Zq,"normalizeEdge"),Ae(Qq,"undo")});function tU(r){var n={};function i(t){var e=r.node(t);return b(n,t)?e.rank:(n[t]=!0,(t=JF(x(r.outEdges(t),function(t){return i(t.w)-r.edge(t).minlen})))!==Number.POSITIVE_INFINITY&&null!=t||(t=0),e.rank=t)}Ae(i,"dfs"),v(r.sources(),i)}function eU(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var rU=i(()=>{tq(),Ae(tU,"longestPath"),Ae(eU,"slack")});function nU(t){var e,r=new oq({directed:!1}),n=t.nodes()[0],i=t.nodeCount();for(r.setNode(n,{});iU(r,t){tq(),cq(),rU(),Ae(nU,"feasibleTree"),Ae(iU,"tightTree"),Ae(aU,"findMinSlackEdge"),Ae(sU,"shiftRanks")}),lU=i(()=>{}),cU=i(()=>{}),hU=i(()=>{tq(),cU(),Yk(1)}),uU=i(()=>{hU()}),dU=i(()=>{}),pU=i(()=>{dU()}),gU=i(()=>{tq(),Yk(1)});function fU(e){var r={},n={},i=[];function a(t){if(b(n,t))throw new mU;b(r,t)||(n[t]=!0,r[t]=!0,v(e.predecessors(t),a),delete n[t],i.push(t))}if(Ae(a,"visit"),v(e.sinks(),a),vz(r)!==e.nodeCount())throw new mU;return i}function mU(){}var yU=i(()=>{tq(),fU.CycleException=mU,Ae(fU,"topsort"),Ae(mU,"CycleException"),mU.prototype=new Error}),vU=i(()=>{yU()});function xU(e,t,r){nw(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return v(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);bU(e,t,"post"===r,a,n,i)}),i}function bU(e,t,r,n,i,a){b(n,t)||(n[t]=!0,r||a.push(t),v(i(t),function(t){bU(e,t,r,n,i,a)}),r&&a.push(t))}var wU=i(()=>{tq(),Ae(xU,"dfs"),Ae(bU,"doDfs")});function kU(t,e){return xU(t,e,"post")}var TU=i(()=>{wU(),Ae(kU,"postorder")});function _U(t,e){return xU(t,e,"pre")}var EU=i(()=>{wU(),Ae(_U,"preorder")}),SU=i(()=>{cU(),lq()}),CU=i(()=>{lU(),hU(),uU(),pU(),gU(),vU(),TU(),EU(),SU(),dU(),yU()});function AU(t){tU(t=Sq(t));var e,r=nU(t);for(MU(r),LU(r,t);e=DU(r);)PU(r,t,e,OU(r,t,e))}function LU(e,r){var t=(t=kU(e,e.nodes())).slice(0,t.length-1);v(t,function(t){NU(e,r,t)})}function NU(t,e,r){var n=t.node(r).parent;t.edge(r,n).cutvalue=IU(t,e,r)}function IU(n,i,a){var s=n.node(a).parent,o=!0,t=i.edge(a,s),l=0;return t||(o=!1,t=i.edge(s,a)),l=t.weight,v(i.nodeEdges(a),function(t){var e=t.v===a,r=e?t.w:t.v;r!==s&&(e=e===o,t=i.edge(t).weight,l+=e?t:-t,FU(n,a,r))&&(t=n.edge(a,r).cutvalue,l+=e?-t:t)}),l}function MU(t,e){arguments.length<2&&(e=t.nodes()[0]),RU(t,{},1,e)}function RU(e,r,n,i,t){var a=n,s=e.node(i);return r[i]=!0,v(e.neighbors(i),function(t){b(r,t)||(n=RU(e,r,n,t,i))}),s.low=a,s.lim=n++,t?s.parent=t:delete s.parent,n}function DU(e){return AB(e.edges(),function(t){return e.edge(t).cutvalue<0})}function OU(e,r,t){var n=t.v,i=t.w,t=(r.hasEdge(n,i)||(n=t.w,i=t.v),e.node(n)),n=e.node(i),a=t,s=!1,i=(t.lim>n.lim&&(a=n,s=!0),xB(r.edges(),function(t){return s===$U(0,e.node(t.v),a)&&s!==$U(0,e.node(t.w),a)}));return r$(i,function(t){return eU(r,t)})}function PU(t,e,r,n){var i=r.v,r=r.w;t.removeEdge(i,r),t.setEdge(n.v,n.w,{}),MU(t),LU(t,e),BU(t,e)}function BU(i,a){var t=AB(i.nodes(),function(t){return!a.node(t).parent}),t=(t=_U(i,t)).slice(1);v(t,function(t){var e=i.node(t).parent,r=a.edge(t,e),n=!1;r||(r=a.edge(e,t),n=!0),a.node(t).rank=a.node(e).rank+(n?r.minlen:-r.minlen)})}function FU(t,e,r){return t.hasEdge(e,r)}function $U(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var zU=i(()=>{tq(),CU(),Bq(),oU(),rU(),AU.initLowLimValues=MU,AU.initCutValues=LU,AU.calcCutValue=IU,AU.leaveEdge=DU,AU.enterEdge=OU,AU.exchangeEdges=PU,Ae(AU,"networkSimplex"),Ae(LU,"initCutValues"),Ae(NU,"assignCutValue"),Ae(IU,"calcCutValue"),Ae(MU,"initLowLimValues"),Ae(RU,"dfsAssignLowLim"),Ae(DU,"leaveEdge"),Ae(OU,"enterEdge"),Ae(PU,"exchangeEdges"),Ae(BU,"updateRanks"),Ae(FU,"isTreeEdge"),Ae($U,"isDescendant")});function qU(t){switch(t.graph().ranker){case"network-simplex":jU(t);break;case"tight-tree":UU(t);break;case"longest-path":GU(t);break;default:jU(t)}}function UU(t){tU(t),nU(t)}function jU(t){AU(t)}var GU,WU=i(()=>{oU(),zU(),rU(),Ae(qU,"rank"),GU=tU,Ae(UU,"tightTreeRanker"),Ae(jU,"networkSimplexRanker")});function YU(e){var r=Eq(e,"root",{},"_root"),n=VU(e),i=KF(mF(n))-1,a=2*i+1,s=(e.graph().nestingRoot=r,v(e.edges(),function(t){e.edge(t).minlen*=a}),XU(e)+1);v(e.children(),function(t){HU(e,r,a,s,i,n,t)}),e.graph().nodeRankFactor=a}function HU(i,a,s,o,l,c,h){var u,d,t,e=i.children(h);e.length?(u=Mq(i,"_bt"),d=Mq(i,"_bb"),t=i.node(h),i.setParent(u,h),t.borderTop=u,i.setParent(d,h),t.borderBottom=d,v(e,function(t){HU(i,a,s,o,l,c,t);var e=(r=i.node(t)).borderTop||t,t=r.borderBottom||t,r=r.borderTop?o:2*o,n=e!==t?1:l-c[h]+1;i.setEdge(u,e,{weight:r,minlen:n,nestingEdge:!0}),i.setEdge(t,d,{weight:r,minlen:n,nestingEdge:!0})}),i.parent(h)||i.setEdge(a,u,{weight:0,minlen:l+c[h]})):h!==a&&i.setEdge(a,h,{weight:0,minlen:s})}function VU(n){var i={};function a(t,e){var r=n.children(t);r&&r.length&&v(r,function(t){a(t,e+1)}),i[t]=e}return Ae(a,"dfs"),v(n.children(),function(t){a(t,1)}),i}function XU(r){return dz(r.edges(),function(t,e){return t+r.edge(e).weight},0)}function KU(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,v(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}var ZU=i(()=>{tq(),Bq(),Ae(YU,"run"),Ae(HU,"dfs"),Ae(VU,"treeDepths"),Ae(XU,"sumWeights"),Ae(KU,"cleanup")});function QU(i,a,t){var s,o={};v(t,function(t){for(var e,r,n=i.parent(t);n;){if((e=i.parent(n))?(r=o[e],o[e]=n):(r=s,s=n),r&&r!==n)return void a.setEdge(r,n);n=e}})}var JU=i(()=>{tq(),Ae(QU,"addSubgraphConstraints")});function tj(i,r,a){var s=ej(i),o=new oq({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(t){return i.node(t)});return v(i.nodes(),function(n){var t=i.node(n),e=i.parent(n);(t.rank===r||t.minRank<=r&&r<=t.maxRank)&&(o.setNode(n),o.setParent(n,e||s),v(i[a](n),function(t){var e=t.v===n?t.w:t.v,r=o.edge(e,n),r=FF(r)?0:r.weight;o.setEdge(e,n,{weight:i.edge(t).weight+r})}),b(t,"minRank"))&&o.setNode(n,{borderLeft:t.borderLeft[r],borderRight:t.borderRight[r]})}),o}function ej(t){for(var e;t.hasNode(e=Yz("_root")););return e}var rj=i(()=>{tq(),cq(),Ae(tj,"buildLayerGraph"),Ae(ej,"createRootNode")});function nj(t,e){for(var r=0,n=1;n>1]+=t.weight;o+=t.weight*r})),o}var aj=i(()=>{tq(),Ae(nj,"crossCount"),Ae(ij,"twoLayerCrossCount")});function sj(r){var n={},t=xB(r.nodes(),function(t){return!r.children(t).length}),e=KF(x(t,function(t){return r.node(t).rank})),i=x(az(e+1),function(){return[]});function a(t){var e;b(n,t)||(n[t]=!0,e=r.node(t),i[e.rank].push(t),v(r.successors(t),a))}return Ae(a,"dfs"),e=Sz(t,function(t){return r.node(t).rank}),v(e,a),i}var oj=i(()=>{tq(),Ae(sj,"initOrder")});function lj(n,t){return x(t,function(t){var e=n.inEdges(t);return e.length?{v:t,barycenter:(e=dz(e,function(t,e){var r=n.edge(e),e=n.node(e.v);return{sum:t.sum+r.weight*e.order,weight:t.weight+r.weight}},{sum:0,weight:0})).sum/e.weight,weight:e.weight}:{v:t}})}var cj=i(()=>{tq(),Ae(lj,"barycenter")});function hj(t,e){var n={};return v(t,function(t,e){e=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e},FF(t.barycenter)||(e.barycenter=t.barycenter,e.weight=t.weight)}),v(e.edges(),function(t){var e=n[t.v],r=n[t.w];FF(e)||FF(r)||(r.indegree++,e.out.push(n[t.w]))}),uj(xB(n,function(t){return!t.indegree}))}function uj(r){var t=[];function e(e){return function(t){t.merged||(FF(t.barycenter)||FF(e.barycenter)||t.barycenter>=e.barycenter)&&dj(e,t)}}function n(e){return function(t){t.in.push(e),0==--t.indegree&&r.push(t)}}for(Ae(e,"handleIn"),Ae(n,"handleOut");r.length;){var i=r.pop();t.push(i),v(i.in.reverse(),e(i)),v(i.out,n(i))}return x(xB(t,function(t){return!t.merged}),function(t){return V$(t,["vs","i","barycenter","weight"])})}function dj(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}var pj=i(()=>{tq(),Ae(hj,"resolveConflicts"),Ae(uj,"doResolveConflicts"),Ae(dj,"mergeEntries")});function gj(t,e){var r=(t=Dq(t,function(t){return b(t,"barycenter")})).lhs,n=Sz(t.rhs,function(t){return-t.i}),i=[],a=0,s=0,o=0,t=(r.sort(mj(!!e)),o=fj(i,n,o),v(r,function(t){o+=t.vs.length,i.push(t.vs),a+=t.barycenter*t.weight,s+=t.weight,o=fj(i,n,o)}),{vs:vM(i)});return s&&(t.barycenter=a/s,t.weight=s),t}function fj(t,e,r){for(var n;e.length&&(n=YP(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function mj(r){return function(t,e){return t.barycentere.barycenter?1:r?e.i-t.i:t.i-e.i}}var yj=i(()=>{tq(),Bq(),Ae(gj,"sort"),Ae(fj,"consumeUnsortable"),Ae(mj,"compareWithBias")});function vj(r,t,n,i){var e,a=r.children(t),s=(t=r.node(t))?t.borderLeft:void 0,o=t?t.borderRight:void 0,l={},t=(s&&(a=xB(a,function(t){return t!==s&&t!==o})),lj(r,a));return v(t,function(t){var e;r.children(t.v).length&&(e=vj(r,t.v,n,i),l[t.v]=e,b(e,"barycenter"))&&bj(t,e)}),xj(a=hj(t,n),l),t=gj(a,i),s&&(t.vs=vM([s,t.vs,o]),r.predecessors(s).length)&&(a=r.node(r.predecessors(s)[0]),e=r.node(r.predecessors(o)[0]),b(t,"barycenter")||(t.barycenter=0,t.weight=0),t.barycenter=(t.barycenter*t.weight+a.order+e.order)/(t.weight+2),t.weight+=2),t}function xj(t,e){v(t,function(t){t.vs=vM(t.vs.map(function(t){return e[t]?e[t].vs:t}))})}function bj(t,e){FF(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var wj=i(()=>{tq(),cj(),pj(),yj(),Ae(vj,"sortSubgraph"),Ae(xj,"expandSubgraphs"),Ae(bj,"mergeBarycenters")});function kj(t){var e=Rq(t),r=Tj(t,az(1,e+1),"inEdges"),n=Tj(t,az(e-1,-1,-1),"outEdges");Ej(t,sj(t));for(var i,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){_j(s%2?r:n,2<=s%4);var l,c=nj(t,l=Lq(t));c{tq(),cq(),Bq(),JU(),rj(),aj(),oj(),wj(),Ae(kj,"order"),Ae(Tj,"buildLayerGraphs"),Ae(_j,"sweepLayerGraphs"),Ae(Ej,"assignOrder")});function Cj(c){var h=Lj(c);v(c.graph().dummyChains,function(t){for(var e,r=c.node(t).edgeObj,n=Aj(c,h,r.v,r.w),i=n.path,a=n.lca,s=0,o=i[s],l=!0;t!==r.w;){if(e=c.node(t),l){for(;(o=i[s])!==a&&c.node(o).maxRanko||l>e[c].lim););for(i=c,c=n;(c=t.parent(c))!==i;)s.push(c);return{path:a.concat(s.reverse()),lca:i}}function Lj(r){var n={},i=0;function a(t){var e=i;v(r.children(t),a),n[t]={low:e,lim:i++}}return Ae(a,"dfs"),v(r.children(),a),n}var Nj=i(()=>{tq(),Ae(Cj,"parentDummyChains"),Ae(Aj,"findPath"),Ae(Lj,"postorder")});function Ij(c,t){var h={};function e(t,n){var a=0,s=0,o=t.length,l=YP(n);return v(n,function(t,e){var r=Rj(c,t),i=r?c.node(r).order:o;!r&&t!==l||(v(n.slice(s,e+1),function(n){v(c.predecessors(n),function(t){var e=c.node(t),r=e.order;!(ri)&&Dj(s,t,a)})})}function e(r,n){var i,a=-1,s=0;return v(n,function(t,e){"border"===o.node(t).dummy&&(t=o.predecessors(t)).length&&(i=o.node(t[0]).order,l(n,s,e,a,i),s=e,a=i),l(n,s,n.length,i,r.length)}),n}return Ae(l,"scan"),Ae(e,"visitLayer"),dz(t,e),s}function Rj(e,t){if(e.node(t).dummy)return AB(e.predecessors(t),function(t){return e.node(t).dummy})}function Dj(t,e,r){r{tq(),cq(),Bq(),Ae(Ij,"findType1Conflicts"),Ae(Mj,"findType2Conflicts"),Ae(Rj,"findOtherInnerSegmentNode"),Ae(Dj,"addConflict"),Ae(Oj,"hasConflict"),Ae(Pj,"verticalAlignment"),Ae(Bj,"horizontalCompaction"),Ae(Fj,"buildBlockGraph"),Ae($j,"findSmallestWidthAlignment"),Ae(zj,"alignCoordinates"),Ae(qj,"balance"),Ae(Uj,"positionX"),Ae(jj,"sep"),Ae(Gj,"width")});function Yj(r){Hj(r=Cq(r)),HB(Uj(r),function(t,e){r.node(e).x=t})}function Hj(r){var t=Lq(r),n=r.graph().ranksep,i=0;v(t,function(t){var e=KF(x(t,function(t){return r.node(t).height}));v(t,function(t){r.node(t).y=i+e/2}),i+=e+n})}var Vj=i(()=>{tq(),Bq(),Wj(),Ae(Yj,"position"),Ae(Hj,"positionY")});function Xj(e,t){var r=t&&t.debugTiming?Oq:Pq;r("layout",function(){var t=r(" buildLayoutGraph",function(){return Qj(e)});r(" runLayout",function(){Kj(t,r)}),r(" updateInputGraph",function(){Zj(e,t)})})}function Kj(t,e){e(" makeSpaceForEdgeLabels",function(){Jj(t)}),e(" removeSelfEdges",function(){lG(t)}),e(" acyclic",function(){wq(t)}),e(" nestingGraph.run",function(){YU(t)}),e(" rank",function(){qU(Cq(t))}),e(" injectEdgeLabelProxies",function(){tG(t)}),e(" removeEmptyRanks",function(){Iq(t)}),e(" nestingGraph.cleanup",function(){KU(t)}),e(" normalizeRanks",function(){Nq(t)}),e(" assignRankMinMax",function(){eG(t)}),e(" removeEdgeLabelProxies",function(){rG(t)}),e(" normalize.run",function(){Kq(t)}),e(" parentDummyChains",function(){Cj(t)}),e(" addBorderSegments",function(){Fq(t)}),e(" order",function(){kj(t)}),e(" insertSelfEdges",function(){cG(t)}),e(" adjustCoordinateSystem",function(){qq(t)}),e(" position",function(){Yj(t)}),e(" positionSelfEdges",function(){hG(t)}),e(" removeBorderNodes",function(){oG(t)}),e(" normalize.undo",function(){Qq(t)}),e(" fixupEdgeLabelCoords",function(){aG(t)}),e(" undoCoordinateSystem",function(){Uq(t)}),e(" translateGraph",function(){nG(t)}),e(" assignNodeIntersects",function(){iG(t)}),e(" reversePoints",function(){sG(t)}),e(" acyclic.undo",function(){Tq(t)})}function Zj(n,i){v(n.nodes(),function(t){var e=n.node(t),r=i.node(t);e&&(e.x=r.x,e.y=r.y,i.children(t).length)&&(e.width=r.width,e.height=r.height)}),v(n.edges(),function(t){var e=n.edge(t),t=i.edge(t);e.points=t.points,b(t,"x")&&(e.x=t.x,e.y=t.y)}),n.graph().width=i.graph().width,n.graph().height=i.graph().height}function Qj(r){var n=new oq({multigraph:!0,compound:!0}),t=dG(r.graph());return n.setGraph(d8({},gG,uG(t,pG),V$(t,fG))),v(r.nodes(),function(t){var e=dG(r.node(t));n.setNode(t,MP(uG(e,mG),yG)),n.setParent(t,r.parent(t))}),v(r.edges(),function(t){var e=dG(r.edge(t));n.setEdge(t,d8({},xG,uG(e,vG),V$(e,bG)))}),n}function Jj(e){var r=e.graph();r.ranksep/=2,v(e.edges(),function(t){(t=e.edge(t)).minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function tG(r){v(r.edges(),function(t){var e=r.edge(t);e.width&&e.height&&(e=r.node(t.v),e={rank:(r.node(t.w).rank-e.rank)/2+e.rank,e:t},Eq(r,"edge-proxy",e,"_ep"))})}function eG(e){var r=0;v(e.nodes(),function(t){(t=e.node(t)).borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,r=KF(r,t.maxRank))}),e.graph().maxRank=r}function rG(r){v(r.nodes(),function(t){var e=r.node(t);"edge-proxy"===e.dummy&&(r.edge(e.e).labelRank=e.rank,r.removeNode(t))})}function nG(e){var i=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=0,t=e.graph(),r=t.marginx||0,n=t.marginy||0;function l(t){var e=t.x,r=t.y,n=t.width,t=t.height;i=Math.min(i,e-n/2),a=Math.max(a,e+n/2),s=Math.min(s,r-t/2),o=Math.max(o,r+t/2)}Ae(l,"getExtremes"),v(e.nodes(),function(t){l(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),b(t,"x")&&l(t)}),i-=r,s-=n,v(e.nodes(),function(t){(t=e.node(t)).x-=i,t.y-=s}),v(e.edges(),function(t){t=e.edge(t),v(t.points,function(t){t.x-=i,t.y-=s}),b(t,"x")&&(t.x-=i),b(t,"y")&&(t.y-=s)}),t.width=a-i+r,t.height=o-s+n}function iG(a){v(a.edges(),function(t){var e,r=a.edge(t),n=a.node(t.v),t=a.node(t.w),i=r.points?(e=r.points[0],r.points[r.points.length-1]):(r.points=[],e=t,n);r.points.unshift(Aq(n,e)),r.points.push(Aq(t,i))})}function aG(r){v(r.edges(),function(t){var e=r.edge(t);if(b(e,"x"))switch("l"!==e.labelpos&&"r"!==e.labelpos||(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset}})}function sG(e){v(e.edges(),function(t){(t=e.edge(t)).reversed&&t.points.reverse()})}function oG(a){v(a.nodes(),function(t){var e,r,n,i;a.children(t).length&&(t=a.node(t),e=a.node(t.borderTop),r=a.node(t.borderBottom),n=a.node(YP(t.borderLeft)),i=a.node(YP(t.borderRight)),t.width=Math.abs(i.x-n.x),t.height=Math.abs(r.y-e.y),t.x=n.x+t.width/2,t.y=e.y+t.height/2)}),v(a.nodes(),function(t){"border"===a.node(t).dummy&&a.removeNode(t)})}function lG(r){v(r.edges(),function(t){var e;t.v===t.w&&((e=r.node(t.v)).selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:t,label:r.edge(t)}),r.removeEdge(t))})}function cG(i){var t=Lq(i);v(t,function(t){var n=0;v(t,function(t,e){var r=i.node(t);r.order=e+n,v(r.selfEdges,function(t){Eq(i,"selfedge",{width:t.label.width,height:t.label.height,rank:r.rank,order:e+ ++n,e:t.e,label:t.label},"_se")}),delete r.selfEdges})})}function hG(s){v(s.nodes(),function(t){var e,r,n,i,a=s.node(t);"selfedge"===a.dummy&&(e=(i=s.node(a.e.v)).x+i.width/2,r=i.y,n=a.x-e,i=i.height/2,s.setEdge(a.e,a.label),s.removeNode(t),a.label.points=[{x:e+2*n/3,y:r-i},{x:e+5*n/6,y:r-i},{x:e+n,y:r},{x:e+5*n/6,y:r+i},{x:e+2*n/3,y:r+i}],a.label.x=a.x,a.label.y=a.y)})}function uG(t,e){return GF(V$(t,e),Number)}function dG(t){var r={};return v(t,function(t,e){r[e.toLowerCase()]=t}),r}var pG,gG,fG,mG,yG,vG,xG,bG,wG=i(()=>{tq(),cq(),zq(),Xq(),_q(),Jq(),WU(),ZU(),Sj(),Nj(),Vj(),Bq(),Ae(Xj,"layout"),Ae(Kj,"runLayout"),Ae(Zj,"updateInputGraph"),pG=["nodesep","edgesep","ranksep","marginx","marginy"],gG={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},fG=["acyclicer","ranker","rankdir","align"],mG=["width","height"],yG={width:0,height:0},vG=["minlen","weight","width","height","labeloffset"],xG={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},bG=["labelpos"],Ae(Qj,"buildLayoutGraph"),Ae(Jj,"makeSpaceForEdgeLabels"),Ae(tG,"injectEdgeLabelProxies"),Ae(eG,"assignRankMinMax"),Ae(rG,"removeEdgeLabelProxies"),Ae(nG,"translateGraph"),Ae(iG,"assignNodeIntersects"),Ae(aG,"fixupEdgeLabelCoords"),Ae(sG,"reversePointsForReversedEdges"),Ae(oG,"removeBorderNodes"),Ae(lG,"removeSelfEdges"),Ae(cG,"insertSelfEdges"),Ae(hG,"positionSelfEdges"),Ae(uG,"selectNumberAttrs"),Ae(dG,"canonicalize")}),kG=i(()=>{_q(),wG(),Jq(),WU()});function TG(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:_G(t),edges:EG(t)};return FF(t.graph())||(e.value=SD(t.graph())),e}function _G(n){return x(n.nodes(),function(t){var e=n.node(t),r=n.parent(t),t={v:t};return FF(e)||(t.value=e),FF(r)||(t.parent=r),t})}function EG(n){return x(n.edges(),function(t){var e=n.edge(t),r={v:t.v,w:t.w};return FF(t.name)||(r.name=t.name),FF(e)||(r.value=e),r})}var SG,CG,AG,LG,NG,IG,MG,RG,DG,OG,PG,BG,FG,$G,zG,qG=i(()=>{tq(),lq(),Ae(TG,"write"),Ae(_G,"writeNodes"),Ae(EG,"writeEdges")}),UG=i(()=>{t(),cq(),qG(),SG=new Map,CG=new Map,AG=new Map,LG=Ae(()=>{CG.clear(),AG.clear(),SG.clear()},"clear"),NG=Ae((t,e)=>{var r=CG.get(e)||[];return R.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),IG=Ae((t,e)=>{var r=CG.get(e)||[];return R.info("Descendants of ",e," is ",r),R.info("Edge is ",t),t.v!==e&&t.w!==e&&(r?r.includes(t.v)||NG(t.v,e)||NG(t.w,e)||r.includes(t.w):(R.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),MG=Ae((r,n,i,a)=>{R.warn("Copying children of ",r,"root",a,"data",n.node(r),a);var t=n.children(r)||[];r!==a&&t.push(r),R.warn("Copying (nodes) clusterId",r,"nodes",t),t.forEach(t=>{var e;0{R.info("Edge",t);var e=n.edge(t.v,t.w,t.name);R.info("Edge data",e,a);try{IG(t,a)?(R.info("Copying as ",t.v,t.w,e,t.name),i.setEdge(t.v,t.w,e,t.name),R.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):R.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",r)}catch(t){R.error(t)}})),R.debug("Removing node",t),n.removeNode(t)})},"copy"),RG=Ae((t,e)=>{let r=e.children(t),n=[...r];for(var i of r)AG.set(i,t),n=[...n,...RG(i,e)];return n},"extractDescendants"),DG=Ae((t,e,r)=>{let n=t.edges().filter(t=>t.v===e||t.w===e),i=t.edges().filter(t=>t.v===r||t.w===r),a=n.map(t=>({v:t.v===e?r:t.v,w:t.w===e?e:t.w})),s=i.map(t=>({v:t.v,w:t.w}));return a.filter(e=>s.some(t=>e.v===t.v&&e.w===t.w))},"findCommonEdges"),OG=Ae((t,e,r)=>{var n,i=e.children(t);if(R.trace("Searching children of id ",t,i),i.length<1)return t;let a;for(n of i){var s=OG(n,e,r),o=DG(e,r,s);if(s){if(!(0SG.has(t)&&SG.get(t).externalConnections&&SG.has(t)?SG.get(t).id:t,"getAnchorId"),BG=Ae((c,t)=>{if(!c||10{NG(t.v,e)^NG(t.w,e)&&(R.warn("Edge: ",t," leaves cluster ",e),R.warn("Descendants of XXX ",e,": ",CG.get(e)),SG.get(e).externalConnections=!0)})):R.debug("Not a cluster ",e,CG)});for(var e of SG.keys()){var r=SG.get(e).id;(r=c.parent(r))!==e&&SG.has(r)&&!SG.get(r).externalConnections&&(SG.get(e).id=r)}c.edges().forEach(function(t){var e,r,n,i,a,s=c.edge(t);R.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),R.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t)));let o=t.v,l=t.w;R.warn("Fix XXX",SG,"ids:",t.v,t.w,"Translating: ",SG.get(t.v)," --- ",SG.get(t.w)),SG.get(t.v)&&SG.get(t.w)&&SG.get(t.v)===SG.get(t.w)?(R.warn("Fixing and trying link to self - removing XXX",t.v,t.w,t.name),R.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),o=PG(t.v),l=PG(t.w),c.removeEdge(t.v,t.w,t.name),a=t.w+"---"+t.v+"---1",e=t.w+"---"+t.v+"---2",c.setNode(a,{domId:a,id:a,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),c.setNode(e,{domId:e,id:e,labelStyle:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),i=structuredClone(s),r=structuredClone(s),n=structuredClone(s),i.label="",i.arrowTypeEnd="none",i.id=t.name+"-cyclic-special-1",r.arrowTypeEnd="none",r.id=t.name+"-cyclic-special-mid",n.label="",i.fromCluster=t.v,n.toCluster=t.v,n.id=t.name+"-cyclic-special-2",c.setEdge(o,a,i,t.name+"-cyclic-special-0"),c.setEdge(a,e,r,t.name+"-cyclic-special-1"),c.setEdge(e,l,n,t.name+"-cyclic-special-2")):(SG.get(t.v)||SG.get(t.w))&&(R.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),o=PG(t.v),l=PG(t.w),c.removeEdge(t.v,t.w,t.name),o!==t.v&&(i=c.parent(o),SG.get(i).externalConnections=!0,s.fromCluster=t.v),l!==t.w&&(a=c.parent(l),SG.get(a).externalConnections=!0,s.toCluster=t.w),R.warn("Fix Replacing with XXX",o,l,t.name),c.setEdge(o,l,s,t.name))}),R.warn("Adjusted Graph",TG(c)),FG(c,0),R.trace(SG)}},"adjustClustersAndEdges"),FG=Ae((r,n)=>{if(R.warn("extractor - ",n,TG(r),r.children("D")),10{if(0===t.length)return[];let r=Object.assign([],t);return t.forEach(t=>{t=e.children(t),t=$G(e,t),r=[...r,...t]}),r},"sorter"),zG=Ae(t=>$G(t,t.children()),"sortNodesByHierarchy")}),jG={};A(jG,{render:()=>WG});var GG,WG,YG,HG,VG,XG,KG,ZG,QG,JG,tW,eW,rW,nW,iW,aW,sW,oW=i(()=>{kG(),qG(),cq(),OA(),PA(),UG(),dN(),X9(),DA(),t(),yC(),wc(),GG=Ae(async(t,i,a,s,o,l)=>{R.info("Graph in recursive render: XXX",TG(i),o);let c=i.graph().rankdir,n=(R.trace("Dir in recursive render - dir:",c),t=t.insert("g").attr("class","root"),i.nodes()?R.info("Recursive render XXX",i.nodes()):R.info("No nodes found for",i),0{var t=i.edges().map(async function(t){var e=i.edge(t.v,t.w,t.name);R.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),R.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(i.edge(t))),R.info("Fix",SG,"ids:",t.v,t.w,"Translating: ",SG.get(t.v),SG.get(t.w)),await uA(r,e)});await Promise.all(t)},"processEdges")(),R.info("Graph before layout:",JSON.stringify(TG(i))),R.info("############################################# XXX"),R.info("### Layout ### XXX"),R.info("############################################# XXX"),Xj(i),R.info("Graph after layout:",JSON.stringify(TG(i))),0),p=gC(l).subGraphTitleTotalMargin;return await Promise.all(zG(i).map(async function(t){var e,r=i.node(t);R.info("Position XBX => "+t+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,R.info("A tainted cluster node XBX1",t,r.id,r.width,r.height,r.x,r.y,i.parent(t)),SG.get(r.id).node=r,ZL(r)):0 "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),i.node(t.v)),t=i.node(t.w),r=vA(h,e,SG,a,r,t,s);dA(e,r)}),i.nodes().forEach(function(t){var e=i.node(t);R.info(t,e.type,e.diff),e.isGroup&&(d=e.diff)}),R.warn("Returning from recursive render XAX",t,d),{elem:t,diff:d}},"recursiveRender"),WG=Ae(async(t,e)=>{let r=new oq({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),n=e.select("g");NA(n,t.markers,t.type,t.diagramId),KL(),cA(),W9(),LG(),t.nodes.forEach(t=>{r.setNode(t.id,{...t}),t.parentId&&r.setParent(t.id,t.parentId)}),R.debug("Edges:",t.edges),t.edges.forEach(t=>{r.setEdge(t.start,t.end,{...t},t.id)}),R.warn("Graph at first:",JSON.stringify(TG(r))),BG(r),R.warn("Graph after:",JSON.stringify(TG(r))),e=D(),await GG(n,r,t.type,t.diagramId,void 0,e)},"render")}),lW=i(()=>{pN(),t(),YG={},HG=Ae(t=>{for(var e of t)YG[e.name]=e},"registerLayoutLoaders"),Ae(()=>{HG([{name:"dagre",loader:Ae(async()=>Promise.resolve().then(()=>(oW(),jG)),"loader")}])},"registerDefaultLayoutLoaders")(),VG=Ae(async(t,e)=>{var r;if(t.layoutAlgorithm in YG)return(await(r=YG[t.layoutAlgorithm]).loader()).render(t,e,QL,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+t.layoutAlgorithm)},"render"),XG=Ae((t="",{fallback:e="dagre"}={})=>{if(t in YG)return t;if(e in YG)return R.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")}),cW=i(()=>{sl(),t(),KG=Ae((t,e,r,n)=>{t.attr("class",r);var{width:r,height:i,x:a,y:s}=ZG(t,e),n=(Jo(t,i,r,n),QG(a,s,r,i,e));t.attr("viewBox",n),R.debug(`viewBox configured: ${n} with padding: `+e)},"setupViewPortForSVG"),ZG=Ae((t,e)=>({width:(t=t.node()?.getBBox()||{width:0,height:0,x:0,y:0}).width+2*e,height:t.height+2*e,x:t.x,y:t.y}),"calculateDimensionsWithPadding"),QG=Ae((t,e,r,n,i)=>t-i+` ${e-i} ${r} `+n,"createViewBox")}),hW=i(()=>{i3(),wc(),t(),mC(),lW(),cW(),rT(),P_(),JG=Ae(function(t,e){return e.db.getClasses()},"getClasses"),tW=Ae(async function(t,e,r,n){R.info("REF0:"),R.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:s}=D(),o;"sandbox"===i&&(o=O("#i"+e));var l,c="sandbox"===i?o.nodes()[0].contentDocument:document,h=(R.debug("Before getData: "),n.db.getData()),u=(R.debug("Data: ",h),pC(e,i)),d=a_(),d=(h.type=n.type,h.layoutAlgorithm=XG(s),"dagre"===h.layoutAlgorithm&&"elk"===s&&R.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),h.direction=d,h.nodeSpacing=a?.nodeSpacing||50,h.rankSpacing=a?.rankSpacing||50,h.markers=["point","circle","cross"],h.diagramId=e,R.debug("REF1:",h),await VG(h,u),h.config.flowchart?.diagramPadding??8);Q8.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),KG(u,d,"flowchart",a?.useMaxWidth||!1);for(l of h.nodes){var p=O(`#${e} [id="${l.id}"]`);if(p&&l.link){let t=c.createElementNS("http://www.w3.org/2000/svg","a"),e=(t.setAttributeNS("http://www.w3.org/2000/svg","class",l.cssClasses),t.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?t.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):l.linkTarget&&t.setAttributeNS("http://www.w3.org/2000/svg","target",l.linkTarget),p.insert(function(){return t},":first-child")),r=p.select(".label-container"),n=(r&&e.append(function(){return r.node()}),p.select(".label"));n&&e.append(function(){return n.node()})}}},"draw"),eW={getClasses:JG,draw:tW}}),uW=i(()=>{function P(){this.yy={}}var t=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),B=[1,4],F=[1,3],$=[1,5],z=[1,8,9,10,11,27,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],q=[2,2],U=[1,13],j=[1,14],G=[1,15],W=[1,16],Y=[1,23],H=[1,25],V=[1,26],X=[1,27],e=[1,49],r=[1,48],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],tt=[1,33],n=[1,44],i=[1,46],a=[1,42],s=[1,47],o=[1,43],l=[1,50],c=[1,45],h=[1,51],u=[1,52],et=[1,34],rt=[1,35],nt=[1,36],it=[1,37],at=[1,57],d=[1,8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],p=[1,61],g=[1,60],f=[1,62],st=[8,9,11,73,75],ot=[1,88],lt=[1,93],ct=[1,92],ht=[1,89],ut=[1,85],dt=[1,91],pt=[1,87],gt=[1,94],ft=[1,90],mt=[1,95],yt=[1,86],vt=[8,9,10,11,73,75],m=[8,9,10,11,44,73,75],y=[8,9,10,11,29,42,44,46,48,50,52,54,56,58,61,63,65,66,68,73,75,86,99,102,103,106,108,111,112,113],xt=[8,9,11,42,58,73,75,86,99,102,103,106,108,111,112,113],bt=[42,58,86,99,102,103,106,108,111,112,113],wt=[1,121],kt=[1,120],Tt=[1,128],_t=[1,142],Et=[1,143],St=[1,144],Ct=[1,145],At=[1,130],Lt=[1,132],Nt=[1,136],It=[1,137],Mt=[1,138],Rt=[1,139],Dt=[1,140],Ot=[1,141],Pt=[1,146],Bt=[1,147],Ft=[1,126],$t=[1,127],zt=[1,134],qt=[1,129],Ut=[1,133],jt=[1,131],Gt=[8,9,10,11,27,32,34,36,38,42,58,81,82,83,84,85,86,99,102,103,106,108,111,112,113,118,119,120,121],Wt=[1,149],v=[8,9,11],x=[8,9,10,11,14,42,58,86,102,103,106,108,111,112,113],b=[1,169],w=[1,165],k=[1,166],T=[1,170],_=[1,167],E=[1,168],Yt=[75,113,116],S=[8,9,10,11,12,14,27,29,32,42,58,73,81,82,83,84,85,86,87,102,106,108,111,112,113],Ht=[10,103],Vt=[31,47,49,51,53,55,60,62,64,65,67,69,113,114,115],C=[1,235],A=[1,233],L=[1,237],N=[1,231],I=[1,232],M=[1,234],R=[1,236],D=[1,238],Xt=[1,255],Kt=[8,9,11,103],O=[8,9,10,11,58,81,102,103,106,107,108,109],B={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,link:39,node:40,styledVertex:41,AMP:42,vertex:43,STYLE_SEPARATOR:44,idString:45,DOUBLECIRCLESTART:46,DOUBLECIRCLEEND:47,PS:48,PE:49,"(-":50,"-)":51,STADIUMSTART:52,STADIUMEND:53,SUBROUTINESTART:54,SUBROUTINEEND:55,VERTEX_WITH_PROPS_START:56,"NODE_STRING[field]":57,COLON:58,"NODE_STRING[value]":59,PIPE:60,CYLINDERSTART:61,CYLINDEREND:62,DIAMOND_START:63,DIAMOND_STOP:64,TAGEND:65,TRAPSTART:66,TRAPEND:67,INVTRAPSTART:68,INVTRAPEND:69,linkStatement:70,arrowText:71,TESTSTR:72,START_LINK:73,edgeText:74,LINK:75,edgeTextToken:76,STR:77,MD_STR:78,textToken:79,keywords:80,STYLE:81,LINKSTYLE:82,CLASSDEF:83,CLASS:84,CLICK:85,DOWN:86,UP:87,textNoTagsToken:88,stylesOpt:89,"idString[vertex]":90,"idString[class]":91,CALLBACKNAME:92,CALLBACKARGS:93,HREF:94,LINK_TARGET:95,"STR[link]":96,"STR[tooltip]":97,alphaNum:98,DEFAULT:99,numList:100,INTERPOLATE:101,NUM:102,COMMA:103,style:104,styleComponent:105,NODE_STRING:106,UNIT:107,BRKT:108,PCT:109,idStringToken:110,MINUS:111,MULT:112,UNICODE_TEXT:113,TEXT:114,TAGSTART:115,EDGE_TEXT:116,alphaNumToken:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",42:"AMP",44:"STYLE_SEPARATOR",46:"DOUBLECIRCLESTART",47:"DOUBLECIRCLEEND",48:"PS",49:"PE",50:"(-",51:"-)",52:"STADIUMSTART",53:"STADIUMEND",54:"SUBROUTINESTART",55:"SUBROUTINEEND",56:"VERTEX_WITH_PROPS_START",57:"NODE_STRING[field]",58:"COLON",59:"NODE_STRING[value]",60:"PIPE",61:"CYLINDERSTART",62:"CYLINDEREND",63:"DIAMOND_START",64:"DIAMOND_STOP",65:"TAGEND",66:"TRAPSTART",67:"TRAPEND",68:"INVTRAPSTART",69:"INVTRAPEND",72:"TESTSTR",73:"START_LINK",75:"LINK",77:"STR",78:"MD_STR",81:"STYLE",82:"LINKSTYLE",83:"CLASSDEF",84:"CLASS",85:"CLICK",86:"DOWN",87:"UP",90:"idString[vertex]",91:"idString[class]",92:"CALLBACKNAME",93:"CALLBACKARGS",94:"HREF",95:"LINK_TARGET",96:"STR[link]",97:"STR[tooltip]",99:"DEFAULT",101:"INTERPOLATE",102:"NUM",103:"COMMA",106:"NODE_STRING",107:"UNIT",108:"BRKT",109:"PCT",111:"MINUS",112:"MULT",113:"UNICODE_TEXT",114:"TEXT",115:"TAGSTART",116:"EDGE_TEXT",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[20,3],[20,4],[20,2],[20,1],[40,1],[40,5],[41,1],[41,3],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,8],[43,4],[43,4],[43,4],[43,6],[43,4],[43,4],[43,4],[43,4],[43,4],[43,1],[39,2],[39,3],[39,3],[39,1],[39,3],[74,1],[74,2],[74,1],[74,1],[70,1],[71,3],[30,1],[30,2],[30,1],[30,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[80,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[100,1],[100,3],[89,1],[89,3],[104,1],[104,2],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[105,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[110,1],[79,1],[79,1],[79,1],[79,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[76,1],[76,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[117,1],[45,1],[45,2],[98,1],[98,2],[33,1],[33,1],[33,1],[33,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[o])||0e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{callbackargs:{rules:[11,12,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},callbackname:{rules:[8,9,10,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},href:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},click:{rules:[15,18,27,28,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dottedEdgeText:{rules:[15,18,67,69,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},thickEdgeText:{rules:[15,18,64,66,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},edgeText:{rules:[15,18,61,63,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},trapText:{rules:[15,18,70,73,75,77,81,83,84,85,86,87,88,101,103,105,107],inclusive:!1},ellipseText:{rules:[15,18,70,71,72,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},text:{rules:[15,18,70,73,74,75,76,77,80,81,82,83,87,88,100,101,102,103,104,105,106,107,108],inclusive:!1},vertex:{rules:[15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},dir:{rules:[15,18,38,39,40,41,42,43,44,45,46,47,48,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr_multiline:{rules:[5,6,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_descr:{rules:[3,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},acc_title:{rules:[1,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},md_string:{rules:[13,14,15,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},string:{rules:[15,16,17,18,70,73,75,77,81,83,87,88,101,103,105,107],inclusive:!1},INITIAL:{rules:[0,2,4,7,15,18,19,20,21,22,23,24,25,26,29,30,31,32,33,34,35,36,37,49,50,51,52,53,54,55,56,57,58,59,60,61,62,64,65,67,68,70,73,75,77,78,79,81,83,87,88,89,90,91,92,93,94,95,96,97,98,99,101,103,105,107,109,110,111,112],inclusive:!0}}};B.lexer=F,Ae(P,"Parser"),(rW=new((P.prototype=B).Parser=P)).parser=rW,nW=rW}),dW=i(()=>{_r(),iW=Ae((t,e)=>{var r=(i=zt)(t,"r"),n=i(t,"g"),i=i(t,"b");return Ft(r,n,i,e)},"fade"),aW=Ae(t=>`.label { + font-family: ${t.fontFamily}; + color: ${t.nodeTextColor||t.textColor}; + } + .cluster-label text { + fill: ${t.titleColor}; + } + .cluster-label span { + color: ${t.titleColor}; + } + .cluster-label span p { + background-color: transparent; + } + + .label text,span { + fill: ${t.nodeTextColor||t.textColor}; + color: ${t.nodeTextColor||t.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + .rough-node .label text , .node .label text { + text-anchor: middle; + } + // .flowchart-label .text-outer-tspan { + // text-anchor: middle; + // } + // .flowchart-label .text-inner-tspan { + // text-anchor: start; + // } + + .node .katex path { + fill: #000; + stroke: #000; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; + } + + /* For html labels only */ + .labelBkg { + background-color: ${iW(t.edgeLabelBackground,.5)}; + // background-color: + } + + .cluster rect { + fill: ${t.clusterBkg}; + stroke: ${t.clusterBorder}; + stroke-width: 1px; + } + + .cluster text { + fill: ${t.titleColor}; + } + + .cluster span { + color: ${t.titleColor}; + } + /* .cluster div { + color: ${t.titleColor}; + } */ + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${t.fontFamily}; + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } +`,"getStyles"),sW=aW}),pW={};A(pW,{diagram:()=>gW});var gW,fW,mW,yW,vW,xW,bW,wW,kW,TW,_W,EW,SW,CW,AW,LW,NW,IW,MW=i(()=>{wc(),P_(),hW(),uW(),dW(),gW={parser:nW,db:R_,renderer:eW,styles:sW,init:Ae(t=>{t.flowchart||(t.flowchart={}),t.layout&&kl({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,kl({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),R_.clear(),R_.setGen("gen-2")},"init")}}),RW=i(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,20,22,24,26,27,28],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,14],l=[1,15],c=[1,21],h=[1,22],u=[1,23],d=[1,24],p=[1,25],g=[6,8,10,13,15,18,19,20,22,24,26,27,28,41,42,43,44,45],f=[1,34],m=[27,28,46,47],y=[41,42,43,44,45],v=[17,34],x=[1,54],b=[1,53],w=[17,34,36,38],n={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,":":13,role:14,BLOCK_START:15,attributes:16,BLOCK_STOP:17,SQS:18,SQE:19,title:20,title_value:21,acc_title:22,acc_title_value:23,acc_descr:24,acc_descr_value:25,acc_descr_multiline_value:26,ALPHANUM:27,ENTITY_NAME:28,attribute:29,attributeType:30,attributeName:31,attributeKeyTypeList:32,attributeComment:33,ATTRIBUTE_WORD:34,attributeKeyType:35,COMMA:36,ATTRIBUTE_KEY:37,COMMENT:38,cardinality:39,relType:40,ZERO_OR_ONE:41,ZERO_OR_MORE:42,ONE_OR_MORE:43,ONLY_ONE:44,MD_PARENT:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:":",15:"BLOCK_START",17:"BLOCK_STOP",18:"SQS",19:"SQE",20:"title",21:"title_value",22:"acc_title",23:"acc_title_value",24:"acc_descr",25:"acc_descr_value",26:"acc_descr_multiline_value",27:"ALPHANUM",28:"ENTITY_NAME",34:"ATTRIBUTE_WORD",36:"COMMA",37:"ATTRIBUTE_KEY",38:"COMMENT",41:"ZERO_OR_ONE",42:"ZERO_OR_MORE",43:"ONE_OR_MORE",44:"ONLY_ONE",45:"MD_PARENT",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,4],[9,3],[9,1],[9,7],[9,6],[9,4],[9,2],[9,2],[9,2],[9,1],[11,1],[11,1],[16,1],[16,2],[29,2],[29,3],[29,3],[29,4],[30,1],[31,1],[32,1],[32,3],[35,1],[33,1],[12,3],[39,1],[39,1],[39,1],[39,1],[39,1],[40,1],[40,1],[14,1],[14,1],[14,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.addEntity(a[o-4]),n.addEntity(a[o-2]),n.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:n.addEntity(a[o-3]),n.addAttributes(a[o-3],a[o-1]);break;case 10:n.addEntity(a[o-2]);break;case 11:n.addEntity(a[o]);break;case 12:n.addEntity(a[o-6],a[o-4]),n.addAttributes(a[o-6],a[o-1]);break;case 13:n.addEntity(a[o-5],a[o-3]);break;case 14:n.addEntity(a[o-3],a[o-1]);break;case 15:case 16:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 19:case 43:this.$=a[o];break;case 20:case 41:case 42:this.$=a[o].replace(/"/g,"");break;case 21:case 29:this.$=[a[o]];break;case 22:a[o].push(a[o-1]),this.$=a[o];break;case 23:this.$={attributeType:a[o-1],attributeName:a[o]};break;case 24:this.$={attributeType:a[o-2],attributeName:a[o-1],attributeKeyTypeList:a[o]};break;case 25:this.$={attributeType:a[o-2],attributeName:a[o-1],attributeComment:a[o]};break;case 26:this.$={attributeType:a[o-3],attributeName:a[o-2],attributeKeyTypeList:a[o-1],attributeComment:a[o]};break;case 27:case 28:case 31:this.$=a[o];break;case 30:a[o-2].push(a[o]),this.$=a[o-2];break;case 32:this.$=a[o].replace(/"/g,"");break;case 33:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 34:this.$=n.Cardinality.ZERO_OR_ONE;break;case 35:this.$=n.Cardinality.ZERO_OR_MORE;break;case 36:this.$=n.Cardinality.ONE_OR_MORE;break;case 37:this.$=n.Cardinality.ONLY_ONE;break;case 38:this.$=n.Cardinality.MD_PARENT;break;case 39:this.$=n.Identification.NON_IDENTIFYING;break;case 40:this.$=n.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,20:n,22:i,24:a,26:s,27:o,28:l},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:16,11:9,20:n,22:i,24:a,26:s,27:o,28:l},e(r,[2,5]),e(r,[2,6]),e(r,[2,11],{12:17,39:20,15:[1,18],18:[1,19],41:c,42:h,43:u,44:d,45:p}),{21:[1,26]},{23:[1,27]},{25:[1,28]},e(r,[2,18]),e(g,[2,19]),e(g,[2,20]),e(r,[2,4]),{11:29,27:o,28:l},{16:30,17:[1,31],29:32,30:33,34:f},{11:35,27:o,28:l},{40:36,46:[1,37],47:[1,38]},e(m,[2,34]),e(m,[2,35]),e(m,[2,36]),e(m,[2,37]),e(m,[2,38]),e(r,[2,15]),e(r,[2,16]),e(r,[2,17]),{13:[1,39]},{17:[1,40]},e(r,[2,10]),{16:41,17:[2,21],29:32,30:33,34:f},{31:42,34:[1,43]},{34:[2,27]},{19:[1,44]},{39:45,41:c,42:h,43:u,44:d,45:p},e(y,[2,39]),e(y,[2,40]),{14:46,27:[1,49],28:[1,48],48:[1,47]},e(r,[2,9]),{17:[2,22]},e(v,[2,23],{32:50,33:51,35:52,37:x,38:b}),e([17,34,37,38],[2,28]),e(r,[2,14],{15:[1,55]}),e([27,28],[2,33]),e(r,[2,8]),e(r,[2,41]),e(r,[2,42]),e(r,[2,43]),e(v,[2,24],{33:56,36:[1,57],38:b}),e(v,[2,25]),e(w,[2,29]),e(v,[2,32]),e(w,[2,31]),{16:58,17:[1,59],29:32,30:33,34:f},e(v,[2,26]),{35:60,37:x},{17:[1,61]},e(r,[2,13]),e(w,[2,30]),e(r,[2,12])],defaultActions:{34:[2,27],41:[2,22]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0{t(),wc(),bc(),yW=new Map,vW=[],xW={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE",MD_PARENT:"MD_PARENT"},bW={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},wW=Ae(function(t,e=void 0){return yW.has(t)?!yW.get(t).alias&&e&&(yW.get(t).alias=e,R.info(`Add alias '${e}' to entity '${t}'`)):(yW.set(t,{attributes:[],alias:e}),R.info("Added new entity :",t)),yW.get(t)},"addEntity"),kW=Ae(()=>yW,"getEntities"),TW=Ae(function(t,e){let r=wW(t),n;for(n=e.length-1;0<=n;n--)r.attributes.push(e[n]),R.debug("Added attribute ",e[n].attributeName)},"addAttributes"),_W=Ae(function(t,e,r,n){vW.push(t={entityA:t,roleA:e,entityB:r,relSpec:n}),R.debug("Added new relationship :",t)},"addRelationship"),EW=Ae(()=>vW,"getRelationships"),SW=Ae(function(){yW=new Map,vW=[],pl()},"clear"),CW={Cardinality:xW,Identification:bW,getConfig:Ae(()=>D().er,"getConfig"),addEntity:wW,addAttributes:TW,getEntities:kW,addRelationship:_W,getRelationships:EW,clear:SW,setAccTitle:gl,getAccTitle:fl,setAccDescription:ml,getAccDescription:yl,setDiagramTitle:vl,getDiagramTitle:xl}}),OW=i(()=>{AW={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END",MD_PARENT_END:"MD_PARENT_END",MD_PARENT_START:"MD_PARENT_START"},LW=Ae(function(t,e){let r;t.append("defs").append("marker").attr("id",AW.MD_PARENT_START).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",AW.MD_PARENT_END).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",AW.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",AW.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(r=t.append("defs").append("marker").attr("id",AW.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(r=t.append("defs").append("marker").attr("id",AW.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",AW.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",AW.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(r=t.append("defs").append("marker").attr("id",AW.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(r=t.append("defs").append("marker").attr("id",AW.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"insertMarkers"),NW={ERMarkers:AW,insertMarkers:LW}}),PW=i(()=>{IW=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i});function BW(t){return"string"==typeof t&&IW.test(t)}var FW,$W=i(()=>{PW(),Ae(BW,"validate"),FW=BW});function zW(t,e=0){return qW[t[e+0]]+qW[t[e+1]]+qW[t[e+2]]+qW[t[e+3]]+"-"+qW[t[e+4]]+qW[t[e+5]]+"-"+qW[t[e+6]]+qW[t[e+7]]+"-"+qW[t[e+8]]+qW[t[e+9]]+"-"+qW[t[e+10]]+qW[t[e+11]]+qW[t[e+12]]+qW[t[e+13]]+qW[t[e+14]]+qW[t[e+15]]}var qW,UW=i(()=>{qW=[];for(let t=0;t<256;++t)qW.push((t+256).toString(16).slice(1));Ae(zW,"unsafeStringify")});function jW(t){var e,r;if(FW(t))return(r=new Uint8Array(16))[0]=(e=parseInt(t.slice(0,8),16))>>>24,r[1]=e>>>16&255,r[2]=e>>>8&255,r[3]=255&e,r[4]=(e=parseInt(t.slice(9,13),16))>>>8,r[5]=255&e,r[6]=(e=parseInt(t.slice(14,18),16))>>>8,r[7]=255&e,r[8]=(e=parseInt(t.slice(19,23),16))>>>8,r[9]=255&e,r[10]=(e=parseInt(t.slice(24,36),16))/1099511627776&255,r[11]=e/4294967296&255,r[12]=e>>>24&255,r[13]=e>>>16&255,r[14]=e>>>8&255,r[15]=255&e,r;throw TypeError("Invalid UUID")}var GW,WW=i(()=>{$W(),Ae(jW,"parse"),GW=jW});function YW(e){e=unescape(encodeURIComponent(e));var r=[];for(let t=0;t{UW(),WW(),Ae(YW,"stringToBytes"),VW="6ba7b810-9dad-11d1-80b4-00c04fd430c8",XW="6ba7b811-9dad-11d1-80b4-00c04fd430c8",Ae(HW,"v35")});function ZW(t,e,r,n){switch(t){case 0:return e&r^~e&n;case 1:return e^r^n;case 2:return e&r^e&n^r&n;case 3:return e^r^n}}function QW(t,e){return t<>>32-e}function JW(r){var o=[1518500249,1859775393,2400959708,3395469782],t=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof r){var e=unescape(encodeURIComponent(r));r=[];for(let t=0;t>>0;a=i,i=n,n=QW(r,30)>>>0,r=e,e=h}t[0]=t[0]+e>>>0,t[1]=t[1]+r>>>0,t[2]=t[2]+n>>>0,t[3]=t[3]+i>>>0,t[4]=t[4]+a>>>0}return[t[0]>>24&255,t[0]>>16&255,t[0]>>8&255,255&t[0],t[1]>>24&255,t[1]>>16&255,t[1]>>8&255,255&t[1],t[2]>>24&255,t[2]>>16&255,t[2]>>8&255,255&t[2],t[3]>>24&255,t[3]>>16&255,t[3]>>8&255,255&t[3],t[4]>>24&255,t[4]>>16&255,t[4]>>8&255,255&t[4]]}var tY,eY,rY,nY=i(()=>{Ae(ZW,"f"),Ae(QW,"ROTL"),Ae(JW,"sha1"),tY=JW}),iY=i(()=>{KW(),nY(),eY=HW("v5",80,tY),rY=eY}),aY=i(()=>{iY()});function sY(t="",e=""){var r=t.replace(lY,"");return""+oY(e)+oY(r)+rY(t,bY)}function oY(t=""){return 0{cq(),i3(),kG(),wc(),t(),rT(),OW(),sl(),al(),aY(),lY=/[^\dA-Za-z](\W)*/g,cY={},hY=new Map,uY=Ae(function(t){var e;for(e of Object.keys(t))cY[e]=t[e]},"setConf"),dY=Ae((c,h,t)=>{let u=cY.entityPadding/3,l=cY.entityPadding/3,d=.85*cY.fontSize,e=h.node().getBBox(),p=[],g=!1,f=!1,m=0,y=0,v=0,x=0,b=e.height+2*u,w=1,r=(t.forEach(t=>{void 0!==t.attributeKeyTypeList&&0{let e=h.node().id+"-attr-"+w,r=0,n=Uo(t.attributeType),i=c.append("text").classed("er entityLabel",!0).attr("id",e+"-type").attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",D().fontFamily).style("font-size",d+"px").text(n),a=c.append("text").classed("er entityLabel",!0).attr("id",e+"-name").attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",D().fontFamily).style("font-size",d+"px").text(t.attributeName),s={};s.tn=i,s.nn=a;var o=i.node().getBBox(),l=a.node().getBBox();m=Math.max(m,o.width),y=Math.max(y,l.width),r=Math.max(o.height,l.height),g&&(o=void 0!==t.attributeKeyTypeList?t.attributeKeyTypeList.join(","):"",l=c.append("text").classed("er entityLabel",!0).attr("id",e+"-key").attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",D().fontFamily).style("font-size",d+"px").text(o),o=(s.kn=l).node().getBBox(),v=Math.max(v,o.width),r=Math.max(r,o.height)),f&&(l=c.append("text").classed("er entityLabel",!0).attr("id",e+"-comment").attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",D().fontFamily).style("font-size",d+"px").text(t.attributeComment||""),o=(s.cn=l).node().getBBox(),x=Math.max(x,o.width),r=Math.max(r,o.height)),s.height=r,p.push(s),b+=r+2*u,w+=1}),4);g&&(r+=2),f&&(r+=2);var n=m+y+v+x,i={width:Math.max(cY.minEntityWidth,Math.max(e.width+2*cY.entityPadding,n+l*r)),height:0{var e=s+u+t.height/2,r=(t.tn.attr("transform","translate("+l+","+e+")"),c.insert("rect","#"+t.tn.node().id).classed("er "+o,!0).attr("x",0).attr("y",s).attr("width",m+2*l+a).attr("height",t.height+2*u)),r=parseFloat(r.attr("x"))+parseFloat(r.attr("width"));t.nn.attr("transform","translate("+(r+l)+","+e+")");let n=c.insert("rect","#"+t.nn.node().id).classed("er "+o,!0).attr("x",r).attr("y",s).attr("width",y+2*l+a).attr("height",t.height+2*u),i=parseFloat(n.attr("x"))+parseFloat(n.attr("width"));g&&(t.kn.attr("transform","translate("+(i+l)+","+e+")"),r=c.insert("rect","#"+t.kn.node().id).classed("er "+o,!0).attr("x",i).attr("y",s).attr("width",v+2*l+a).attr("height",t.height+2*u),i=parseFloat(r.attr("x"))+parseFloat(r.attr("width"))),f&&(t.cn.attr("transform","translate("+(i+l)+","+e+")"),c.insert("rect","#"+t.cn.node().id).classed("er "+o,"true").attr("x",i).attr("y",s).attr("width",x+2*l+a).attr("height",t.height+2*u)),s+=t.height+2*u,o="attributeBoxOdd"===o?"attributeBoxEven":"attributeBoxOdd"})}else i.height=Math.max(cY.minEntityHeight,b),h.attr("transform","translate("+i.width/2+","+i.height/2+")");return i},"drawAttributes"),pY=Ae(function(a,s,o){let t=[...s.keys()],l;return t.forEach(function(t){var e=sY(t,"entity"),r=(hY.set(t,e),a.append("g").attr("id",e)),n=(l=void 0===l?e:l,"text-"+e),i=r.append("text").classed("er entityLabel",!0).attr("id",n).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",D().fontFamily).style("font-size",cY.fontSize+"px").text(s.get(t).alias??t),{width:i,height:t}=dY(r,i,s.get(t).attributes),r=r.insert("rect","#"+n).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",i).attr("height",t).node().getBBox();o.setNode(e,{width:r.width,height:r.height,shape:"rect",id:e})}),l},"drawEntities"),gY=Ae(function(e,r){r.nodes().forEach(function(t){void 0!==t&&void 0!==r.node(t)&&e.select("#"+t).attr("transform","translate("+(r.node(t).x-r.node(t).width/2)+","+(r.node(t).y-r.node(t).height/2)+" )")})},"adjustEntities"),fY=Ae(function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},"getEdgeName"),mY=Ae(function(t,e){return t.forEach(function(t){e.setEdge(hY.get(t.entityA),hY.get(t.entityB),{relationship:t},fY(t))}),t},"addRelationships"),yY=0,vY=Ae(function(t,e,r,n,i){yY++;var r=r.edge(hY.get(e.entityA),hY.get(e.entityB),fY(e)),a=rx().x(function(t){return t.x}).y(function(t){return t.y}).curve(vx),s=t.insert("path","#"+n).classed("er relationshipLine",!0).attr("d",a(r.points)).style("stroke",cY.stroke).style("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&s.attr("stroke-dasharray","8,8");let o="";switch(cY.arrowMarkerAbsolute&&(o=(o=(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:s.attr("marker-end","url("+o+"#"+NW.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:s.attr("marker-end","url("+o+"#"+NW.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:s.attr("marker-end","url("+o+"#"+NW.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:s.attr("marker-end","url("+o+"#"+NW.ERMarkers.ONLY_ONE_END+")");break;case i.db.Cardinality.MD_PARENT:s.attr("marker-end","url("+o+"#"+NW.ERMarkers.MD_PARENT_END+")")}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:s.attr("marker-start","url("+o+"#"+NW.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:s.attr("marker-start","url("+o+"#"+NW.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:s.attr("marker-start","url("+o+"#"+NW.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:s.attr("marker-start","url("+o+"#"+NW.ERMarkers.ONLY_ONE_START+")");break;case i.db.Cardinality.MD_PARENT:s.attr("marker-start","url("+o+"#"+NW.ERMarkers.MD_PARENT_START+")")}n=s.node().getTotalLength(),a=s.node().getPointAtLength(.5*n),r="rel"+yY,i=t.append("text").classed("er relationshipLabel",!0).attr("id",r).attr("x",a.x).attr("y",a.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",D().fontFamily).style("font-size",cY.fontSize+"px").text(e.roleA).node().getBBox(),t.insert("rect","#"+r).classed("er relationshipLabelBox",!0).attr("x",a.x-i.width/2).attr("y",a.y-i.height/2).attr("width",i.width).attr("height",i.height)},"drawRelationshipFromLayout"),xY=Ae(function(t,e,r,n){cY=D().er,R.info("Drawing ER diagram");let i=D().securityLevel,a,s=("sandbox"===i&&(a=O("#i"+e)),O("sandbox"===i?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`));NW.insertMarkers(s,cY);let o,l=(o=new oq({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:cY.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}}),pY(s,n.db.getEntities(),o)),c=mY(n.db.getRelationships(),o);Xj(o),gY(s,o),c.forEach(function(t){vY(s,t,o,l,n)});var e=cY.diagramPadding,h=(Q8.insertTitle(s,"entityTitleText",cY.titleTopMargin,n.db.getDiagramTitle()),s.node().getBBox()),u=h.width+2*e,d=h.height+2*e;Jo(s,d,u,cY.useMaxWidth),s.attr("viewBox",`${h.x-e} ${h.y-e} ${u} `+d)},"draw"),bY="28e9f9db-3c8d-5aa5-9faf-44286ae5937c",Ae(sY,"generateId"),Ae(oY,"strWithHyphen"),wY={setConf:uY,draw:xY}}),EY=i(()=>{kY=Ae(t=>` + .entityBox { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + } + + .attributeBoxOdd { + fill: ${t.attributeBackgroundColorOdd}; + stroke: ${t.nodeBorder}; + } + + .attributeBoxEven { + fill: ${t.attributeBackgroundColorEven}; + stroke: ${t.nodeBorder}; + } + + .relationshipLabelBox { + fill: ${t.tertiaryColor}; + opacity: 0.7; + background-color: ${t.tertiaryColor}; + rect { + opacity: 0.5; + } + } + + .relationshipLine { + stroke: ${t.lineColor}; + } + + .entityTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } + #MD_PARENT_START { + fill: #f5f5f5 !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; + } + #MD_PARENT_END { + fill: #f5f5f5 !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; + } + +`,"getStyles"),TY=kY}),SY={};A(SY,{diagram:()=>CY});var CY,AY=i(()=>{RW(),DW(),_Y(),EY(),CY={parser:mW,db:CW,renderer:wY,styles:TY}});function LY(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function NY(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText}function IY(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function MY(t){return"object"==typeof t&&null!==t&&LY(t.container)&&NY(t.reference)&&"string"==typeof t.message}function RY(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function DY(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function OY(t){return RY(t)&&"string"==typeof t.fullText}var PY,BY=i(()=>{Ae(LY,"isAstNode"),Ae(NY,"isReference"),Ae(IY,"isAstNodeDescription"),Ae(MY,"isLinkingError"),PY=class{static{Ae(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,e){return LY(t)&&this.isSubtype(t.$type,e)}isSubtype(t,e){var r,n;return t===e||(void 0!==(n=(r=(r=this.subtypes[t])||(this.subtypes[t]={}))[e])?n:(n=this.computeIsSubtype(t,e),r[e]=n))}getAllSubTypes(t){var e=this.allSubtypes[t];if(e)return e;var r,n=[];for(r of this.getAllTypes())this.isSubtype(r,t)&&n.push(r);return this.allSubtypes[t]=n}},Ae(RY,"isCompositeCstNode"),Ae(DY,"isLeafCstNode"),Ae(OY,"isRootCstNode")});function FY(t){return"string"==typeof t?t:"u"e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new qY(()=>({index:0}),t=>t.index({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){var e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex{function t(t){return t.reduce((t,e)=>t+e,0)}function e(t){return t.reduce((t,e)=>t*e,0)}function r(t){return t.reduce((t,e)=>Math.min(t,e))}function n(t){return t.reduce((t,e)=>Math.max(t,e))}var i;qY=class a{static{Ae(this,"StreamImpl")}constructor(t,e){this.startFn=t,this.nextFn=e}iterator(){let t={state:this.startFn(),next:Ae(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),e=0,r=t.next();for(;!r.done;)e++,r=t.next();return e}toArray(){for(var t,e=[],r=this.iterator();void 0!==(t=r.next()).value&&e.push(t.value),!t.done;);return e}toSet(){return new Set(this)}toMap(e,r){var t=this.map(t=>[e?e(t):t,r?r(t):t]);return new Map(t)}toString(){return this.join()}concat(t){let r=t[Symbol.iterator]();return new a(()=>({first:this.startFn(),firstDone:!1}),t=>{let e;if(!t.firstDone){do{if(!(e=this.nextFn(t.first)).done)return e}while(!e.done);t.firstDone=!0}do{if(!(e=r.next()).done)return e}while(!e.done);return jY})}join(t=","){let e=this.iterator(),r="",n,i=!1;for(;(n=e.next()).done||(i&&(r+=t),r+=FY(n.value)),i=!0,!n.done;);return r}indexOf(t,e=0){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(n>=e&&i.value===t)return n;i=r.next(),n++}return-1}every(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(!t(r.value))return!1;r=e.next()}return!0}some(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return!0;r=e.next()}return!1}forEach(t){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)t(n.value,r),n=e.next(),r++}map(r){return new a(this.startFn,t=>{var{done:t,value:e}=this.nextFn(t);return t?jY:{done:!1,value:r(e)}})}filter(r){return new a(this.startFn,t=>{var e;do{if(!(e=this.nextFn(t)).done&&r(e.value))return e}while(!e.done);return jY})}nonNullable(){return this.filter(t=>null!=t)}reduce(t,e){let r=this.iterator(),n=e,i=r.next();for(;!i.done;)n=void 0===n?i.value:t(n,i.value),i=r.next();return n}reduceRight(t,e){return this.recursiveReduce(this.iterator(),t,e)}recursiveReduce(t,e,r){var n=t.next();return n.done?r:void 0===(t=this.recursiveReduce(t,e,r))?n.value:e(t,n.value)}find(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return r.value;r=e.next()}}findIndex(t){let e=this.iterator(),r=0,n=e.next();for(;!n.done;){if(t(n.value))return r;n=e.next(),r++}return-1}includes(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(r.value===t)return!0;r=e.next()}return!1}flatMap(n){return new a(()=>({this:this.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=this.nextFn(t.this);if(!e){if(!$Y(r=n(r)))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return jY})}flat(t){if((t=void 0===t?1:t)<=0)return this;let n=1({this:n.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=n.nextFn(t.this);if(!e){if(!$Y(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return jY})}head(){var t=this.iterator().next();if(!t.done)return t.value}tail(r=1){return new a(()=>{var e=this.startFn();for(let t=0;t({size:0,state:this.startFn()}),t=>(t.size++,t.size>e?jY:this.nextFn(t.state)))}distinct(e){let r=new Set;return this.filter(t=>(t=e?e(t):t,!r.has(t)&&(r.add(t),!0)))}exclude(t,e){let r=new Set;for(var n of t)n=e?e(n):n,r.add(n);return this.filter(t=>(t=e?e(t):t,!r.has(t)))}},Ae(FY,"toString"),Ae($Y,"isIterable"),UY=new qY(()=>{},()=>jY),jY=Object.freeze({done:!0,value:void 0}),Ae(zY,"stream"),GY=class extends qY{static{Ae(this,"TreeStreamImpl")}constructor(t,r,e){super(()=>({iterators:e?.includeRoot?[[t][Symbol.iterator]()]:[r(t)[Symbol.iterator]()],pruned:!1}),t=>{for(t.pruned&&(t.iterators.pop(),t.pruned=!1);0this.nextFn(t.state),"next"),prune:Ae(()=>{t.state.pruned=!0},"prune"),[Symbol.iterator]:()=>t};return t}},i=WY=WY||{},Ae(t,"sum"),i.sum=t,Ae(e,"product"),i.product=e,Ae(r,"min"),i.min=r,Ae(n,"max"),i.max=n}),HY={};function VY(t){return new GY(t,t=>RY(t)?t.content:[],{includeRoot:!0})}function XY(t){return VY(t).filter(DY)}function KY(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function ZY(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function QY(t){var e,r;if(t)return{offset:t,end:e,range:r}=t,{range:r,offset:t,end:e,length:e-t}}function JY(t,e){var r;return t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>e.end.character?pH.After:(r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,t=t.end.linepH.After}function eH(t,e,r=gH){var n;if(t)return 0!t.hidden)-1;0<=t;t--){var n=e.content[t];if(nH(n,r))return n}}}function nH(t,e){return DY(t)&&e.includes(t.tokenType.name)}function iH(t,e){return DY(t)?t:RY(t)&&(t=sH(t,e,!1))?iH(t,e):void 0}function aH(t,e){return DY(t)?t:RY(t)&&(t=sH(t,e,!0))?aH(t,e):void 0}function sH(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){var s=Math.floor((n+i)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(a=r?o:void 0,n=s+1):i=s-1}return a}function oH(r,n=!0){for(;r.container;){let t=r.container,e=t.content.indexOf(r);for(;0gH,RangeComparison:()=>pH,compareRange:()=>JY,findCommentNode:()=>rH,findDeclarationNodeAtOffset:()=>eH,findLeafNodeAtOffset:()=>iH,findLeafNodeBeforeOffset:()=>aH,flattenCst:()=>XY,getInteriorNodes:()=>hH,getNextNode:()=>lH,getPreviousNode:()=>oH,getStartlineNode:()=>cH,inRange:()=>tH,isChildNode:()=>KY,isCommentNode:()=>nH,streamCst:()=>VY,toDocumentSegment:()=>QY,tokenToRange:()=>ZY});var pH,gH,fH=i(()=>{var t;BY(),YY(),Ae(VY,"streamCst"),Ae(XY,"flattenCst"),Ae(KY,"isChildNode"),Ae(ZY,"tokenToRange"),Ae(QY,"toDocumentSegment"),(t=pH=pH||{})[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",Ae(JY,"compareRange"),Ae(tH,"inRange"),gH=/^[\w\p{L}]$/u,Ae(eH,"findDeclarationNodeAtOffset"),Ae(rH,"findCommentNode"),Ae(nH,"isCommentNode"),Ae(iH,"findLeafNodeAtOffset"),Ae(aH,"findLeafNodeBeforeOffset"),Ae(sH,"binarySearch"),Ae(oH,"getPreviousNode"),Ae(lH,"getNextNode"),Ae(cH,"getStartlineNode"),Ae(hH,"getInteriorNodes"),Ae(uH,"getCommonParent"),Ae(dH,"getParentChain")});function mH(t){throw new Error("Error! The input value was not handled.")}var yH,vH=i(()=>{yH=class extends Error{static{Ae(this,"ErrorWithLocation")}constructor(t,e){super(t?`${e} at ${t.range.start.line}:`+t.range.start.character:e)}},Ae(mH,"assertUnreachable")}),xH={};function bH(t){return lX.isInstance(t,fV)}function wH(t){return lX.isInstance(t,mV)}function kH(t){return lX.isInstance(t,yV)}function TH(t){return _H(t)||"current"===t||"entry"===t||"extends"===t||"false"===t||"fragment"===t||"grammar"===t||"hidden"===t||"import"===t||"interface"===t||"returns"===t||"terminal"===t||"true"===t||"type"===t||"infer"===t||"infers"===t||"with"===t||"string"==typeof t&&/\^?[_a-zA-Z][\w_]*/.test(t)}function _H(t){return"string"===t||"number"===t||"boolean"===t||"Date"===t||"bigint"===t}function EH(t){return lX.isInstance(t,vV)}function SH(t){return lX.isInstance(t,xV)}function CH(t){return lX.isInstance(t,bV)}function AH(t){return lX.isInstance(t,wV)}function LH(t){return lX.isInstance(t,kV)}function NH(t){return lX.isInstance(t,TV)}function IH(t){return lX.isInstance(t,_V)}function MH(t){return lX.isInstance(t,EV)}function RH(t){return lX.isInstance(t,SV)}function DH(t){return lX.isInstance(t,CV)}function OH(t){return lX.isInstance(t,AV)}function PH(t){return lX.isInstance(t,LV)}function BH(t){return lX.isInstance(t,NV)}function FH(t){return lX.isInstance(t,IV)}function $H(t){return lX.isInstance(t,MV)}function zH(t){return lX.isInstance(t,RV)}function qH(t){return lX.isInstance(t,DV)}function UH(t){return lX.isInstance(t,OV)}function jH(t){return lX.isInstance(t,PV)}function GH(t){return lX.isInstance(t,BV)}function WH(t){return lX.isInstance(t,FV)}function YH(t){return lX.isInstance(t,$V)}function HH(t){return lX.isInstance(t,zV)}function VH(t){return lX.isInstance(t,qV)}function XH(t){return lX.isInstance(t,UV)}function KH(t){return lX.isInstance(t,jV)}function ZH(t){return lX.isInstance(t,GV)}function QH(t){return lX.isInstance(t,WV)}function JH(t){return lX.isInstance(t,YV)}function tV(t){return lX.isInstance(t,HV)}function eV(t){return lX.isInstance(t,VV)}function rV(t){return lX.isInstance(t,XV)}function nV(t){return lX.isInstance(t,KV)}function iV(t){return lX.isInstance(t,ZV)}function aV(t){return lX.isInstance(t,QV)}function sV(t){return lX.isInstance(t,JV)}function oV(t){return lX.isInstance(t,tX)}function lV(t){return lX.isInstance(t,eX)}function cV(t){return lX.isInstance(t,rX)}function hV(t){return lX.isInstance(t,nX)}function uV(t){return lX.isInstance(t,iX)}function dV(t){return lX.isInstance(t,aX)}function pV(t){return lX.isInstance(t,sX)}A(xH,{AbstractElement:()=>bV,AbstractRule:()=>fV,AbstractType:()=>mV,Action:()=>GV,Alternatives:()=>WV,ArrayLiteral:()=>wV,ArrayType:()=>kV,Assignment:()=>YV,BooleanLiteral:()=>TV,CharacterRange:()=>HV,Condition:()=>yV,Conjunction:()=>_V,CrossReference:()=>VV,Disjunction:()=>EV,EndOfFile:()=>XV,Grammar:()=>SV,GrammarImport:()=>CV,Group:()=>KV,InferredType:()=>AV,Interface:()=>LV,Keyword:()=>ZV,LangiumGrammarAstReflection:()=>oX,LangiumGrammarTerminals:()=>gV,NamedArgument:()=>NV,NegatedToken:()=>QV,Negation:()=>IV,NumberLiteral:()=>MV,Parameter:()=>RV,ParameterReference:()=>DV,ParserRule:()=>OV,ReferenceType:()=>PV,RegexToken:()=>JV,ReturnType:()=>BV,RuleCall:()=>tX,SimpleType:()=>FV,StringLiteral:()=>$V,TerminalAlternatives:()=>eX,TerminalGroup:()=>rX,TerminalRule:()=>zV,TerminalRuleCall:()=>nX,Type:()=>qV,TypeAttribute:()=>UV,TypeDefinition:()=>vV,UnionType:()=>jV,UnorderedGroup:()=>iX,UntilToken:()=>aX,ValueLiteral:()=>xV,Wildcard:()=>sX,isAbstractElement:()=>CH,isAbstractRule:()=>bH,isAbstractType:()=>wH,isAction:()=>ZH,isAlternatives:()=>QH,isArrayLiteral:()=>AH,isArrayType:()=>LH,isAssignment:()=>JH,isBooleanLiteral:()=>NH,isCharacterRange:()=>tV,isCondition:()=>kH,isConjunction:()=>IH,isCrossReference:()=>eV,isDisjunction:()=>MH,isEndOfFile:()=>rV,isFeatureName:()=>TH,isGrammar:()=>RH,isGrammarImport:()=>DH,isGroup:()=>nV,isInferredType:()=>OH,isInterface:()=>PH,isKeyword:()=>iV,isNamedArgument:()=>BH,isNegatedToken:()=>aV,isNegation:()=>FH,isNumberLiteral:()=>$H,isParameter:()=>zH,isParameterReference:()=>qH,isParserRule:()=>UH,isPrimitiveType:()=>_H,isReferenceType:()=>jH,isRegexToken:()=>sV,isReturnType:()=>GH,isRuleCall:()=>oV,isSimpleType:()=>WH,isStringLiteral:()=>YH,isTerminalAlternatives:()=>lV,isTerminalGroup:()=>cV,isTerminalRule:()=>HH,isTerminalRuleCall:()=>hV,isType:()=>VH,isTypeAttribute:()=>XH,isTypeDefinition:()=>EH,isUnionType:()=>KH,isUnorderedGroup:()=>uV,isUntilToken:()=>dV,isValueLiteral:()=>SH,isWildcard:()=>pV,reflection:()=>lX});var gV,fV,mV,yV,vV,xV,bV,wV,kV,TV,_V,EV,SV,CV,AV,LV,NV,IV,MV,RV,DV,OV,PV,BV,FV,$V,zV,qV,UV,jV,GV,WV,YV,HV,VV,XV,KV,ZV,QV,JV,tX,eX,rX,nX,iX,aX,sX,oX,lX,cX=i(()=>{BY(),gV={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},fV="AbstractRule",Ae(bH,"isAbstractRule"),mV="AbstractType",Ae(wH,"isAbstractType"),yV="Condition",Ae(kH,"isCondition"),Ae(TH,"isFeatureName"),Ae(_H,"isPrimitiveType"),vV="TypeDefinition",Ae(EH,"isTypeDefinition"),xV="ValueLiteral",Ae(SH,"isValueLiteral"),bV="AbstractElement",Ae(CH,"isAbstractElement"),wV="ArrayLiteral",Ae(AH,"isArrayLiteral"),kV="ArrayType",Ae(LH,"isArrayType"),TV="BooleanLiteral",Ae(NH,"isBooleanLiteral"),_V="Conjunction",Ae(IH,"isConjunction"),EV="Disjunction",Ae(MH,"isDisjunction"),SV="Grammar",Ae(RH,"isGrammar"),CV="GrammarImport",Ae(DH,"isGrammarImport"),AV="InferredType",Ae(OH,"isInferredType"),LV="Interface",Ae(PH,"isInterface"),NV="NamedArgument",Ae(BH,"isNamedArgument"),IV="Negation",Ae(FH,"isNegation"),MV="NumberLiteral",Ae($H,"isNumberLiteral"),RV="Parameter",Ae(zH,"isParameter"),DV="ParameterReference",Ae(qH,"isParameterReference"),OV="ParserRule",Ae(UH,"isParserRule"),PV="ReferenceType",Ae(jH,"isReferenceType"),BV="ReturnType",Ae(GH,"isReturnType"),FV="SimpleType",Ae(WH,"isSimpleType"),$V="StringLiteral",Ae(YH,"isStringLiteral"),zV="TerminalRule",Ae(HH,"isTerminalRule"),qV="Type",Ae(VH,"isType"),UV="TypeAttribute",Ae(XH,"isTypeAttribute"),jV="UnionType",Ae(KH,"isUnionType"),GV="Action",Ae(ZH,"isAction"),WV="Alternatives",Ae(QH,"isAlternatives"),YV="Assignment",Ae(JH,"isAssignment"),HV="CharacterRange",Ae(tV,"isCharacterRange"),VV="CrossReference",Ae(eV,"isCrossReference"),XV="EndOfFile",Ae(rV,"isEndOfFile"),KV="Group",Ae(nV,"isGroup"),ZV="Keyword",Ae(iV,"isKeyword"),QV="NegatedToken",Ae(aV,"isNegatedToken"),JV="RegexToken",Ae(sV,"isRegexToken"),tX="RuleCall",Ae(oV,"isRuleCall"),eX="TerminalAlternatives",Ae(lV,"isTerminalAlternatives"),rX="TerminalGroup",Ae(cV,"isTerminalGroup"),nX="TerminalRuleCall",Ae(hV,"isTerminalRuleCall"),iX="UnorderedGroup",Ae(uV,"isUnorderedGroup"),aX="UntilToken",Ae(dV,"isUntilToken"),sX="Wildcard",Ae(pV,"isWildcard"),oX=class extends PY{static{Ae(this,"LangiumGrammarAstReflection")}getAllTypes(){return["AbstractElement","AbstractRule","AbstractType","Action","Alternatives","ArrayLiteral","ArrayType","Assignment","BooleanLiteral","CharacterRange","Condition","Conjunction","CrossReference","Disjunction","EndOfFile","Grammar","GrammarImport","Group","InferredType","Interface","Keyword","NamedArgument","NegatedToken","Negation","NumberLiteral","Parameter","ParameterReference","ParserRule","ReferenceType","RegexToken","ReturnType","RuleCall","SimpleType","StringLiteral","TerminalAlternatives","TerminalGroup","TerminalRule","TerminalRuleCall","Type","TypeAttribute","TypeDefinition","UnionType","UnorderedGroup","UntilToken","ValueLiteral","Wildcard"]}computeIsSubtype(t,e){switch(t){case GV:case WV:case YV:case HV:case VV:case XV:case KV:case ZV:case QV:case JV:case tX:case eX:case rX:case nX:case iX:case aX:case sX:return this.isSubtype(bV,e);case wV:case MV:case $V:return this.isSubtype(xV,e);case kV:case PV:case FV:case jV:return this.isSubtype(vV,e);case TV:return this.isSubtype(yV,e)||this.isSubtype(xV,e);case _V:case EV:case IV:case DV:return this.isSubtype(yV,e);case AV:case LV:case qV:return this.isSubtype(mV,e);case OV:return this.isSubtype(fV,e)||this.isSubtype(mV,e);case zV:return this.isSubtype(fV,e);default:return!1}}getReferenceType(t){var e=t.container.$type+":"+t.property;switch(e){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return mV;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return fV;case"Grammar:usedGrammars":return SV;case"NamedArgument:parameter":case"ParameterReference:parameter":return RV;case"TerminalRuleCall:rule":return zV;default:throw new Error(e+" is not a valid reference id.")}}getTypeMetaData(t){switch(t){case"AbstractElement":return{name:"AbstractElement",properties:[{name:"cardinality"},{name:"lookahead"}]};case"ArrayLiteral":return{name:"ArrayLiteral",properties:[{name:"elements",defaultValue:[]}]};case"ArrayType":return{name:"ArrayType",properties:[{name:"elementType"}]};case"BooleanLiteral":return{name:"BooleanLiteral",properties:[{name:"true",defaultValue:!1}]};case"Conjunction":return{name:"Conjunction",properties:[{name:"left"},{name:"right"}]};case"Disjunction":return{name:"Disjunction",properties:[{name:"left"},{name:"right"}]};case"Grammar":return{name:"Grammar",properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case"GrammarImport":return{name:"GrammarImport",properties:[{name:"path"}]};case"InferredType":return{name:"InferredType",properties:[{name:"name"}]};case"Interface":return{name:"Interface",properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case"NamedArgument":return{name:"NamedArgument",properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case"Negation":return{name:"Negation",properties:[{name:"value"}]};case"NumberLiteral":return{name:"NumberLiteral",properties:[{name:"value"}]};case"Parameter":return{name:"Parameter",properties:[{name:"name"}]};case"ParameterReference":return{name:"ParameterReference",properties:[{name:"parameter"}]};case"ParserRule":return{name:"ParserRule",properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case"ReferenceType":return{name:"ReferenceType",properties:[{name:"referenceType"}]};case"ReturnType":return{name:"ReturnType",properties:[{name:"name"}]};case"SimpleType":return{name:"SimpleType",properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case"StringLiteral":return{name:"StringLiteral",properties:[{name:"value"}]};case"TerminalRule":return{name:"TerminalRule",properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case"Type":return{name:"Type",properties:[{name:"name"},{name:"type"}]};case"TypeAttribute":return{name:"TypeAttribute",properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case"UnionType":return{name:"UnionType",properties:[{name:"types",defaultValue:[]}]};case"Action":return{name:"Action",properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case"Alternatives":return{name:"Alternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"Assignment":return{name:"Assignment",properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case"CharacterRange":return{name:"CharacterRange",properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case"CrossReference":return{name:"CrossReference",properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case"EndOfFile":return{name:"EndOfFile",properties:[{name:"cardinality"},{name:"lookahead"}]};case"Group":return{name:"Group",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case"Keyword":return{name:"Keyword",properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case"NegatedToken":return{name:"NegatedToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"RegexToken":return{name:"RegexToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case"RuleCall":return{name:"RuleCall",properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"TerminalAlternatives":return{name:"TerminalAlternatives",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalGroup":return{name:"TerminalGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"TerminalRuleCall":return{name:"TerminalRuleCall",properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case"UnorderedGroup":return{name:"UnorderedGroup",properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case"UntilToken":return{name:"UntilToken",properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case"Wildcard":return{name:"Wildcard",properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:t,properties:[]}}}},lX=new oX}),hX={};function uX(n){for(let[r,t]of Object.entries(n))r.startsWith("$")||(Array.isArray(t)?t.forEach((t,e)=>{LY(t)&&(t.$container=n,t.$containerProperty=r,t.$containerIndex=e)}):LY(t)&&(t.$container=n,t.$containerProperty=r))}function dX(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function pX(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function gX(t){if(t=fX(t).$document)return t;throw new Error("AST node has no document.")}function fX(t){for(;t.$container;)t=t.$container;return t}function mX(i,t){if(!i)throw new Error("Node must be an AstNode.");let a=t?.range;return new qY(()=>({keys:Object.keys(i),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndexmX(t,e));throw new Error("Root node must be an AstNode.")}function vX(t,e){if(t)return e?.range&&!xX(t,e.range)?new GY(t,()=>[]):new GY(t,t=>mX(t,e),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function xX(t,e){return!e||!!(t=null==(t=t.$cstNode)?void 0:t.range)&&tH(t,e)}function bX(a){return new qY(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex{bX(t).forEach(t=>{t.reference.ref===e&&r.push(t.reference)})}),zY(r)}function kX(t,e){var r,n=e;for(r of t.getTypeMetaData(e.$type).properties)void 0!==r.defaultValue&&void 0===n[r.name]&&(n[r.name]=TX(r.defaultValue))}function TX(t){return Array.isArray(t)?[...t.map(TX)]:t}function _X(t,e){var r,n,i={$type:t.$type};for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(LY(n))i[r]=_X(n,e);else if(NY(n))i[r]=e(i,r,n.$refNode,n.$refText);else if(Array.isArray(n)){var a,s=[];for(a of n)LY(a)?s.push(_X(a,e)):NY(a)?s.push(e(i,r,a.$refNode,a.$refText)):s.push(a);i[r]=s}else i[r]=n;return uX(i),i}A(hX,{assignMandatoryProperties:()=>kX,copyAstNode:()=>_X,findLocalReferences:()=>wX,findRootNode:()=>fX,getContainerOfType:()=>dX,getDocument:()=>gX,hasContainerOfType:()=>pX,linkContentToContainer:()=>uX,streamAllContents:()=>yX,streamAst:()=>vX,streamContents:()=>mX,streamReferences:()=>bX});var EX=i(()=>{BY(),YY(),fH(),Ae(uX,"linkContentToContainer"),Ae(dX,"getContainerOfType"),Ae(pX,"hasContainerOfType"),Ae(gX,"getDocument"),Ae(fX,"findRootNode"),Ae(mX,"streamContents"),Ae(yX,"streamAllContents"),Ae(vX,"streamAst"),Ae(xX,"isAstNodeInRange"),Ae(bX,"streamReferences"),Ae(wX,"findLocalReferences"),Ae(kX,"assignMandatoryProperties"),Ae(TX,"copyDefaultValue"),Ae(_X,"copyAstNode")});function SX(t){return t.charCodeAt(0)}function CX(t,e){Array.isArray(t)?t.forEach(function(t){e.push(t)}):e.push(t)}function AX(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e],t[e]=!0}function LX(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function NX(){throw Error("Internal Error - Should never get here!")}function IX(t){return"Character"===t.type}var MX,RX,DX,OX,PX,BX,FX,$X,zX=i(()=>{Ae(SX,"cc"),Ae(CX,"insertToSet"),Ae(AX,"addFlag"),Ae(LX,"ASSERT_EXISTS"),Ae(NX,"ASSERT_NEVER_REACH_HERE"),Ae(IX,"isCharacter")}),qX=i(()=>{zX(),MX=[];for(let t=SX("0");t<=SX("9");t++)MX.push(t);RX=[SX("_")].concat(MX);for(let t=SX("a");t<=SX("z");t++)RX.push(t);for(let t=SX("A");t<=SX("Z");t++)RX.push(t);DX=[SX(" "),SX("\f"),SX(` +`),SX("\r"),SX("\t"),SX("\v"),SX("\t"),SX(" "),SX(" "),SX(" "),SX(" "),SX(" "),SX(" "),SX(" "),SX(" "),SX(" "),SX(" "),SX(" "),SX(" "),SX(" "),SX("\u2028"),SX("\u2029"),SX(" "),SX(" "),SX(" "),SX("\ufeff")]}),UX=i(()=>{zX(),qX(),OX=/[0-9a-fA-F]/,PX=/[0-9]/,BX=/[1-9]/,FX=class{static{Ae(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");for(var e=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":AX(r,"global");break;case"i":AX(r,"ignoreCase");break;case"m":AX(r,"multiLine");break;case"u":AX(r,"unicode");break;case"y":AX(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:e,loc:this.loc(0)}}disjunction(){var t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){for(var t=[],e=this.idx;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){var e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead"}LX(t);var r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return NX()}quantifier(t=!1){let e,r=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:n,atMost:n};break;case",":e=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;LX(e)}if((!0!==t||void 0!==e)&&LX(e))return"?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(r),e}atom(){let t,e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return LX(t=void 0===t&&this.isPatternCharacter()?this.patternCharacter():t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):NX()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[SX(` +`),SX("\r"),SX("\u2028"),SX("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,e=!1;switch(this.popChar()){case"d":t=MX;break;case"D":t=MX,e=!0;break;case"s":t=DX;break;case"S":t=DX,e=!0;break;case"w":t=RX;break;case"W":t=RX,e=!0}return LX(t)?{type:"Set",value:t,complement:e}:NX()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=SX("\f");break;case"n":t=SX(` +`);break;case"r":t=SX("\r");break;case"t":t=SX("\t");break;case"v":t=SX("\v")}return LX(t)?{type:"Character",value:t}:NX()}controlLetterEscapeAtom(){this.consumeChar("c");var t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:SX("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:SX(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:SX(this.popChar())}}}characterClass(){let t=[],e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){var r=this.classAtom();if(r.type,IX(r)&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if(n.type,IX(n)){if(n.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}}),jX=i(()=>{$X=class{static{Ae(this,"BaseRegExpVisitor")}visitChildren(t){for(var e in t){var r=t[e];t.hasOwnProperty(e)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(t=>{this.visit(t)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}}),GX=i(()=>{UX(),jX()}),WX={};function YX(t){try{t=`/${t="string"!=typeof t?t.source:t}/`;var e,r=tK.pattern(t),n=[];for(e of r.value.value)rK.reset(t),rK.visit(e),n.push({start:rK.startRegexp,end:rK.endRegex});return n}catch{return[]}}function HX(t){try{return t=(t="string"==typeof t?new RegExp(t):t).toString(),rK.reset(t),rK.visit(tK.pattern(t)),rK.multiline}catch{return!1}}function VX(t){return("string"==typeof t?new RegExp(t):t).test(" ")}function XX(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function KX(t){return Array.prototype.map.call(t,t=>/\w/.test(t)?`[${t.toLowerCase()}${t.toUpperCase()}]`:XX(t)).join("")}function ZX(t,e){return t=QX(t),!!(e=e.match(t))&&0",s)-s+1);break;default:n(2)}break;case"[":(t=/\[(?:\\.|.)*?\]/g).lastIndex=s,n((t=t.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(t=/\{\d+,?\d*\}/g).lastIndex=s,(t=t.exec(a))?r(t[0].length):n(1);break;case"(":if("?"===a[s+1])switch(a[s+2]){case":":e+="(?:",s+=3,e+=o()+"|$)";break;case"=":e+="(?=",s+=3,e+=o()+")";break;case"!":t=s,s+=3,o(),e+=a.substr(t,s-t);break;case"<":switch(a[s+3]){case"=":case"!":t=s,s+=4,o(),e+=a.substr(t,s-t);break;default:r(a.indexOf(">",s)-s+1),e+=o()+"|$)"}}else r(1),e+=o()+"|$)";break;case")":return++s,e;default:n(1)}return e}return Ae(o,"process"),new RegExp(o(),t.flags)}A(WX,{NEWLINE_REGEXP:()=>JX,escapeRegExp:()=>XX,getCaseInsensitivePattern:()=>KX,getTerminalParts:()=>YX,isMultilineComment:()=>HX,isWhitespace:()=>VX,partialMatches:()=>ZX,partialRegExp:()=>QX});var JX,tK,eK,rK,nK=i(()=>{GX(),JX=/\r?\n/gm,tK=new FX,eK=class extends $X{static{Ae(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(t){this.multiline=!1,this.regex=t,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(t){t.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(t){var e=String.fromCharCode(t.value);this.multiline||e!==` +`||(this.multiline=!0),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(t=XX(e),this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t))}visitSet(t){var e;this.multiline||(e=this.regex.substring(t.loc.begin,t.loc.end),e=new RegExp(e),this.multiline=!!` +`.match(e)),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=this.regex.substring(t.loc.begin,t.loc.end),this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e))}visitChildren(t){"Group"===t.type&&t.quantifier||super.visitChildren(t)}},rK=new eK,Ae(YX,"getTerminalParts"),Ae(HX,"isMultilineComment"),Ae(VX,"isWhitespace"),Ae(XX,"escapeRegExp"),Ae(KX,"getCaseInsensitivePattern"),Ae(ZX,"partialMatches"),Ae(QX,"partialRegExp")}),iK={};function aK(t){return t.rules.find(t=>UH(t)&&t.entry)}function sK(t){return t.rules.filter(t=>HH(t)&&t.hidden)}function oK(t,e){var r,n=new Set,i=aK(t);if(!i)return new Set(t.rules);for(r of[i].concat(sK(t)))lK(r,n,e);var a,s=new Set;for(a of t.rules)(n.has(a.name)||HH(a)&&a.hidden)&&s.add(a);return s}function lK(t,e,r){e.add(t.name),yX(t).forEach(t=>{(oV(t)||r&&hV(t))&&(t=t.rule.ref)&&!e.has(t.name)&&lK(t,e,r)})}function cK(t){return t.terminal||(t.type.ref?vK(t.type.ref)?.terminal:void 0)}function hK(t){return t.hidden&&!MK(t).test(" ")}function uK(t,e){return t&&e?pK(t,e,t.astNode,!0):[]}function dK(t,e,r){return t&&e&&0!==(e=pK(t,e,t.astNode,!0)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function pK(t,e,r,n){return!n&&(n=dX(t.grammarSource,JH))&&n.feature===e?[t]:RY(t)&&t.astNode===r?t.content.flatMap(t=>pK(t,e,r,!1)):[]}function gK(t,e){return t?mK(t,e,t?.astNode):[]}function fK(t,e,r){return t&&0!==(e=mK(t,e,t?.astNode)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function mK(t,e,r){if(t.astNode!==r)return[];if(iV(t.grammarSource)&&t.grammarSource.value===e)return[t];for(var n,i,a=VY(t).iterator(),s=[];(i=a.next()).done||((n=i.value).astNode===r?iV(n.grammarSource)&&n.grammarSource.value===e&&s.push(n):a.prune()),!i.done;);return s}function yK(t){for(var e=t.astNode;e===(null==(r=t.container)?void 0:r.astNode);){var r=dX(t.grammarSource,JH);if(r)return r;t=t.container}}function vK(t){let e=t;return OH(e)&&(ZH(e.$container)?e=e.$container.$container:UH(e.$container)?e=e.$container:mH(e.$container)),xK(t,e,new Map)}function xK(n,t,i){var e,r;function a(t,e){let r;return dX(t,JH)||(r=xK(e,e,i)),i.set(n,r),r}if(Ae(a,"go"),i.has(n))return i.get(n);i.set(n,void 0);for(r of yX(t)){if(JH(r)&&"name"===r.feature.toLowerCase())return i.set(n,r),r;if(oV(r)&&UH(r.rule.ref))return a(r,r.rule.ref);if(WH(r)&&null!=(e=r.typeRef)&&e.ref)return a(r,r.typeRef.ref)}}function bK(e){var t=e.$container;if(nV(t)){var r=t.elements;for(let t=r.indexOf(e)-1;0<=t;t--){var n=r[t];if(ZH(n))return n;if(n=yX(r[t]).find(ZH))return n}}if(CH(t))return bK(t)}function wK(t,e){return"?"===t||"*"===t||nV(e)&&!!e.guardCondition}function kK(t){return"*"===t||"+"===t}function TK(t){return"+="===t}function _K(t){return EK(t,new Set)}function EK(t,e){if(e.has(t))return!0;e.add(t);for(var r of yX(t))if(oV(r)){if(!r.rule.ref||UH(r.rule.ref)&&!EK(r.rule.ref,e))return!1}else{if(JH(r))return!1;if(ZH(r))return!1}return!!t.definition}function SK(t){return CK(t.type,new Set)}function CK(t,e){return!!e.has(t)||(e.add(t),!LH(t)&&!jH(t)&&(KH(t)?t.types.every(t=>CK(t,e)):!!WH(t)&&(void 0!==t.primitiveType||void 0!==t.stringType||void 0!==t.typeRef&&!!VH(t=t.typeRef.ref)&&CK(t.type,e))))}function AK(t){return t.inferredType?t.inferredType.name:t.dataType||(t.returnType&&(t=t.returnType.ref)&&(UH(t)||PH(t)||VH(t))?t.name:void 0)}function LK(t){if(UH(t))return _K(t)||null==(e=AK(t))?t.name:e;if(PH(t)||VH(t)||GH(t))return t.name;if(ZH(t)){var e=NK(t);if(e)return e}else if(OH(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function NK(t){var e;return t.inferredType?t.inferredType.name:null!=(e=t.type)&&e.ref?LK(t.type.ref):void 0}function IK(t){var e;return HH(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":_K(t)||null==(e=AK(t))?t.name:e}function MK(t){var t=RK(t.definition,e={s:!1,i:!1,u:!1}),e=Object.entries(e).filter(([,t])=>t).map(([t])=>t).join("");return new RegExp(t,e)}function RK(t,e){if(lV(t))return DK(t);if(cV(t))return OK(t);if(tV(t))return FK(t);if(hV(t)){var r=t.rule.ref;if(r)return zK(RK(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Missing rule reference.")}if(aV(t))return BK(t);if(dV(t))return PK(t);var n;if(sV(t))return r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),r=t.regex.substring(r+1),e&&(e.i=r.includes("i"),e.s=r.includes("s"),e.u=r.includes("u")),zK(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1});if(pV(t))return zK(qK,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Invalid terminal element: "+t?.$type)}function DK(t){return zK(t.elements.map(t=>RK(t)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function OK(t){return zK(t.elements.map(t=>RK(t)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function PK(t){return zK(qK+"*?"+RK(t.terminal),{cardinality:t.cardinality,lookahead:t.lookahead})}function BK(t){return zK(`(?!${RK(t.terminal)})${qK}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function FK(t){return t.right?zK(`[${$K(t.left)}-${$K(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):zK($K(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function $K(t){return XX(t.value)}function zK(t,e){var r;return!1===e.wrap&&!e.lookahead||(t=`(${null!=(r=e.lookahead)?r:""}${t})`),e.cardinality?""+t+e.cardinality:t}A(iK,{findAssignment:()=>yK,findNameAssignment:()=>vK,findNodeForKeyword:()=>fK,findNodeForProperty:()=>dK,findNodesForKeyword:()=>gK,findNodesForKeywordInternal:()=>mK,findNodesForProperty:()=>uK,getActionAtElement:()=>bK,getActionType:()=>NK,getAllReachableRules:()=>oK,getCrossReferenceTerminal:()=>cK,getEntryRule:()=>aK,getExplicitRuleType:()=>AK,getHiddenRules:()=>sK,getRuleType:()=>IK,getTypeName:()=>LK,isArrayCardinality:()=>kK,isArrayOperator:()=>TK,isCommentTerminal:()=>hK,isDataType:()=>SK,isDataTypeRule:()=>_K,isOptionalCardinality:()=>wK,terminalRegex:()=>MK});var qK,UK=i(()=>{vH(),cX(),BY(),EX(),fH(),nK(),Ae(aK,"getEntryRule"),Ae(sK,"getHiddenRules"),Ae(oK,"getAllReachableRules"),Ae(lK,"ruleDfs"),Ae(cK,"getCrossReferenceTerminal"),Ae(hK,"isCommentTerminal"),Ae(uK,"findNodesForProperty"),Ae(dK,"findNodeForProperty"),Ae(pK,"findNodesForPropertyInternal"),Ae(gK,"findNodesForKeyword"),Ae(fK,"findNodeForKeyword"),Ae(mK,"findNodesForKeywordInternal"),Ae(yK,"findAssignment"),Ae(vK,"findNameAssignment"),Ae(xK,"findNameAssignmentInternal"),Ae(bK,"getActionAtElement"),Ae(wK,"isOptionalCardinality"),Ae(kK,"isArrayCardinality"),Ae(TK,"isArrayOperator"),Ae(_K,"isDataTypeRule"),Ae(EK,"isDataTypeRuleInternal"),Ae(SK,"isDataType"),Ae(CK,"isDataTypeInternal"),Ae(AK,"getExplicitRuleType"),Ae(LK,"getTypeName"),Ae(NK,"getActionType"),Ae(IK,"getRuleType"),Ae(MK,"terminalRegex"),qK=/[\s\S]/.source,Ae(RK,"abstractElementToRegex"),Ae(DK,"terminalAlternativesToRegex"),Ae(OK,"terminalGroupToRegex"),Ae(PK,"untilTokenToRegex"),Ae(BK,"negateTokenToRegex"),Ae(FK,"characterRangeToRegex"),Ae($K,"keywordToRegex"),Ae(zK,"withCardinality")});function jK(t){var e,r=[];for(e of t.Grammar.rules)HH(e)&&hK(e)&&HX(MK(e))&&r.push(e.name);return{multilineCommentRules:r,nameRegexp:gH}}var GK=i(()=>{fH(),UK(),nK(),cX(),Ae(jK,"createGrammarConfig")}),WK=i(()=>{});function YK(t){console&&console.error&&console.error("Error: "+t)}function HK(t){console&&console.warn&&console.warn("Warning: "+t)}var VK=i(()=>{Ae(YK,"PRINT_ERROR"),Ae(HK,"PRINT_WARNING")});function XK(t){var e=(new Date).getTime(),t=t();return{time:(new Date).getTime()-e,value:t}}var KK=i(()=>{Ae(XK,"timer")});function ZK(t){function e(){}Ae(e,"FakeConstructor"),e.prototype=t;let r=new e;function n(){return typeof r.bar}return Ae(n,"fakeAccess"),n(),n(),t}var QK=i(()=>{Ae(ZK,"toFastProperties")}),JK=i(()=>{VK(),KK(),QK()});function tZ(t){return eZ(t)?t.LABEL:t.name}function eZ(t){return hF(t.LABEL)&&""!==t.LABEL}function rZ(t){return x(t,nZ)}function nZ(t){function e(t){return x(t,nZ)}var r,n;if(Ae(e,"convertDefinition"),t instanceof aZ)return r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx},hF(t.label)&&(r.label=t.label),r;if(t instanceof oZ)return{type:"Alternative",definition:e(t.definition)};if(t instanceof lZ)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof cZ)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof hZ)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:nZ(new gZ({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof dZ)return{type:"RepetitionWithSeparator",idx:t.idx,separator:nZ(new gZ({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof uZ)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof pZ)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof gZ)return r={type:"Terminal",name:t.terminalType.name,label:tZ(t.terminalType),idx:t.idx},hF(t.label)&&(r.terminalLabel=t.label),n=t.terminalType.PATTERN,t.terminalType.PATTERN&&(r.pattern=DF(n)?n.source:n),r;if(t instanceof sZ)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var iZ,aZ,sZ,oZ,lZ,cZ,hZ,uZ,dZ,pZ,gZ,fZ,mZ=i(()=>{tq(),Ae(tZ,"tokenLabel"),Ae(eZ,"hasTokenLabel"),iZ=class{static{Ae(this,"AbstractProduction")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(e){e.visit(this),v(this.definition,t=>{t.accept(e)})}},aZ=class extends iZ{static{Ae(this,"NonTerminal")}constructor(t){super([]),this.idx=1,NI(this,g$(t,t=>void 0!==t))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}},sZ=class extends iZ{static{Ae(this,"Rule")}constructor(t){super(t.definition),this.orgText="",NI(this,g$(t,t=>void 0!==t))}},oZ=class extends iZ{static{Ae(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,NI(this,g$(t,t=>void 0!==t))}},lZ=class extends iZ{static{Ae(this,"Option")}constructor(t){super(t.definition),this.idx=1,NI(this,g$(t,t=>void 0!==t))}},cZ=class extends iZ{static{Ae(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,NI(this,g$(t,t=>void 0!==t))}},hZ=class extends iZ{static{Ae(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,NI(this,g$(t,t=>void 0!==t))}},uZ=class extends iZ{static{Ae(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,NI(this,g$(t,t=>void 0!==t))}},dZ=class extends iZ{static{Ae(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,NI(this,g$(t,t=>void 0!==t))}},pZ=class extends iZ{static{Ae(this,"Alternation")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,NI(this,g$(t,t=>void 0!==t))}},gZ=class{static{Ae(this,"Terminal")}constructor(t){this.idx=1,NI(this,g$(t,t=>void 0!==t))}accept(t){t.visit(this)}},Ae(rZ,"serializeGrammar"),Ae(nZ,"serializeProduction")}),yZ=i(()=>{mZ(),fZ=class{static{Ae(this,"GAstVisitor")}visit(t){var e=t;switch(e.constructor){case aZ:return this.visitNonTerminal(e);case oZ:return this.visitAlternative(e);case lZ:return this.visitOption(e);case cZ:return this.visitRepetitionMandatory(e);case hZ:return this.visitRepetitionMandatoryWithSeparator(e);case dZ:return this.visitRepetitionWithSeparator(e);case uZ:return this.visitRepetition(e);case pZ:return this.visitAlternation(e);case gZ:return this.visitTerminal(e);case sZ:return this.visitRule(e);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}});function vZ(t){return t instanceof oZ||t instanceof lZ||t instanceof uZ||t instanceof cZ||t instanceof hZ||t instanceof dZ||t instanceof gZ||t instanceof sZ}function xZ(t,e=[]){return t instanceof lZ||t instanceof uZ||t instanceof dZ||(t instanceof pZ?_z(t.definition,t=>xZ(t,e)):!(t instanceof aZ&&bF(e,t))&&t instanceof iZ&&(t instanceof aZ&&e.push(t),pB(t.definition,t=>xZ(t,e))))}function bZ(t){return t instanceof pZ}function wZ(t){if(t instanceof aZ)return"SUBRULE";if(t instanceof lZ)return"OPTION";if(t instanceof pZ)return"OR";if(t instanceof cZ)return"AT_LEAST_ONE";if(t instanceof hZ)return"AT_LEAST_ONE_SEP";if(t instanceof dZ)return"MANY_SEP";if(t instanceof uZ)return"MANY";if(t instanceof gZ)return"CONSUME";throw Error("non exhaustive match")}var kZ=i(()=>{tq(),mZ(),Ae(vZ,"isSequenceProd"),Ae(xZ,"isOptionalProd"),Ae(bZ,"isBranchingProd"),Ae(wZ,"getProductionDslName")}),TZ=i(()=>{mZ(),yZ(),kZ()});function _Z(t,e,r){return[new lZ({definition:[new gZ({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var EZ,SZ=i(()=>{tq(),TZ(),EZ=class{static{Ae(this,"RestWalker")}walk(r,n=[]){v(r.definition,(t,e)=>{if(e=XP(r.definition,e+1),t instanceof aZ)this.walkProdRef(t,e,n);else if(t instanceof gZ)this.walkTerminal(t,e,n);else if(t instanceof oZ)this.walkFlat(t,e,n);else if(t instanceof lZ)this.walkOption(t,e,n);else if(t instanceof cZ)this.walkAtLeastOne(t,e,n);else if(t instanceof hZ)this.walkAtLeastOneSep(t,e,n);else if(t instanceof dZ)this.walkManySep(t,e,n);else if(t instanceof uZ)this.walkMany(t,e,n);else{if(!(t instanceof pZ))throw Error("non exhaustive match");this.walkOr(t,e,n)}})}walkTerminal(t,e,r){}walkProdRef(t,e,r){}walkFlat(t,e,r){e=e.concat(r),this.walk(t,e)}walkOption(t,e,r){e=e.concat(r),this.walk(t,e)}walkAtLeastOne(t,e,r){e=[new lZ({definition:t.definition})].concat(e,r),this.walk(t,e)}walkAtLeastOneSep(t,e,r){e=_Z(t,e,r),this.walk(t,e)}walkMany(t,e,r){e=[new lZ({definition:t.definition})].concat(e,r),this.walk(t,e)}walkManySep(t,e,r){e=_Z(t,e,r),this.walk(t,e)}walkOr(t,e,r){let n=e.concat(r);v(t.definition,t=>{t=new oZ({definition:[t]}),this.walk(t,n)})}},Ae(_Z,"restForRepetitionWithSeparator")});function CZ(t){if(t instanceof aZ)return CZ(t.referencedRule);if(t instanceof gZ)return NZ(t);if(vZ(t))return AZ(t);if(bZ(t))return LZ(t);throw Error("non exhaustive match")}function AZ(t){let e=[],r=t.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=xZ(a),e=e.concat(CZ(a)),n+=1,i=r.length>n;return $z(e)}function LZ(t){return t=x(t.definition,t=>CZ(t)),$z(vM(t))}function NZ(t){return[t.terminalType]}var IZ,MZ=i(()=>{tq(),TZ(),Ae(CZ,"first"),Ae(AZ,"firstForSequence"),Ae(LZ,"firstForBranching"),Ae(NZ,"firstForTerminal")}),RZ=i(()=>{IZ="_~IN~_"});function DZ(t){let e={};return v(t,t=>{t=new PZ(t).startWalking(),NI(e,t)}),e}function OZ(t,e){return t.name+e+IZ}var PZ,BZ=i(()=>{SZ(),MZ(),tq(),RZ(),TZ(),PZ=class extends EZ{static{Ae(this,"ResyncFollowsWalker")}constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,e,r){}walkProdRef(t,e,r){t=OZ(t.referencedRule,t.idx)+this.topProd.name,e=e.concat(r),r=CZ(new oZ({definition:e})),this.follows[t]=r}},Ae(DZ,"computeAllProdsFollows"),Ae(OZ,"buildBetweenProdsFollowPrefix")});function FZ(t){var e,t=t.toString();return zZ.hasOwnProperty(t)?zZ[t]:(e=qZ.pattern(t),zZ[t]=e)}function $Z(){zZ={}}var zZ,qZ,UZ=i(()=>{GX(),zZ={},qZ=new FX,Ae(FZ,"getRegExpAst"),Ae($Z,"clearRegExpParserCache")});function jZ(t,e=!1){try{var r=FZ(t);return GZ(r.value,{},r.flags.ignoreCase)}catch(r){r.message===KZ?e&&HK(`${ZZ} Unable to optimize: < ${t.toString()} > + Complement Sets cannot be automatically optimized. + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`):(e=e?` + This will disable the lexer's first char optimizations. + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`:"",YK(`${ZZ} + Failed parsing: < ${t.toString()} > + Using the @chevrotain/regexp-to-ast library + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+e))}return[]}function GZ(e,i,a){switch(e.type){case"Disjunction":for(let t=0;t{if("number"==typeof e)WZ(e,i,a);else{var r=e;if(!0===a)for(let t=r.from;t<=r.to;t++)WZ(t,i,a);else{for(let t=r.from;t<=r.to&&t=OQ){var e=r.from>=OQ?r.from:OQ,t=r.to,e=SQ(e),n=SQ(t);for(let t=e;t<=n;t++)i[t]=t}}}});break;case"Group":GZ(s.value,i,a);break;default:throw Error("Non Exhaustive Match")}if(n=void 0!==s.quantifier&&0===s.quantifier.atLeast,"Group"===s.type&&!1===VZ(s)||"Group"!==s.type&&0==n)break}break;default:throw Error("non exhaustive match!")}return mF(i)}function WZ(t,e,r){var n=SQ(t);e[n]=n,!0===r&&YZ(t,e)}function YZ(t,e){var r=(t=String.fromCharCode(t)).toUpperCase();r!==t?e[r=SQ(r.charCodeAt(0))]=r:(r=t.toLowerCase())!==t&&(e[t=SQ(r.charCodeAt(0))]=t)}function HZ(t,r){return AB(t.value,t=>{if("number"==typeof t)return bF(r,t);{let e=t;return void 0!==AB(r,t=>e.from<=t&&t<=e.to)}})}function VZ(t){var e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(nw(t.value)?pB(t.value,VZ):VZ(t.value))}function XZ(e,t){var r,n;return t instanceof RegExp?(r=FZ(t),(n=new QZ(e)).visit(r),n.found):void 0!==AB(t,t=>bF(e,t.charCodeAt(0)))}var KZ,ZZ,QZ,JZ=i(()=>{GX(),tq(),JK(),UZ(),BQ(),KZ="Complement Sets are not supported for first char optimization",ZZ=`Unable to use "first char" lexer optimizations: +`,Ae(jZ,"getOptimizedStartCodesIndices"),Ae(GZ,"firstCharOptimizedIndices"),Ae(WZ,"addOptimizedIdxToResult"),Ae(YZ,"handleIgnoreCase"),Ae(HZ,"findCode"),Ae(VZ,"isWholeOptional"),QZ=class extends $X{static{Ae(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}super.visitChildren(t)}}visitCharacter(t){bF(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===HZ(t,this.targetCharCodes)&&(this.found=!0):void 0!==HZ(t,this.targetCharCodes)&&(this.found=!0)}},Ae(XZ,"canMatchCharCode")});function tQ(t,i){var e=(i=MP(i,{useSticky:IQ,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:Ae((t,e)=>e(),"tracer")})).tracer;e("initCharCodeToOptimizedIndexMap",()=>{CQ()});let r,n=(e("Reject Lexer.NA",()=>{r=fz(t,t=>t[AQ]===rJ.NA)}),!1),a;e("Transform Patterns",()=>{n=!1,a=x(r,t=>{var e,t=t[AQ];if(DF(t))return 1!==(e=t.source).length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||bF(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?(i.useSticky?mQ:fQ)(t):e[1]:e;if(M3(t))return n=!0,{exec:t};if("object"==typeof t)return n=!0,t;if("string"==typeof t)return 1===t.length?t:(e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),t=new RegExp(e),(i.useSticky?mQ:fQ)(t));throw Error("non exhaustive match")})});let s,o,l,c,h;e("misc mapping",()=>{s=x(r,t=>t.tokenTypeIdx),o=x(r,t=>{if((t=t.GROUP)!==rJ.SKIPPED){if(hF(t))return t;if(FF(t))return!1;throw Error("non exhaustive match")}}),l=x(r,t=>{if(t=t.LONGER_ALT)return nw(t)?x(t,t=>_F(r,t)):[_F(r,t)]}),c=x(r,t=>t.PUSH_MODE),h=x(r,t=>b(t,"POP_MODE"))});let u;e("Line Terminator Handling",()=>{let e=_Q(i.lineTerminatorCharacters);u=x(r,t=>!1),"onlyOffset"!==i.positionTracking&&(u=x(r,t=>b(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===kQ(t,e)&&XZ(e,t.PATTERN)))});let d,p,g,f,m=(e("Misc Mapping #2",()=>{d=x(r,bQ),p=x(a,wQ),g=dz(r,(t,e)=>(e=e.GROUP,hF(e)&&e!==rJ.SKIPPED&&(t[e]=[]),t),{}),f=x(a,(t,e)=>({pattern:a[e],longerAlt:l[e],canLineTerminator:u[e],isCustom:d[e],short:p[e],group:o[e],push:c[e],pop:h[e],tokenTypeIdx:s[e],tokenType:r[e]}))}),!0),y=[];return i.safeMode||e("First Char Optimization",()=>{y=dz(r,(r,t,n)=>{if("string"==typeof t.PATTERN){var e=SQ(t.PATTERN.charCodeAt(0));EQ(r,e,f[n])}else if(nw(t.START_CHARS_HINT)){let e;v(t.START_CHARS_HINT,t=>{t=SQ("string"==typeof t?t.charCodeAt(0):t),e!==t&&(e=t,EQ(r,t,f[n]))})}else DF(t.PATTERN)?t.PATTERN.unicode?(m=!1,i.ensureOptimizations&&YK(`${ZZ} Unable to analyze < ${t.PATTERN.toString()} > pattern. + The regexp unicode flag is not currently supported by the regexp-to-ast library. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`)):(e=jZ(t.PATTERN,i.ensureOptimizations),LF(e)&&(m=!1),v(e,t=>{EQ(r,t,f[n])})):(i.ensureOptimizations&&YK(`${ZZ} TokenType: <${t.name}> is using a custom token pattern without providing parameter. + This will disable the lexer's first char optimizations. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),m=!1);return r},[])}),{emptyGroups:g,patternIdxToConfig:f,charCodeToPatternIdxToConfig:y,hasCustom:n,canBeOptimized:m}}function eQ(t,e){let r=[],n=nQ(t);r=r.concat(n.errors);var i=(t=iQ(n.valid)).valid;return r=(r=(r=(r=(r=r.concat(t.errors)).concat(rQ(i))).concat(hQ(i))).concat(uQ(i,e))).concat(dQ(i))}function rQ(t){let e=[],r=xB(t,t=>DF(t[AQ]));return e=(e=(e=(e=(e=e.concat(aQ(r))).concat(oQ(r))).concat(lQ(r))).concat(cQ(r))).concat(sQ(r))}function nQ(t){var e=xB(t,t=>!b(t,AQ));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:tJ.MISSING_PATTERN,tokenTypes:[t]})),valid:UP(t,e)}}function iQ(t){var e=xB(t,t=>(t=t[AQ],!(DF(t)||M3(t)||b(t,"exec")||hF(t))));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:tJ.INVALID_PATTERN,tokenTypes:[t]})),valid:UP(t,e)}}function aQ(t){class n extends $X{static{Ae(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}return t=xB(t,t=>{t=t.PATTERN;try{var e=FZ(t),r=new n;return r.visit(e),r.found}catch{return MQ.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain end of input anchor '$' + See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:tJ.EOI_ANCHOR_FOUND,tokenTypes:[t]}))}function sQ(t){return t=xB(t,t=>t.PATTERN.test("")),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:tJ.EMPTY_MATCH_PATTERN,tokenTypes:[t]}))}function oQ(t){class n extends $X{static{Ae(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}return t=xB(t,t=>{t=t.PATTERN;try{var e=FZ(t),r=new n;return r.visit(e),r.found}catch{return RQ.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error: + Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain start of input anchor '^' + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:tJ.SOI_ANCHOR_FOUND,tokenTypes:[t]}))}function lQ(t){return t=xB(t,t=>(t=t[AQ])instanceof RegExp&&(t.multiline||t.global)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:tJ.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}))}function cQ(t){let n=[],e=x(t,r=>dz(t,(t,e)=>(r.PATTERN.source!==e.PATTERN.source||bF(n,e)||e.PATTERN===rJ.NA||(n.push(e),t.push(e)),t),[]));e=MD(e);var r=xB(e,t=>1{var e=x(t,t=>t.name);return{message:`The same RegExp pattern ->${MB(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:tJ.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}})}function hQ(t){return t=xB(t,t=>!!b(t,"GROUP")&&(t=t.GROUP)!==rJ.SKIPPED&&t!==rJ.NA&&!hF(t)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:tJ.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}))}function uQ(t,e){return t=xB(t,t=>void 0!==t.PUSH_MODE&&!bF(e,t.PUSH_MODE)),x(t,t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:tJ.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}))}function dQ(t){let a=[],e=dz(t,(t,e,r)=>{var n=e.PATTERN;return n!==rJ.NA&&(hF(n)?t.push({str:n,idx:r,tokenType:e}):DF(n)&&gQ(n)&&t.push({str:n.source,idx:r,tokenType:e})),t},[]);return v(t,(n,i)=>{v(e,({str:t,idx:e,tokenType:r})=>{i${r.name}<- can never be matched. +Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`,a.push({message:e,type:tJ.UNREACHABLE_PATTERN,tokenTypes:[n,r]}))})}),a}function pQ(t,e){var r;if(DF(e))return null!==(r=e.exec(t))&&0===r.index;if(M3(e))return e(t,0,[],{});if(b(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}function gQ(e){return void 0===AB([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function fQ(t){var e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function mQ(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function yQ(t,e,r){let i=[];return b(t,LQ)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+LQ+`> property in its definition +`,type:tJ.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),b(t,NQ)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+NQ+`> property in its definition +`,type:tJ.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),b(t,NQ)&&b(t,LQ)&&!b(t.modes,t.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${LQ}: <${t.defaultMode}>which does not exist +`,type:tJ.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),b(t,NQ)&&v(t.modes,(r,n)=>{v(r,(e,t)=>{FF(e)?i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${t}> +`,type:tJ.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):b(e,"LONGER_ALT")&&(t=nw(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT],v(t,t=>{FF(t)||bF(r,t)||i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${t.name}> on token <${e.name}> outside of mode <${n}> +`,type:tJ.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),i}function vQ(t,e,r){let n=[],i=!1,a=MD(vM(mF(t.modes))),s=fz(a,t=>t[AQ]===rJ.NA),o=_Q(r);return e&&v(s,t=>{var e=kQ(t,o);!1!==e?(e={message:TQ(t,e),type:e.issue,tokenType:t},n.push(e)):b(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(i=!0):XZ(o,t.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found. + This Lexer has been defined to track line and column information, + But none of the Token Types can be identified as matching a line terminator. + See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS + for details.`,type:tJ.NO_LINE_BREAKS_FLAGS}),n}function xQ(r){let n={},t=CI(r);return v(t,t=>{var e=r[t];if(!nw(e))throw Error("non exhaustive match");n[t]=[]}),n}function bQ(t){if(t=t.PATTERN,DF(t))return!1;if(M3(t))return!0;if(b(t,"exec"))return!0;if(hF(t))return!1;throw Error("non exhaustive match")}function wQ(t){return!(!hF(t)||1!==t.length)&&t.charCodeAt(0)}function kQ(t,e){if(b(t,"LINE_BREAKS"))return!1;if(DF(t.PATTERN)){try{XZ(e,t.PATTERN)}catch(t){return{issue:tJ.IDENTIFY_TERMINATOR,errMsg:t.message}}return!1}if(hF(t.PATTERN))return!1;if(bQ(t))return{issue:tJ.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function TQ(t,e){if(e.issue===tJ.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. + The problem is in the <${t.name}> Token Type + Root cause: ${e.errMsg}. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===tJ.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. + The problem is in the <${t.name}> Token Type + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function _Q(t){return x(t,t=>hF(t)?t.charCodeAt(0):t)}function EQ(t,e,r){void 0===t[e]?t[e]=[r]:t[e].push(r)}function SQ(t){return t{GX(),aJ(),tq(),JK(),JZ(),UZ(),AQ="PATTERN",LQ="defaultMode",NQ="modes",IQ="boolean"==typeof new RegExp("(?:)").sticky,Ae(tQ,"analyzeTokenTypes"),Ae(eQ,"validatePatterns"),Ae(rQ,"validateRegExpPattern"),Ae(nQ,"findMissingPatterns"),Ae(iQ,"findInvalidPatterns"),MQ=/[^\\][$]/,Ae(aQ,"findEndOfInputAnchor"),Ae(sQ,"findEmptyMatchRegExps"),RQ=/[^\\[][\^]|^\^/,Ae(oQ,"findStartOfInputAnchor"),Ae(lQ,"findUnsupportedFlags"),Ae(cQ,"findDuplicatePatterns"),Ae(hQ,"findInvalidGroupType"),Ae(uQ,"findModesThatDoNotExist"),Ae(dQ,"findUnreachablePatterns"),Ae(pQ,"testTokenType"),Ae(gQ,"noMetaChar"),Ae(fQ,"addStartOfInput"),Ae(mQ,"addStickyFlag"),Ae(yQ,"performRuntimeChecks"),Ae(vQ,"performWarningRuntimeChecks"),Ae(xQ,"cloneEmptyGroups"),Ae(bQ,"isCustomPattern"),Ae(wQ,"isShortPattern"),DQ={test:Ae(function(e){var r=e.length;for(let t=this.lastIndex;t{t.isParent=0t.CATEGORIES)));var i=UP(r,e);e=e.concat(i),LF(i)?n=!1:r=i}return e}function UQ(t){v(t,t=>{YQ(t)||((QQ[ZQ]=t).tokenTypeIdx=ZQ++),HQ(t)&&!nw(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),HQ(t)||(t.CATEGORIES=[]),VQ(t)||(t.categoryMatches=[]),XQ(t)||(t.categoryMatchesMap={})})}function jQ(t){v(t,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(t,e)=>{r.categoryMatches.push(QQ[e].tokenTypeIdx)})})}function GQ(t){v(t,t=>{WQ([],t)})}function WQ(r,n){v(r,t=>{n.categoryMatchesMap[t.tokenTypeIdx]=!0}),v(n.CATEGORIES,t=>{var e=r.concat(n);bF(e,t)||WQ(e,t)})}function YQ(t){return b(t,"tokenTypeIdx")}function HQ(t){return b(t,"CATEGORIES")}function VQ(t){return b(t,"categoryMatches")}function XQ(t){return b(t,"categoryMatchesMap")}function KQ(t){return b(t,"tokenTypeIdx")}var ZQ,QQ,JQ,tJ,eJ,rJ,nJ=i(()=>{tq(),Ae(FQ,"tokenStructuredMatcher"),Ae($Q,"tokenStructuredMatcherNoCategories"),ZQ=1,QQ={},Ae(zQ,"augmentTokenTypes"),Ae(qQ,"expandCategories"),Ae(UQ,"assignTokenDefaultProps"),Ae(jQ,"assignCategoriesTokensProp"),Ae(GQ,"assignCategoriesMapProp"),Ae(WQ,"singleAssignCategoriesToksMap"),Ae(YQ,"hasShortKeyProperty"),Ae(HQ,"hasCategoriesProperty"),Ae(VQ,"hasExtendingTokensTypesProperty"),Ae(XQ,"hasExtendingTokensTypesMapProperty"),Ae(KQ,"isTokenType")}),iJ=i(()=>{JQ={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}}),aJ=i(()=>{var t;BQ(),tq(),JK(),nJ(),iJ(),UZ(),(t=tJ=tJ||{})[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE",eJ={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:JQ,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(eJ),(rJ=class{static{Ae(this,"Lexer")}constructor(i,a=eJ){if(this.lexerDefinition=i,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(t,e)=>{var r,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent <${t}>`),XK(e)),a=10 time: ${n}ms`),this.traceInitIndent--,i):e()},"boolean"==typeof a)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object. +a boolean 2nd argument is no longer supported`);this.config=NI({},eJ,a);var t=this.config.traceInitPerf;!0===t?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof t&&(this.traceInitMaxIdent=t,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,t=!0,n=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===eJ.lineTerminatorsPattern)this.config.lineTerminatorsPattern=DQ;else if(this.config.lineTerminatorCharacters===eJ.lineTerminatorCharacters)throw Error(`Error: Missing property on the Lexer config. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(a.safeMode&&a.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),r=nw(i)?{modes:{defaultMode:SD(i)},defaultMode:LQ}:(t=!1,SD(i))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(yQ(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(vQ(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(t,e)=>{r.modes[e]=fz(t,t=>FF(t))}),CI(r.modes));var e;if(v(r.modes,(e,r)=>{this.TRACE_INIT(`Mode: <${r}> processing`,()=>{if(this.modes.push(r),!1===this.config.skipValidations&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(eQ(e,n))}),LF(this.lexerDefinitionErrors)){zQ(e);let t;this.TRACE_INIT("analyzeTokenTypes",()=>{t=tQ(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:a.positionTracking,ensureOptimizations:a.ensureOptimizations,safeMode:a.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=t.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=t.charCodeToPatternIdxToConfig,this.emptyGroups=NI({},this.emptyGroups,t.emptyGroups),this.hasCustom=t.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=t.canBeOptimized}})}),this.defaultMode=r.defaultMode,!LF(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw e=x(this.lexerDefinitionErrors,t=>t.message).join(`----------------------- +`),new Error(`Errors detected in definition of Lexer: +`+e);v(this.lexerDefinitionWarning,t=>{HK(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(IQ?(this.chopInput=Pk,this.match=this.matchWithTest):(this.updateLastIndex=QN,this.match=this.matchWithExec),t&&(this.handleModes=QN),!1===this.trackStartLines&&(this.computeNewColumn=Pk),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=QN),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else{if(!/onlyOffset/i.test(this.config.positionTracking))throw Error(`Invalid config option: "${this.config.positionTracking}"`);this.createTokenInstance=this.createOffsetOnlyToken}this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{var t=dz(this.canModeBeOptimized,(t,e,r)=>(!1===e&&t.push(r),t),[]);if(a.ensureOptimizations&&!LF(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized. + Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode. + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{$Z()}),this.TRACE_INIT("toFastProperties",()=>{ZK(this)})})}tokenize(t,e=this.defaultMode){if(LF(this.lexerDefinitionErrors))return this.tokenizeInternal(t,e);throw t=x(this.lexerDefinitionErrors,t=>t.message).join(`----------------------- +`),new Error(`Unable to Tokenize because Errors detected in definition of Lexer: +`+t)}tokenizeInternal(i,P){let t,a,e,r,n,s,o,l,c,h,B,u,d,F,p,g=i,$=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(i.length/10),y=new Array(z),v=[],x=this.trackStartLines?1:void 0,b=this.trackStartLines?1:void 0,w=xQ(this.emptyGroups),q=this.trackStartLines,k=this.config.lineTerminatorsPattern,T=0,_=[],E=[],S=[],U=[];Object.freeze(U);let C;function A(){return _}function L(t){return t=SQ(t),void 0===(t=E[t])?U:t}Ae(A,"getPossiblePatternsSlow"),Ae(L,"getPossiblePatternsOptimized");var j=Ae(t=>{var e;1===S.length&&void 0===t.tokenType.PUSH_MODE?(e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t),v.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})):(S.pop(),t=YP(S),_=this.patternIdxToConfig[t],E=this.charCodeToPatternIdxToConfig[t],T=_.length,e=this.canModeBeOptimized[t]&&!1===this.config.safeMode,C=E&&e?L:A)},"pop_mode");function N(t){S.push(t),E=this.charCodeToPatternIdxToConfig[t],_=this.patternIdxToConfig[t],T=_.length,T=_.length,t=this.canModeBeOptimized[t]&&!1===this.config.safeMode,C=E&&t?L:A}Ae(N,"push_mode"),N.call(this,P);let I,G=this.config.recoveryEnabled;for(;f<$;){s=null;var W=g.charCodeAt(f),Y=C(W),H=Y.length;for(t=0;ts.length){s=r,o=l,I=R;break}}}break}}if(null!==s){if(c=s.length,void 0!==(h=I.group)&&(B=I.tokenTypeIdx,u=this.createTokenInstance(s,f,B,I.tokenType,x,b,c),this.handlePayload(u,o),!1===h?m=this.addToken(y,m,u):w[h].push(u)),i=this.chopInput(i,c),f+=c,b=this.computeNewColumn(b,c),!0===q&&!0===I.canLineTerminator){let t=0,e,r;for(k.lastIndex=0;!0===(e=k.test(s))&&(r=k.lastIndex-1,t++),!0===e;);0!==t&&(x+=t,b=c-r,this.updateTokenEndLineColumnLocation(u,h,r,t,x,b,c))}this.handleModes(I,j,N,u)}else{let t=f,e=x,r=b,n=!1===G;for(;!1===n&&f<$;)for(i=this.chopInput(i,1),f++,a=0;a{tq(),aJ(),nJ(),Ae(sJ,"tokenLabel"),Ae(oJ,"hasTokenLabel"),dJ="parent",pJ="categories",gJ="label",fJ="group",mJ="push_mode",yJ="pop_mode",vJ="longer_alt",xJ="line_breaks",bJ="start_chars_hint",Ae(lJ,"createToken"),Ae(cJ,"createTokenInternal"),zQ([wJ=lJ({name:"EOF",pattern:rJ.NA})]),Ae(hJ,"createTokenInstance"),Ae(uJ,"tokenMatcher")}),SJ=i(()=>{EJ(),tq(),TZ(),kJ={buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${oJ(t)?`--> ${sJ(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,customUserDescription:r}){var n="Expecting: ",e=` +but found: '`+MB(e).image+"'";return r?n+r+e:(r=dz(t,(t,e)=>t.concat(e),[]),t=x(r,t=>`[${x(t,t=>sJ(t)).join(", ")}]`),n+`one of these possible Token sequences: +`+x(t,(t,e)=>` ${e+1}. `+t).join(` +`)+e)},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r}){var n="Expecting: ",e=` +but found: '`+MB(e).image+"'";return r?n+r+e:n+`expecting at least one iteration which starts with one of these possible Token sequences:: + <${x(t,t=>`[${x(t,t=>sJ(t)).join(",")}]`).join(" ,")}>`+e}},Object.freeze(kJ),TJ={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- +inside top level rule: ->`+t.name+"<-"}},_J={buildDuplicateFoundError(t,e){function r(t){return t instanceof gZ?t.terminalType.name:t instanceof aZ?t.nonTerminalName:""}Ae(r,"getExtraProductionArgument");let n=t.name,i=MB(e),a=i.idx,s=wZ(i),o=r(i),l=0${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} + appears more than once (${e.length} times) in the top level rule: ->${n}<-. + For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES + `;return c=(c=c.replace(/[ \t]+/g," ")).replace(/\s\s+/g,` +`)},buildNamespaceConflictError(t){return`Namespace conflict found in grammar. +The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>. +To resolve this make sure each Terminal and Non-Terminal names are unique +This is easy to accomplish by using the convention that Terminal names start with an uppercase letter +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(t){var e=x(t.prefixPath,t=>sJ(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix +in inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX +For Further details.`},buildAlternationAmbiguityError(t){var e=x(t.prefixPath,t=>sJ(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`},buildEmptyRepetitionError(t){let e=wZ(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens. +This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in inside <${t.topLevelRule.name}> Rule. +Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives: + inside <${t.topLevelRule.name}> Rule. + has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){var e=t.topLevelRule.name;return`Left Recursion found in grammar. +rule: <${e}> can be invoked from itself (directly or indirectly) +without consuming any Tokens. The grammar path that causes this is: + ${e+" --\x3e "+x(t.leftRecursionPath,t=>t.name).concat([e]).join(" --\x3e ")} + To fix this refactor your grammar to remove the left recursion. +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){return`Duplicate definition, rule: ->${t.topLevelRule instanceof sZ?t.topLevelRule.name:t.topLevelRule}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function CJ(t,e){return(t=new AJ(t,e)).resolveRefs(),t.errors}var AJ,LJ=i(()=>{Vet(),tq(),TZ(),Ae(CJ,"resolveGrammar"),AJ=class extends fZ{static{Ae(this,"GastRefResolverVisitor")}constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){v(mF(this.nameToTopRule),t=>{(this.currTopLevel=t).accept(this)})}visitNonTerminal(t){var e=this.nameToTopRule[t.nonTerminalName];e?t.referencedRule=e:(e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t),this.errors.push({message:e,type:Wet.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName}))}}});function NJ(e,r,n=[]){n=SD(n);let i=[],a=0;function s(t){return t.concat(XP(e,a+1))}function o(t){return t=NJ(s(t),r,n),i.concat(t)}for(Ae(s,"remainingPathWith"),Ae(o,"getAlternativesForProd");n.length{!1===LF(t.definition)&&(i=o(t.definition))}),i;if(!(t instanceof gZ))throw Error("non exhaustive match");n.push(t.terminalType)}}a++}return i.push({partialPath:n,suffixDef:XP(e,a)}),i}function IJ(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=e.length,c=l-n-1,h=[],u=[];for(u.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!LF(u);)if((v=u.pop())===s)o&&YP(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!LF(d)){var m=d[0];if(m===i)v={idx:p,def:XP(d),ruleStack:QP(g),occurrenceStack:QP(f)},u.push(v);else if(m instanceof gZ)if(p{tq(),MZ(),SZ(),TZ(),DJ=class extends EZ{static{Ae(this,"AbstractNextPossibleTokensWalker")}constructor(t,e){super(),this.topProd=t,this.path=e,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=SD(this.path.ruleStack).reverse(),this.occurrenceStack=SD(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,e=[]){this.found||super.walk(t,e)}walkProdRef(t,e,r){t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence&&(e=e.concat(r),this.updateExpectedNext(),this.walk(t.referencedRule,e))}updateExpectedNext(){LF(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},RJ=class extends DJ{static{Ae(this,"NextAfterTokenWalker")}constructor(t,e){super(t,e),this.path=e,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,e,r){this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found&&(t=e.concat(r),e=new oZ({definition:t}),this.possibleTokTypes=CZ(e),this.found=!0)}},DJ=class extends EZ{static{Ae(this,"AbstractNextTerminalAfterProductionWalker")}constructor(t,e){super(),this.topRule=t,this.occurrence=e,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},OJ=class extends DJ{static{Ae(this,"NextTerminalAfterManyWalker")}walkMany(t,e,r){var n;t.idx===this.occurrence?(n=MB(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof gZ&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkMany(t,e,r)}},PJ=class extends DJ{static{Ae(this,"NextTerminalAfterManySepWalker")}walkManySep(t,e,r){var n;t.idx===this.occurrence?(n=MB(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof gZ&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkManySep(t,e,r)}},BJ=class extends DJ{static{Ae(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,e,r){var n;t.idx===this.occurrence?(n=MB(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof gZ&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOne(t,e,r)}},FJ=class extends DJ{static{Ae(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,e,r){var n;t.idx===this.occurrence?(n=MB(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof gZ&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOneSep(t,e,r)}},Ae(NJ,"possiblePathsFrom"),Ae(IJ,"nextPossibleTokensAfter"),Ae(MJ,"expandTopLevelRule")});function zJ(t){if(t instanceof lZ||"Option"===t)return ett.OPTION;if(t instanceof uZ||"Repetition"===t)return ett.REPETITION;if(t instanceof cZ||"RepetitionMandatory"===t)return ett.REPETITION_MANDATORY;if(t instanceof hZ||"RepetitionMandatoryWithSeparator"===t)return ett.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof dZ||"RepetitionWithSeparator"===t)return ett.REPETITION_WITH_SEPARATOR;if(t instanceof pZ||"Alternation"===t)return ett.ALTERNATION;throw Error("non exhaustive match")}function qJ(t){var{occurrence:t,rule:e,prodType:r,maxLookahead:n}=t;return(r=zJ(r))===ett.ALTERNATION?KJ(t,e,n):ZJ(t,e,r,n)}function UJ(t,e,r,n,i,a){return a(t=KJ(t,e,r),n,ttt(t)?$Q:FQ,i)}function jJ(t,e,r,n,i,a){return e=ttt(t=ZJ(t,e,i,r))?$Q:FQ,a(t[0],e,n)}function GJ(c,t,h,e){let u=c.length,r=pB(c,t=>pB(t,t=>1===t.length));if(t)return function(t){var r=x(t,t=>t.GATE);for(let e=0;evM(t)),e=dz(t,(e,t,r)=>(v(t,t=>{b(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),v(t.categoryMatches,t=>{b(e,t)||(e[t]=r)})}),e),{});return function(){var t=this.LA(1);return e[t.tokenTypeIdx]}}}function WJ(i,a,r){let t=pB(i,t=>1===t.length),s=i.length;if(!t||r)return function(){t:for(let t=0;t(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}function YJ(e){var r=new Array(e);for(let t=0;tNJ([t],1)),i=YJ(e.length),a=x(e,t=>{let e={};return v(t,t=>{t=HJ(t.partialPath),v(t,t=>{e[t]=!0})}),e}),s=e;for(let r=1;r<=n;r++){var o=s;s=YJ(o.length);for(let e=0;e{t=HJ(t.partialPath),v(t,t=>{a[e][t]=!0})})}}}return i}function KJ(t,e,r,n){return t=new ntt(t,ett.ALTERNATION,n),e.accept(t),XJ(t.result,r)}function ZJ(t,e,r,n){var i=new ntt(t,r),i=(e.accept(i),i.result),e=new rtt(e,t,r).startWalking();return XJ([new oZ({definition:i}),new oZ({definition:e})],n)}function QJ(e,r){t:for(let t=0;tt===(e=r[e])||e.categoryMatchesMap[t.tokenTypeIdx])}function ttt(t){return pB(t,t=>pB(t,t=>pB(t,t=>LF(t.categoryMatches))))}var ett,rtt,ntt,itt=i(()=>{var t;tq(),$J(),SZ(),nJ(),TZ(),(t=ett=ett||{})[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION",Ae(zJ,"getProdType"),Ae(qJ,"getLookaheadPaths"),Ae(UJ,"buildLookaheadFuncForOr"),Ae(jJ,"buildLookaheadFuncForOptionalProd"),Ae(GJ,"buildAlternativesLookAheadFunc"),Ae(WJ,"buildSingleAlternativeLookaheadFunction"),rtt=class extends EZ{static{Ae(this,"RestDefinitionFinderWalker")}constructor(t,e,r){super(),this.topProd=t,this.targetOccurrence=e,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,e,r,n){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=r.concat(n),!0)}walkOption(t,e,r){this.checkIsTarget(t,ett.OPTION,e,r)||super.walkOption(t,e,r)}walkAtLeastOne(t,e,r){this.checkIsTarget(t,ett.REPETITION_MANDATORY,e,r)||super.walkOption(t,e,r)}walkAtLeastOneSep(t,e,r){this.checkIsTarget(t,ett.REPETITION_MANDATORY_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}walkMany(t,e,r){this.checkIsTarget(t,ett.REPETITION,e,r)||super.walkOption(t,e,r)}walkManySep(t,e,r){this.checkIsTarget(t,ett.REPETITION_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}},ntt=class extends fZ{static{Ae(this,"InsideDefinitionFinderVisitor")}constructor(t,e,r){super(),this.targetOccurrence=t,this.targetProdType=e,this.targetRef=r,this.result=[]}checkIsTarget(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,ett.OPTION)}visitRepetition(t){this.checkIsTarget(t,ett.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,ett.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,ett.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,ett.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,ett.ALTERNATION)}},Ae(YJ,"initializeArrayOfArrays"),Ae(HJ,"pathToHashKeys"),Ae(VJ,"isUniquePrefixHash"),Ae(XJ,"lookAheadSequenceFromAlternatives"),Ae(KJ,"getLookaheadPathsForOr"),Ae(ZJ,"getLookaheadPathsForOptionalProd"),Ae(QJ,"containsPath"),Ae(JJ,"isStrictPrefixOfPath"),Ae(ttt,"areTokenCategoriesNotUsed")});function att(t){return t=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName}),x(t,t=>Object.assign({type:Wet.CUSTOM_LOOKAHEAD_VALIDATION},t))}function stt(e,t,r,n){var i=qB(e,t=>ott(t,r)),t=btt(e,t,r),a=qB(e,t=>mtt(t,r)),s=qB(e,t=>htt(t,e,n,r));return i.concat(t,a,s)}function ott(n,i){var t=new wtt,t=(n.accept(t),t.allProductions),t=KB(t,ltt),t=g$(t,t=>1{var e=MB(t),t=i.buildDuplicateFoundError(n,t),r=wZ(e),t={message:t,type:Wet.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:r,occurrence:e.idx};return(r=ctt(e))&&(t.parameter=r),t})}function ltt(t){return`${wZ(t)}_#_${t.idx}_#_`+ctt(t)}function ctt(t){return t instanceof gZ?t.terminalType.name:t instanceof aZ?t.nonTerminalName:""}function htt(r,t,e,n){var i=[];return 1e.name===r.name?t+1:t,0)&&(t=n.buildDuplicateRuleNameError({topLevelRule:r,grammarName:e}),i.push({message:t,type:Wet.DUPLICATE_RULE_NAME,ruleName:r.name})),i}function utt(t,e,r){var n=[];return bF(e,t)||n.push({message:`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,type:Wet.INVALID_RULE_OVERRIDE,ruleName:t}),n}function dtt(r,t,n,i=[]){var e,a=[],t=ptt(t.definition);return LF(t)?[]:(e=r.name,bF(t,r)&&a.push({message:n.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:Wet.LEFT_RECURSION,ruleName:e}),e=UP(t,i.concat([r])),t=qB(e,t=>{var e=SD(i);return e.push(t),dtt(r,t,n,e)}),a.concat(t))}function ptt(t){let e=[];if(LF(t))return e;if((r=MB(t))instanceof aZ)e.push(r.referencedRule);else if(r instanceof oZ||r instanceof lZ||r instanceof cZ||r instanceof hZ||r instanceof dZ||r instanceof uZ)e=e.concat(ptt(r.definition));else if(r instanceof pZ)e=vM(x(r.definition,t=>ptt(t.definition)));else if(!(r instanceof gZ))throw Error("non exhaustive match");var r=xZ(r),n=1{var t=QP(r.definition);return qB(t,(t,e)=>(t=IJ([t],[],FQ,1),LF(t)?[{message:i.buildEmptyAlternationError({topLevelRule:n,alternation:r,emptyChoiceIdx:e}),type:Wet.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:r.idx,alternative:e+1}]:[]))})}function ftt(n,i,a){var t=new ktt,t=(n.accept(t),t.alternations),t=fz(t,t=>!0===t.ignoreAmbiguities);return qB(t,t=>{var e=t.idx,r=t.maxLookahead||i,r=vtt(e=KJ(e,n,r,t),t,n,a),e=xtt(e,t,n,a);return r.concat(e)})}function mtt(e,r){var t=new ktt,t=(e.accept(t),t.alternations);return qB(t,t=>255{var t=new Ttt,t=(n.accept(t),t.allProductions);v(t,t=>{var e=zJ(t),r=t.maxLookahead||i,e=ZJ(t.idx,n,e,r)[0];LF(vM(e))&&(r=a.buildEmptyRepetitionError({topLevelRule:n,repetition:t}),s.push({message:r,type:Wet.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name}))})}),s}function vtt(a,s,r,n){let o=[],t=dz(a,(t,e,i)=>(!0!==s.definition[i].ignoreAmbiguities&&v(e,r=>{let n=[i];v(a,(t,e)=>{i!==e&&QJ(t,r)&&!0!==s.definition[e].ignoreAmbiguities&&n.push(e)}),1{var e=x(t.alts,t=>t+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:e,prefixPath:t.path}),type:Wet.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:t.alts}})}function xtt(t,i,a,s){let o=dz(t,(t,e,r)=>(e=x(e,t=>({idx:r,path:t})),t.concat(e)),[]);return MD(qB(o,t=>{if(!0===i.definition[t.idx].ignoreAmbiguities)return[];let n=t.idx,e=t.path,r=xB(o,t=>!0!==i.definition[t.idx].ignoreAmbiguities&&t.idx{var e=[t.idx+1,n+1],r=0===i.idx?"":i.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:i,ambiguityIndices:e,prefixPath:t.path}),type:Wet.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:e}})}))}function btt(t,e,r){let n=[],i=x(e,t=>t.name);return v(t,t=>{var e=t.name;bF(i,e)&&(t=r.buildNamespaceConflictError(t),n.push({message:t,type:Wet.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e}))}),n}var wtt,ktt,Ttt,_tt=i(()=>{tq(),Vet(),TZ(),itt(),$J(),nJ(),Ae(att,"validateLookahead"),Ae(stt,"validateGrammar"),Ae(ott,"validateDuplicateProductions"),Ae(ltt,"identifyProductionForDuplicates"),Ae(ctt,"getExtraProductionArgument"),wtt=class extends fZ{static{Ae(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}},Ae(htt,"validateRuleDoesNotAlreadyExist"),Ae(utt,"validateRuleIsOverridden"),Ae(dtt,"validateNoLeftRecursion"),Ae(ptt,"getFirstNoneTerminal"),ktt=class extends fZ{static{Ae(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}},Ae(gtt,"validateEmptyOrAlternative"),Ae(ftt,"validateAmbiguousAlternationAlternatives"),Ttt=class extends fZ{static{Ae(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}},Ae(mtt,"validateTooManyAlts"),Ae(ytt,"validateSomeNonEmptyLookaheadPath"),Ae(vtt,"checkAlternativesAmbiguities"),Ae(xtt,"checkPrefixAlternativesAmbiguities"),Ae(btt,"checkTerminalAndNoneTerminalsNameSpace")});function Ett(t){let e=MP(t,{errMsgProvider:TJ}),r={};return v(t.rules,t=>{r[t.name]=t}),CJ(r,e.errMsgProvider)}function Stt(t){return stt((t=MP(t,{errMsgProvider:_J})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var Ctt=i(()=>{tq(),LJ(),_tt(),SJ(),Ae(Ett,"resolveGrammar"),Ae(Stt,"validateGrammar")});function Att(t){return bF(Ltt,t.name)}var Ltt,Ntt,Itt,Mtt,Rtt,Dtt,Ott=i(()=>{tq(),Ltt=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(Ltt),Ae(Att,"isRecognitionException"),Ntt=class extends Error{static{Ae(this,"RecognitionException")}constructor(t,e){super(t),this.token=e,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},Itt=class extends Ntt{static{Ae(this,"MismatchedTokenException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="MismatchedTokenException"}},Mtt=class extends Ntt{static{Ae(this,"NoViableAltException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="NoViableAltException"}},Rtt=class extends Ntt{static{Ae(this,"NotAllInputParsedException")}constructor(t,e){super(t,e),this.name="NotAllInputParsedException"}},Dtt=class extends Ntt{static{Ae(this,"EarlyExitException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="EarlyExitException"}}});function Ptt(t,e,r,n,i,a,s){let o=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[o],c=(void 0===l&&(n=this.getCurrRuleFullName(),n=this.getGAstProductions()[n],l=new a(n,i).startWalking(),this.firstAfterRepMap[o]=l),l.token),h=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=wJ,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(t,e,r,c)}var Btt,Ftt,$tt,ztt,qtt=i(()=>{EJ(),tq(),Ott(),RZ(),Vet(),Btt={},Ftt="InRuleRecoveryException",$tt=class extends Error{static{Ae(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=Ftt}},ztt=class{static{Ae(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(b(t,"recoveryEnabled")?t:jet).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Ptt)}getTokenToInsert(t){return(t=hJ(t,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,e,r,n){let i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),c=this.LA(1),h=Ae(()=>{var t=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:t,ruleName:this.getCurrRuleFullName()});(t=new Itt(t,l,this.LA(0))).resyncedTokens=QP(s),this.SAVE_ERROR(t)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,n))return void h();if(r.call(this))return h(),void t.apply(this,e);this.tokenMatcher(c,i)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,e,r){return!(!1===r||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e)))}getFollowsForInRuleRecovery(t,e){return t=this.getCurrentGrammarPath(t,e),this.getNextPossibleTokenTypes(t)}tryInRuleRecovery(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t))return e=this.SKIP_TOKEN(),this.consumeToken(),e;throw new $tt("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t)||LF(e))return!1;let r=this.LA(1);return void 0!==AB(e,t=>this.tokenMatcher(r,t))}canRecoverWithSingleTokenDeletion(t){return!!this.canTokenTypeBeDeletedInRecovery(t)&&this.tokenMatcher(this.LA(2),t)}isInCurrentRuleReSyncSet(t){var e=this.getCurrFollowKey(),e=this.getFollowSetFromFollowKey(e);return bF(e,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),e=this.LA(1),r=2;for(;;){var n=AB(t,t=>uJ(e,t));if(void 0!==n)return n;e=this.LA(r),r++}}getCurrFollowKey(){var t,e,r;return 1===this.RULE_STACK.length?Btt:(t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName(),{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(r)})}buildFullFollowKeyStack(){let r=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return x(r,(t,e)=>0===e?Btt:{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:n[e],inRule:this.shortRuleNameToFullName(r[e-1])})}flattenFollowSet(){var t=x(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return vM(t)}getFollowSetFromFollowKey(t){return t===Btt?[wJ]:(t=t.ruleName+t.idxInCallingRule+IZ+t.inRule,this.resyncFollows[t])}addToResyncTokens(t,e){return this.tokenMatcher(t,wJ)||e.push(t),e}reSyncTo(t){let e=[],r=this.LA(1);for(;!1===this.tokenMatcher(r,t);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,e);return QP(e)}attemptInRepetitionRecovery(t,e,r,n,i,a,s){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:SD(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return x(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}},Ae(Ptt,"attemptInRepetitionRecovery")});function Utt(t,e,r){return r|e|t}var jtt,Gtt=i(()=>{Ae(Utt,"getKeyForAutomaticLookahead")}),Wtt=i(()=>{tq(),SJ(),Vet(),_tt(),itt(),jtt=class{static{Ae(this,"LLkLookaheadStrategy")}constructor(t){this.maxLookahead=null!=(t=t?.maxLookahead)?t:jet.maxLookahead}validate(t){var e,r,n=this.validateNoLeftRecursion(t.rules);return LF(n)?(e=this.validateEmptyOrAlternatives(t.rules),r=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),t=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead),[...n,...e,...r,...t]):n}validateNoLeftRecursion(t){return qB(t,t=>dtt(t,t,_J))}validateEmptyOrAlternatives(t){return qB(t,t=>gtt(t,_J))}validateAmbiguousAlternationAlternatives(t,e){return qB(t,t=>ftt(t,e,_J))}validateSomeNonEmptyLookaheadPath(t,e){return ytt(t,e,_J)}buildLookaheadForAlternation(t){return UJ(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,GJ)}buildLookaheadForOptional(t){return jJ(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,zJ(t.prodType),WJ)}}});function Ytt(t){return Xtt.reset(),t.accept(Xtt),t=Xtt.dslMethods,Xtt.reset(),t}var Htt,Vtt,Xtt,Ktt=i(()=>{tq(),Vet(),Gtt(),TZ(),Wtt(),Htt=class{static{Ae(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=(b(t,"dynamicTokensEnabled")?t:jet).dynamicTokensEnabled,this.maxLookahead=(b(t,"maxLookahead")?t:jet).maxLookahead,this.lookaheadStrategy=b(t,"lookaheadStrategy")?t.lookaheadStrategy:new jtt({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){v(t,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:t,repetition:e,option:r,repetitionMandatory:n,repetitionMandatoryWithSeparator:i,repetitionWithSeparator:a}=Ytt(s);v(t,r=>{var t=0===r.idx?"":r.idx;this.TRACE_INIT(""+wZ(r)+t,()=>{var t=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),e=Utt(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(e,t)})}),v(e,t=>{this.computeLookaheadFunc(s,t.idx,768,"Repetition",t.maxLookahead,wZ(t))}),v(r,t=>{this.computeLookaheadFunc(s,t.idx,512,"Option",t.maxLookahead,wZ(t))}),v(n,t=>{this.computeLookaheadFunc(s,t.idx,1024,"RepetitionMandatory",t.maxLookahead,wZ(t))}),v(i,t=>{this.computeLookaheadFunc(s,t.idx,1536,"RepetitionMandatoryWithSeparator",t.maxLookahead,wZ(t))}),v(a,t=>{this.computeLookaheadFunc(s,t.idx,1280,"RepetitionWithSeparator",t.maxLookahead,wZ(t))})})})}computeLookaheadFunc(r,n,i,a,s,t){this.TRACE_INIT(""+t+(0===n?"":n),()=>{var t=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:n,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),e=Utt(this.fullRuleNameToShort[r.name],i,n);this.setLaFuncCache(e,t)})}getKeyForAutomaticLookahead(t,e){return e|t|this.getLastExplicitRuleShortName()}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,e){this.lookAheadFuncsCache.set(t,e)}},Vtt=class extends fZ{static{Ae(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},Xtt=new Vtt,Ae(Ytt,"collectMethods")});function Ztt(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{Ae(Ztt,"setNodeLocationOnlyOffset"),Ae(Qtt,"setNodeLocationFull"),Ae(Jtt,"addTerminalToCst"),Ae(tet,"addNoneTerminalToCst")});function ret(t,e){Object.defineProperty(t,net,{enumerable:!1,configurable:!0,writable:!1,value:e})}var net,iet=i(()=>{net="name",Ae(ret,"defineNameProp")});function aet(e,r){var n=CI(e),i=n.length;for(let t=0;tt.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + `+t.join(` + +`).replace(/\n/g,` + `))},"validateVisitor")});return r.prototype=t,(r.prototype.constructor=r)._RULE_NAMES=e,r}function oet(t,e,r){var n=Ae(function(){},"derivedConstructor");ret(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return v(e,t=>{i[t]=aet}),n.prototype=i,n.prototype.constructor=n}function cet(t,e){return het(t,e)}function het(e,t){return t=xB(t,t=>!1===M3(e[t])),t=x(t,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:uet.MISSING_METHOD,methodName:t})),MD(t)}var uet,det,pet,get,fet,met,yet,vet=i(()=>{var t;tq(),iet(),Ae(aet,"defaultVisit"),Ae(set,"createBaseSemanticVisitorConstructor"),Ae(oet,"createBaseVisitorConstructorWithDefaults"),(t=uet=uet||{})[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD",Ae(cet,"validateVisitor"),Ae(het,"validateMissingCstMethods")}),xet=i(()=>{eet(),tq(),vet(),Vet(),det=class{static{Ae(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(b(t,"nodeLocationTracking")?t:jet).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Qtt,this.setNodeLocationFromNode=Qtt,this.cstPostRule=QN,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=QN,this.setNodeLocationFromNode=QN,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ztt,this.setNodeLocationFromNode=Ztt,this.cstPostRule=QN,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=QN,this.setNodeLocationFromNode=QN,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=QN,this.setNodeLocationFromNode=QN,this.cstPostRule=QN,this.setInitialNodeLocation=QN}else this.cstInvocationStateUpdate=QN,this.cstFinallyStateUpdate=QN,this.cstPostTerminal=QN,this.cstPostNonTerminal=QN,this.cstPostRule=QN}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){t={name:t,children:Object.create(null)},this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?(t.endOffset=e.endOffset,t.endLine=e.endLine,t.endColumn=e.endColumn):(t.startOffset=NaN,t.startLine=NaN,t.startColumn=NaN)}cstPostRuleOnlyOffset(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?t.endOffset=e.endOffset:t.startOffset=NaN}cstPostTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];Jtt(r,e,t),this.setNodeLocationFromToken(r.location,e)}cstPostNonTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];tet(r,e,t),this.setNodeLocationFromNode(r.location,t.location)}getBaseCstVisitorConstructor(){var t;return FF(this.baseCstVisitorConstructor)?(t=set(this.className,CI(this.gastProductionsCache)),this.baseCstVisitorConstructor=t):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var t;return FF(this.baseCstVisitorWithDefaultsConstructor)?(t=oet(this.className,CI(this.gastProductionsCache),this.getBaseCstVisitorConstructor()),this.baseCstVisitorWithDefaultsConstructor=t):this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){var t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){var t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}}}),bet=i(()=>{Vet(),pet=class{static{Ae(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Uet}LA(t){return(t=this.currIdx+t)<0||this.tokVectorLength<=t?Uet:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}}),wet=i(()=>{tq(),Ott(),Vet(),SJ(),_tt(),TZ(),get=class{static{Ae(this,"RecognizerApi")}ACTION(t){return t.call(this)}consume(t,e,r){return this.consumeInternal(e,t,r)}subrule(t,e,r){return this.subruleInternal(e,t,r)}option(t,e){return this.optionInternal(e,t)}or(t,e){return this.orInternal(e,t)}many(t,e){return this.manyInternal(t,e)}atLeastOne(t,e){return this.atLeastOneInternal(t,e)}CONSUME(t,e){return this.consumeInternal(t,0,e)}CONSUME1(t,e){return this.consumeInternal(t,1,e)}CONSUME2(t,e){return this.consumeInternal(t,2,e)}CONSUME3(t,e){return this.consumeInternal(t,3,e)}CONSUME4(t,e){return this.consumeInternal(t,4,e)}CONSUME5(t,e){return this.consumeInternal(t,5,e)}CONSUME6(t,e){return this.consumeInternal(t,6,e)}CONSUME7(t,e){return this.consumeInternal(t,7,e)}CONSUME8(t,e){return this.consumeInternal(t,8,e)}CONSUME9(t,e){return this.consumeInternal(t,9,e)}SUBRULE(t,e){return this.subruleInternal(t,0,e)}SUBRULE1(t,e){return this.subruleInternal(t,1,e)}SUBRULE2(t,e){return this.subruleInternal(t,2,e)}SUBRULE3(t,e){return this.subruleInternal(t,3,e)}SUBRULE4(t,e){return this.subruleInternal(t,4,e)}SUBRULE5(t,e){return this.subruleInternal(t,5,e)}SUBRULE6(t,e){return this.subruleInternal(t,6,e)}SUBRULE7(t,e){return this.subruleInternal(t,7,e)}SUBRULE8(t,e){return this.subruleInternal(t,8,e)}SUBRULE9(t,e){return this.subruleInternal(t,9,e)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,e,r=Get){bF(this.definedRulesNames,t)&&(n={message:_J.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Wet.DUPLICATE_RULE_NAME,ruleName:t},this.definitionErrors.push(n)),this.definedRulesNames.push(t);var n=this.defineRule(t,e,r);return this[t]=n}OVERRIDE_RULE(t,e,r=Get){var n=utt(t,this.definedRulesNames,this.className),n=(this.definitionErrors=this.definitionErrors.concat(n),this.defineRule(t,e,r));return this[t]=n}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);var t=this.saveRecogState();try{return e.apply(this,r),!0}catch(t){if(Att(t))return!1;throw t}finally{this.reloadRecogState(t),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return rZ(mF(this.gastProductionsCache))}}}),ket=i(()=>{tq(),Gtt(),Ott(),itt(),$J(),Vet(),qtt(),EJ(),nJ(),fet=class{static{Ae(this,"RecognizerEngine")}initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=$Q,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},b(e,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0 + For Further details.`);if(nw(t)){if(LF(t))throw Error(`A Token Vocabulary cannot be empty. + Note that the first argument for the parser constructor + is no longer a Token vector (since v4.0).`);if("number"==typeof t[0].startOffset)throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0 + For Further details.`)}if(nw(t))this.tokensMap=dz(t,(t,e)=>(t[e.name]=e,t),{});else if(b(t,"modes")&&pB(vM(mF(t.modes)),KQ))e=vM(mF(t.modes)),e=$z(e),this.tokensMap=dz(e,(t,e)=>(t[e.name]=e,t),{});else{if(!L3(t))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=SD(t)}this.tokensMap.EOF=wJ,e=b(t,"modes")?vM(mF(t.modes)):mF(t),t=pB(e,t=>LF(t.categoryMatches)),this.tokenMatcher=t?$Q:FQ,zQ(mF(this.tokensMap))}defineRule(r,n,t){if(this.selfAnalysisDone)throw Error(`Grammar rule <${r}> may not be defined after the 'performSelfAnalysis' method has been called' +Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=(b(t,"resyncEnabled")?t:Get).resyncEnabled,a=(b(t,"recoveryValueFunc")?t:Get).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,t=!0===this.outputCst?Ae(function(...t){try{this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,t);var e=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(e),e}catch(t){return this.invokeRuleCatch(t,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):Ae(function(...t){try{return this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,t)}catch(t){return this.invokeRuleCatch(t,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(t,{ruleName:r,originalGrammarAction:n})}invokeRuleCatch(t,e,r){var n=1===this.RULE_STACK.length,e=e&&!this.isBackTracking()&&this.recoveryEnabled;if(Att(t)){var i=t;if(e){if(e=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(e))return i.resyncedTokens=this.reSyncTo(e),this.outputCst?((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,e):r(t);this.outputCst&&((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,i.partialCstResult=e)}else if(n)return this.moveToTerminatedState(),r(t);throw i}throw t}optionInternal(t,e){var r=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,r)}optionInternalLogic(t,e,r){let n=this.getLaFuncFromCache(r),i;if("function"!=typeof t){i=t.DEF;let e=t.GATE;if(void 0!==e){let t=n;n=Ae(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else i=t;if(!0===n.call(this))return i.call(this)}atLeastOneInternal(t,e){var r=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,e,r)}atLeastOneInternalLogic(t,r,e){let n=this.getLaFuncFromCache(e),i;if("function"!=typeof r){i=r.DEF;let e=r.GATE;if(void 0!==e){let t=n;n=Ae(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else i=r;if(!0!==n.call(this))throw this.raiseEarlyExitException(t,ett.REPETITION_MANDATORY,r.ERR_MSG);{let t=this.doSingleRepetition(i);for(;!0===n.call(this)&&!0===t;)t=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],n,1024,t,BJ)}atLeastOneSepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,r)}atLeastOneSepFirstInternalLogic(t,e,r){let n=e.DEF,i=e.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(t,ett.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);for(n.call(this),r=Ae(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,r,n,FJ],r,1536,t,FJ)}manyInternal(t,e){var r=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,r)}manyInternalLogic(t,r,e){let n=this.getLaFuncFromCache(e),i;if("function"!=typeof r){i=r.DEF;let e=r.GATE;if(void 0!==e){let t=n;n=Ae(()=>e.call(this)&&t.call(this),"lookaheadFunction")}}else i=r;let a=!0;for(;!0===n.call(this)&&!0===a;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],n,768,t,OJ,a)}manySepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,r)}manySepFirstInternalLogic(t,e,r){let n=e.DEF,i=e.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(n.call(this),e=Ae(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,n,PJ],e,1280,t,PJ)}}repetitionSepSecondInternal(t,e,r,n,i){for(;r();)this.CONSUME(e),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,r,n,i],r,1536,t,i)}doSingleRepetition(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e}orInternal(t,e){var r=this.getKeyForAutomaticLookahead(256,e),n=nw(t)?t:t.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,n)))return n[r].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)}ruleFinallyStateUpdate(){var t,e;this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()&&(t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Rtt(e,t)))}subruleInternal(t,e,r){var n;try{var i=void 0!==r?r.ARGS:void 0;return this.subruleIdx=e,n=t.apply(this,i),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:t.ruleName),n}catch(e){throw this.subruleInternalError(e,r,t.ruleName)}}subruleInternalError(t,e,r){throw Att(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:r),delete t.partialCstResult),t}consumeInternal(t,e,r){let n;try{var i=this.LA(1);!0===this.tokenMatcher(i,t)?(this.consumeToken(),n=i):this.consumeInternalError(t,i,r)}catch(r){n=this.consumeInternalRecovery(t,e,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:t.name,n),n}consumeInternalError(t,e,r){var n=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Itt(r,e,n))}consumeInternalRecovery(t,e,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;e=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,e)}catch(t){throw t.name===Ftt?r:t}}saveRecogState(){var t=this.errors,e=SD(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,e,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),wJ)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),Tet=i(()=>{Ott(),tq(),itt(),Vet(),met=class{static{Ae(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=(b(t,"errorMessageProvider")?t:jet).errorMessageProvider}SAVE_ERROR(t){if(Att(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:SD(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return SD(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,r){var n=this.getCurrRuleFullName(),t=ZJ(t,this.getGAstProductions()[n],e,this.maxLookahead)[0],i=[];for(let t=1;t<=this.maxLookahead;t++)i.push(this.LA(t));throw e=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:t,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n}),this.SAVE_ERROR(new Dtt(e,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){var r=this.getCurrRuleFullName(),t=KJ(t,this.getGAstProductions()[r],this.maxLookahead),n=[];for(let t=1;t<=this.maxLookahead;t++)n.push(this.LA(t));throw r=this.LA(0),t=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:t,actual:n,previous:r,customUserDescription:e,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Mtt(t,this.LA(1),r))}}}),_et=i(()=>{$J(),tq(),yet=class{static{Ae(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,e){var r=this.gastProductionsCache[t];if(FF(r))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return IJ([r],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){var e=MB(t.ruleStack),e=this.getGAstProductions()[e];return new RJ(e,t).startWalking()}}});function Eet(t,e,r,n=!1){Let(r);var i=YP(this.recordingProdStack),a=M3(e)?e:e.DEF,t=new t({definition:[],idx:r});return n&&(t.separator=e.SEP),b(e,"MAX_LOOKAHEAD")&&(t.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(t),a.call(this),i.definition.push(t),this.recordingProdStack.pop(),Net}function Cet(t,e){Let(e);let r=YP(this.recordingProdStack),n=!1===nw(t),i=0==n?t:t.DEF,a=new pZ({definition:[],idx:e,ignoreAmbiguities:n&&!0===t.IGNORE_AMBIGUITIES});return b(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),e=_z(i,t=>M3(t.GATE)),a.hasPredicates=e,r.definition.push(a),v(i,t=>{var e=new oZ({definition:[]});a.definition.push(e),b(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:b(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()}),Net}function Aet(t){return 0===t?"":""+t}function Let(t){if(t<0||Iet + Idx value must be a none negative value smaller than `+(Iet+1))).KNOWN_RECORDER_ERROR=!0,t}var Net,Iet,Met,Ret,Det,Oet,Pet,Bet=i(()=>{tq(),TZ(),aJ(),nJ(),EJ(),Vet(),Gtt(),Net={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(Net),Iet=Math.pow(2,8)-1,zQ([Met=lJ({name:"RECORDING_PHASE_TOKEN",pattern:rJ.NA})]),Ret=hJ(Met,`This IToken indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1),Object.freeze(Ret),Det={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Oet=class{static{Ae(this,"GastRecorder")}initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var t=0{var e=this;for(let t=0;t<10;t++){var r=0!0}LA_RECORD(t){return Uet}topLevelRuleRecord(t,e){try{var r=new sZ({definition:[],name:t});return r.name=t,this.recordingProdStack.push(r),e.call(this),this.recordingProdStack.pop(),r}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+` + This error was thrown during the "grammar recording phase" For more info see: + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{}throw t}}optionInternalRecord(t,e){return Eet.call(this,lZ,t,e)}atLeastOneInternalRecord(t,e){Eet.call(this,cZ,e,t)}atLeastOneSepFirstInternalRecord(t,e){Eet.call(this,hZ,e,t,!0)}manyInternalRecord(t,e){Eet.call(this,uZ,e,t)}manySepFirstInternalRecord(t,e){Eet.call(this,dZ,e,t,!0)}orInternalRecord(t,e){return Cet.call(this,t,e)}subruleInternalRecord(t,e,r){var n,i;if(Let(e),t&&!1!==b(t,"ruleName"))return n=YP(this.recordingProdStack),i=t.ruleName,i=new aZ({idx:e,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0}),n.definition.push(i),this.outputCst?Det:Net;throw(r=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}> + inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,r}consumeInternalRecord(t,e,r){var n;if(Let(e),YQ(t))return n=YP(this.recordingProdStack),r=new gZ({idx:e,terminalType:t,label:r?.LABEL}),n.definition.push(r),Ret;throw(n=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}> + inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,n}},Ae(Eet,"recordProd"),Ae(Cet,"recordOrProd"),Ae(Aet,"getIdxSuffix"),Ae(Let,"assertMethodIdxIsValid")}),Fet=i(()=>{tq(),JK(),Vet(),Pet=class{static{Ae(this,"PerformanceTracer")}initPerformanceTracer(t){var e;b(t,"traceInitPerf")?(t=t.traceInitPerf,this.traceInitMaxIdent=(e="number"==typeof t)?t:1/0,this.traceInitPerf=e?0 <${t}>`),XK(e)),a=10 time: ${n}ms`),this.traceInitIndent--,i):e()}}});function $et(i,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(t=>{var e;"constructor"!==t&&((e=Object.getOwnPropertyDescriptor(n,t))&&(e.get||e.set)?Object.defineProperty(i.prototype,t,e):i.prototype[t]=r.prototype[t])})})}var zet=i(()=>{Ae($et,"applyMixins")});function qet(t=void 0){return function(){return t}}var Uet,jet,Get,Wet,Yet,Het,Vet=i(()=>{var t;tq(),JK(),BZ(),EJ(),SJ(),Ctt(),qtt(),Ktt(),xet(),bet(),wet(),ket(),Tet(),_et(),Bet(),Fet(),zet(),_tt(),Uet=hJ(wJ,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(Uet),jet=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:kJ,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Get=Object.freeze({recoveryValueFunc:Ae(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(t=Wet=Wet||{})[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",Ae(qet,"EMPTY_ALT"),(Yet=class e{static{Ae(this,"Parser")}static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated.\t\nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{var t;this.selfAnalysisDone=!0;let r=this.className,n=(this.TRACE_INIT("toFastProps",()=>{ZK(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(this.definedRulesNames,t=>{let e=this[t].originalGrammarAction,r;this.TRACE_INIT(t+" Rule",()=>{r=this.topLevelRuleRecord(t,e)}),this.gastProductionsCache[t]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{n=Ett({rules:mF(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{var t,e;LF(n)&&!1===this.skipValidations&&(t=Stt({rules:mF(this.gastProductionsCache),tokenTypes:mF(this.tokensMap),errMsgProvider:_J,grammarName:r}),e=att({lookaheadStrategy:this.lookaheadStrategy,rules:mF(this.gastProductionsCache),tokenTypes:mF(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(t,e))}),LF(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var t=DZ(mF(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null!=(e=(t=this.lookaheadStrategy).initialize)&&e.call(t,{rules:mF(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(mF(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!LF(this.definitionErrors))throw t=x(this.definitionErrors,t=>t.message),new Error(`Parser Definition Errors detected: + `+t.join(` +------------------------------- +`))})}constructor(t,e){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(e),this.initLexerAdapter(),this.initLooksAhead(e),this.initRecognizerEngine(t,e),this.initRecoverable(e),this.initTreeBuilder(e),this.initContentAssist(),this.initGastRecorder(e),this.initPerformanceTracer(e),b(e,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. + Please use the flag on the relevant DSL method instead. + See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES + For further details.`);this.skipValidations=(b(e,"skipValidations")?e:jet).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,$et(Yet,[ztt,Htt,det,pet,fet,get,met,yet,Oet,Pet]),Het=class extends Yet{static{Ae(this,"EmbeddedActionsParser")}constructor(t,e=jet){(e=SD(e)).outputCst=!1,super(t,e)}}}),Xet=i(()=>{TZ()}),Ket=i(()=>{}),Zet=i(()=>{Xet(),Ket()}),Qet=i(()=>{WK()}),Jet=i(()=>{WK(),Vet(),aJ(),EJ(),itt(),Wtt(),SJ(),Ott(),iJ(),TZ(),TZ(),Zet(),Qet()});function trt(t,e,r){return t.name+`_${e}_`+r}function ert(e){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},n=(rrt(r,e),e.length);for(let t=0;tnrt(e,r,t)));return frt(e,r,n,t,...i)}function crt(t,e,r){var n=krt(t,e,r,{type:Ert});return grt(t,n),prt(t,e,r,frt(t,e,n,r,hrt(t,e,r)))}function hrt(e,r,t){return 1===(t=xB(x(t.definition,t=>nrt(e,r,t)),t=>void 0!==t)).length?t[0]:0===t.length?void 0:yrt(e,t)}function urt(t,e,r,n,i){var a=n.left,n=n.right,s=krt(t,e,r,{type:Rrt}),o=(grt(t,s),krt(t,e,r,{type:Drt}));return a.loopback=s,o.loopback=s,wrt(n,t.decisionMap[trt(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===i?(wrt(s,a),wrt(s,o)):(wrt(s,o),wrt(s,i.left),wrt(i.right,a)),{left:a,right:o}}function drt(t,e,r,n,i){var a=n.left,n=n.right,s=krt(t,e,r,{type:Mrt}),o=(grt(t,s),krt(t,e,r,{type:Drt})),l=krt(t,e,r,{type:Irt});return s.loopback=l,o.loopback=l,wrt(s,a),wrt(s,o),wrt(n,l),void 0!==i?(wrt(l,o),wrt(l,i.left),wrt(i.right,a)):wrt(l,s),{left:t.decisionMap[trt(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function prt(t,e,r,n){var i=n.left;return wrt(i,n.right),t.decisionMap[trt(e,"Option",r.idx)]=i,n}function grt(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function frt(t,e,r,n,...i){var a,s=krt(t,e,n,{type:Nrt,start:r});r.end=s;for(a of i)void 0!==a?(wrt(r,a.left),wrt(a.right,s)):wrt(r,s);return i={left:r,right:s},t.decisionMap[trt(e,mrt(n),n.idx)]=r,i}function mrt(t){if(t instanceof pZ)return"Alternation";if(t instanceof lZ)return"Option";if(t instanceof uZ)return"Repetition";if(t instanceof dZ)return"RepetitionWithSeparator";if(t instanceof cZ)return"RepetitionMandatory";if(t instanceof hZ)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function yrt(e,r){var n=r.length;for(let t=0;t{$B(),bB(),Jet(),Ae(trt,"buildATNKey"),Ert=1,Srt=2,Crt=4,Art=5,Lrt=7,Nrt=8,Irt=9,Mrt=10,Rrt=11,Drt=12,Ort=class{static{Ae(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},Prt=class extends Ort{static{Ae(this,"AtomTransition")}constructor(t,e){super(t),this.tokenType=e}},Brt=class extends Ort{static{Ae(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},Frt=class extends Ort{static{Ae(this,"RuleTransition")}constructor(t,e,r){super(t),this.rule=e,this.followState=r}isEpsilon(){return!0}},Ae(ert,"createATN"),Ae(rrt,"createRuleStartAndStopATNStates"),Ae(nrt,"atom"),Ae(irt,"repetition"),Ae(art,"repetitionSep"),Ae(srt,"repetitionMandatory"),Ae(ort,"repetitionMandatorySep"),Ae(lrt,"alternation"),Ae(crt,"option"),Ae(hrt,"block"),Ae(urt,"plus"),Ae(drt,"star"),Ae(prt,"optional"),Ae(grt,"defineDecisionState"),Ae(frt,"makeAlts"),Ae(mrt,"getProdType"),Ae(yrt,"makeBlock"),Ae(vrt,"tokenRef"),Ae(xrt,"ruleRef"),Ae(brt,"buildRuleHandle"),Ae(wrt,"epsilon"),Ae(krt,"newState"),Ae(Trt,"addTransition"),Ae(_rt,"removeState")});function zrt(t,e=!0){return`${e?"a"+t.alt:""}s${t.state.stateNumber}:`+t.stack.map(t=>t.stateNumber.toString()).join("_")}var qrt,Urt,jrt=i(()=>{$B(),qrt={},Urt=class{static{Ae(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){var e=zrt(t);e in this.map||(this.map[e]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return x(this.configs,t=>t.alt)}get key(){let t="";for(var e in this.map)t+=e+":";return t}},Ae(zrt,"getATNConfigKey")});function Grt(n,i){let a={};return t=>{let e=t.toString(),r=a[e];return void 0===r&&(r={atnStartState:n,decision:i,states:{}},a[e]=r),r}}function Wrt(t,e=!0){var r,n=new Set;for(r of t){var i,a,s=new Set;for(i of r){if(void 0===i){if(e)break;return!1}for(a of[i.tokenTypeIdx].concat(i.categoryMatches))if(n.has(a)){if(!s.has(a))return!1}else n.add(a),s.add(a)}}return!0}function Yrt(e){var r=e.decisionStates.length,n=Array(r);for(let t=0;tsJ(t)).join(", "),r=0===t.production.idx?"":t.production.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${Qrt(t.production)}${r}> inside <${t.topLevelRule.name}> Rule, +<${e}> may appears as a prefix path in all these alternatives. +`+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES +For Further details.`}function Qrt(t){if(t instanceof aZ)return"SUBRULE";if(t instanceof lZ)return"OPTION";if(t instanceof pZ)return"OR";if(t instanceof cZ)return"AT_LEAST_ONE";if(t instanceof hZ)return"AT_LEAST_ONE_SEP";if(t instanceof dZ)return"MANY_SEP";if(t instanceof uZ)return"MANY";if(t instanceof gZ)return"CONSUME";throw Error("non exhaustive match")}function Jrt(t,e,r){return e=qB(e.configs.elements,t=>t.state.transitions),{actualToken:r,possibleTokenTypes:Uz(e.filter(t=>t instanceof Prt).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function tnt(t,e){return t.edges[e.tokenTypeIdx]}function ent(t,e,r){var n,i=new Urt,a=[];for(n of t.elements)if(!1!==r.is(n.alt))if(n.state.type===Lrt)a.push(n);else{var s=n.state.transitions.length;for(let t=0;t{Jet(),$rt(),jrt(),t$(),UB(),jz(),$B(),xM(),iB(),NF(),pz(),Ae(Grt,"createDFACache"),ynt=class{static{Ae(this,"PredicateSet")}constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,e){this.predicates[t]=e}toString(){let e="",r=this.predicates.length;for(let t=0;tconsole.log(t)}initialize(t){this.atn=ert(t.rules),this.dfas=Yrt(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:e,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=t,a=this.dfas,s=this.logging,o=trt(r,"Alternation",e),l=this.atn.decisionMap[o].decision,c=x(qJ({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:r}),t=>x(t,t=>t[0]));if(!Wrt(c,!1)||i)return n?function(e){var r=new ynt,n=void 0===e?0:e.length;for(let t=0;t(v(t,t=>{t&&(e[t.tokenTypeIdx]=r,v(t.categoryMatches,t=>{e[t]=r}))}),e),{});return n?function(t){var e=this.LA(1),e=r[e.tokenTypeIdx];if(void 0===t||void 0===e||void 0===(t=null==(t=t[e])?void 0:t.GATE)||!1!==t.call(this))return e}:function(){var t=this.LA(1);return r[t.tokenTypeIdx]}}}buildLookaheadForOptional(r){let{prodOccurrence:t,rule:e,prodType:n,dynamicTokensEnabled:i}=r,a=this.dfas,s=this.logging,o=trt(e,n,t),l=this.atn.decisionMap[o].decision,c=x(qJ({maxLookahead:1,occurrence:t,prodType:n,rule:e}),t=>x(t,t=>t[0]));if(Wrt(c)&&c[0][0]&&!i){if(r=c[0],1===(r=vM(r)).length&&LF(r[0].categoryMatches)){let t=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{let e=dz(r,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){var t=Hrt.call(this,a,l,vnt,s);return"object"!=typeof t&&0===t}}},Ae(Wrt,"isLL1Sequence"),Ae(Yrt,"initATNSimulator"),Ae(Hrt,"adaptivePredict"),Ae(Vrt,"performLookahead"),Ae(Xrt,"computeLookaheadTarget"),Ae(Krt,"reportLookaheadAmbiguity"),Ae(Zrt,"buildAmbiguityError"),Ae(Qrt,"getProductionDslName"),Ae(Jrt,"buildAdaptivePredictError"),Ae(tnt,"getExistingTargetState"),Ae(ent,"computeReachSet"),Ae(rnt,"getReachableTarget"),Ae(nnt,"getUniqueAlt"),Ae(ant,"newDFAState"),Ae(snt,"addDFAEdge"),Ae(ont,"addDFAState"),Ae(lnt,"computeStartState"),Ae(cnt,"closure"),Ae(hnt,"getEpsilonTarget"),Ae(unt,"hasConfigInRuleStopState"),Ae(dnt,"allConfigsInRuleStopStates"),Ae(pnt,"hasConflictTerminatingPrediction"),Ae(gnt,"getConflictingAltSets"),Ae(fnt,"hasConflictingAltSet"),Ae(mnt,"hasStateAssociatedWithOneAlt")}),Zit=i(()=>{Kit()}),Qit=i(()=>{function t(t){return"string"==typeof t}var e,r,n,i;function a(t){return"string"==typeof t}function s(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}function o(t){return"number"==typeof t&&r.MIN_VALUE<=t&&t<=r.MAX_VALUE}function l(t,e){return{line:t=t===Number.MAX_VALUE?Tnt.MAX_VALUE:t,character:e=e===Number.MAX_VALUE?Tnt.MAX_VALUE:e}}function c(t){return me.objectLiteral(t)&&me.uinteger(t.line)&&me.uinteger(t.character)}function h(t,e,r,n){if(me.uinteger(t)&&me.uinteger(e)&&me.uinteger(r)&&me.uinteger(n))return{start:_nt.create(t,e),end:_nt.create(r,n)};if(_nt.is(t)&&_nt.is(e))return{start:t,end:e};throw new Error(`Range#create called with invalid arguments[${t}, ${e}, ${r}, ${n}]`)}function u(t){return me.objectLiteral(t)&&_nt.is(t.start)&&_nt.is(t.end)}function d(t,e){return{uri:t,range:e}}function p(t){return me.objectLiteral(t)&&Ent.is(t.range)&&(me.string(t.uri)||me.undefined(t.uri))}function g(t,e,r,n){return{targetUri:t,targetRange:e,targetSelectionRange:r,originSelectionRange:n}}function f(t){return me.objectLiteral(t)&&Ent.is(t.targetRange)&&me.string(t.targetUri)&&Ent.is(t.targetSelectionRange)&&(Ent.is(t.originSelectionRange)||me.undefined(t.originSelectionRange))}function m(t,e,r,n){return{red:t,green:e,blue:r,alpha:n}}function y(t){return me.objectLiteral(t)&&me.numberRange(t.red,0,1)&&me.numberRange(t.green,0,1)&&me.numberRange(t.blue,0,1)&&me.numberRange(t.alpha,0,1)}function v(t,e){return{range:t,color:e}}function x(t){return me.objectLiteral(t)&&Ent.is(t.range)&&Ant.is(t.color)}function b(t,e,r){return{label:t,textEdit:e,additionalTextEdits:r}}function w(t){return me.objectLiteral(t)&&me.string(t.label)&&(me.undefined(t.textEdit)||$nt.is(t))&&(me.undefined(t.additionalTextEdits)||me.typedArray(t.additionalTextEdits,$nt.is))}function k(t,e,r,n,i,a){return t={startLine:t,endLine:e},me.defined(r)&&(t.startCharacter=r),me.defined(n)&&(t.endCharacter=n),me.defined(i)&&(t.kind=i),me.defined(a)&&(t.collapsedText=a),t}function T(t){return me.objectLiteral(t)&&me.uinteger(t.startLine)&&me.uinteger(t.startLine)&&(me.undefined(t.startCharacter)||me.uinteger(t.startCharacter))&&(me.undefined(t.endCharacter)||me.uinteger(t.endCharacter))&&(me.undefined(t.kind)||me.string(t.kind))}function _(t,e){return{location:t,message:e}}function E(t){return me.defined(t)&&Snt.is(t.location)&&me.string(t.message)}function S(t){return me.objectLiteral(t)&&me.string(t.href)}function C(t,e,r,n,i,a){return t={range:t,message:e},me.defined(r)&&(t.severity=r),me.defined(n)&&(t.code=n),me.defined(i)&&(t.source=i),me.defined(a)&&(t.relatedInformation=a),t}function A(t){var e;return me.defined(t)&&Ent.is(t.range)&&me.string(t.message)&&(me.number(t.severity)||me.undefined(t.severity))&&(me.integer(t.code)||me.string(t.code)||me.undefined(t.code))&&(me.undefined(t.codeDescription)||me.string(null==(e=t.codeDescription)?void 0:e.href))&&(me.string(t.source)||me.undefined(t.source))&&(me.undefined(t.relatedInformation)||me.typedArray(t.relatedInformation,Rnt.is))}function L(t,e,...r){return t={title:t,command:e},me.defined(r)&&0me.string(t.kind)?Gnt.is(t)||Wnt.is(t)||Ynt.is(t):jnt.is(t)))}function J(t){return{uri:t}}function tt(t){return me.defined(t)&&me.string(t.uri)}function et(t,e){return{uri:t,version:e}}function rt(t){return me.defined(t)&&me.string(t.uri)&&me.integer(t.version)}function nt(t,e){return{uri:t,version:e}}function it(t){return me.defined(t)&&me.string(t.uri)&&(null===t.version||me.integer(t.version))}function at(t,e,r,n){return{uri:t,languageId:e,version:r,text:n}}function st(t){return me.defined(t)&&me.string(t.uri)&&me.string(t.languageId)&&me.integer(t.version)&&me.string(t.text)}function ot(t){return t===n.PlainText||t===n.Markdown}function lt(t){var e=t;return me.objectLiteral(t)&&Qnt.is(e.kind)&&me.string(e.value)}function ct(t,e,r){return{newText:t,insert:e,replace:r}}function ht(t){return t&&me.string(t.newText)&&Ent.is(t.insert)&&Ent.is(t.replace)}function ut(t){return t&&(me.string(t.detail)||void 0===t.detail)&&(me.string(t.description)||void 0===t.description)}function dt(t){return{label:t}}function pt(t,e){return{items:t||[],isIncomplete:!!e}}function gt(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function ft(t){return me.string(t)||me.objectLiteral(t)&&me.string(t.language)&&me.string(t.value)}function mt(t){var e=t;return!!e&&me.objectLiteral(e)&&(Jnt.is(e.contents)||oit.is(e.contents)||me.typedArray(e.contents,oit.is))&&(void 0===t.range||Ent.is(t.range))}function yt(t,e){return e?{label:t,documentation:e}:{label:t}}function vt(t,e,...r){return t={label:t},me.defined(e)&&(t.documentation=e),me.defined(r)?t.parameters=r:t.parameters=[],t}function xt(t,e){return t={range:t},me.number(e)&&(t.kind=e),t}function bt(t,e,r,n,i){return t={name:t,kind:e,location:{uri:n,range:r}},i&&(t.containerName=i),t}function wt(t,e,r,n){return void 0!==n?{name:t,kind:e,location:{uri:r,range:n}}:{name:t,kind:e,location:{uri:r}}}function kt(t,e,r,n,i,a){return t={name:t,detail:e,kind:r,range:n,selectionRange:i},void 0!==a&&(t.children=a),t}function Tt(t){return t&&me.string(t.name)&&me.number(t.kind)&&Ent.is(t.range)&&Ent.is(t.selectionRange)&&(void 0===t.detail||me.string(t.detail))&&(void 0===t.deprecated||me.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}function _t(t,e,r){return t={diagnostics:t},null!=e&&(t.only=e),null!=r&&(t.triggerKind=r),t}function Et(t){return me.defined(t)&&me.typedArray(t.diagnostics,Bnt.is)&&(void 0===t.only||me.typedArray(t.only,me.string))&&(void 0===t.triggerKind||t.triggerKind===vit.Invoked||t.triggerKind===vit.Automatic)}function St(t,e,r){let n={title:t},i=!0;return"string"==typeof e?(i=!1,n.kind=e):Fnt.is(e)?n.command=e:n.edit=e,i&&void 0!==r&&(n.kind=r),n}function Ct(t){return t&&me.string(t.title)&&(void 0===t.diagnostics||me.typedArray(t.diagnostics,Bnt.is))&&(void 0===t.kind||me.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Fnt.is(t.command))&&(void 0===t.isPreferred||me.boolean(t.isPreferred))&&(void 0===t.edit||Hnt.is(t.edit))}function At(t,e){return t={range:t},me.defined(e)&&(t.data=e),t}function Lt(t){return me.defined(t)&&Ent.is(t.range)&&(me.undefined(t.command)||Fnt.is(t.command))}function Nt(t,e){return{tabSize:t,insertSpaces:e}}function It(t){return me.defined(t)&&me.uinteger(t.tabSize)&&me.boolean(t.insertSpaces)}function Mt(t,e,r){return{range:t,target:e,data:r}}function Rt(t){return me.defined(t)&&Ent.is(t.range)&&(me.undefined(t.target)||me.string(t.target))}function Dt(t,e){return{range:t,parent:e}}function Ot(t){return me.objectLiteral(t)&&Ent.is(t.range)&&(void 0===t.parent||i.is(t.parent))}function Pt(t){return me.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}function Bt(t,e){return{range:t,text:e}}function Ft(t){return null!=t&&Ent.is(t.range)&&me.string(t.text)}function $t(t,e,r){return{range:t,variableName:e,caseSensitiveLookup:r}}function zt(t){return null!=t&&Ent.is(t.range)&&me.boolean(t.caseSensitiveLookup)&&(me.string(t.variableName)||void 0===t.variableName)}function qt(t,e){return{range:t,expression:e}}function Ut(t){return null!=t&&Ent.is(t.range)&&(me.string(t.expression)||void 0===t.expression)}function jt(t,e){return{frameId:t,stoppedLocation:e}}function Gt(t){return me.defined(t)&&Ent.is(t.stoppedLocation)}function Wt(t){return 1===t||2===t}function Yt(t){return{value:t}}function Ht(t){return me.objectLiteral(t)&&(void 0===t.tooltip||me.string(t.tooltip)||Jnt.is(t.tooltip))&&(void 0===t.location||Snt.is(t.location))&&(void 0===t.command||Fnt.is(t.command))}function Vt(t,e,r){return t={position:t,label:e},void 0!==r&&(t.kind=r),t}function Xt(t){return me.objectLiteral(t)&&_nt.is(t.position)&&(me.string(t.label)||me.typedArray(t.label,Rit.is))&&(void 0===t.kind||Mit.is(t.kind))&&void 0===t.textEdits||me.typedArray(t.textEdits,$nt.is)&&(void 0===t.tooltip||me.string(t.tooltip)||Jnt.is(t.tooltip))&&(void 0===t.paddingLeft||me.boolean(t.paddingLeft))&&(void 0===t.paddingRight||me.boolean(t.paddingRight))}function Kt(t){return{kind:"snippet",value:t}}function Zt(t,e,r,n){return{insertText:t,filterText:e,range:r,command:n}}function Qt(t){return{items:t}}function Jt(t,e){return{range:t,text:e}}function te(t,e){return{triggerKind:t,selectedCompletionInfo:e}}function ee(t){return me.objectLiteral(t)&&wnt.is(t.uri)&&me.string(t.name)}function re(t,e,r,n){return new jit(t,e,r,n)}function ne(t){return!!(me.defined(t)&&me.string(t.uri)&&(me.undefined(t.languageId)||me.string(t.languageId))&&me.uinteger(t.lineCount)&&me.func(t.getText)&&me.func(t.positionAt)&&me.func(t.offsetAt))}function ie(e,t){let r=e.getText(),n=D(t,(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),i=r.length;for(let t=n.length-1;0<=t;t--){var a=n[t],s=e.offsetAt(a.range.start),o=e.offsetAt(a.range.end);if(!(o<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+a.newText+r.substring(o,r.length),i=s}return r}function D(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);D(s,i),D(o,i);let t=0,e=0,r=0;for(;tt?n=i:r=i+1}var a=r-1;return _nt.create(a,t-e[a])}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],r=t.line+1{Qit(),BY(),fH(),Git=class{static{Ae(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]}buildRootNode(t){return this.rootNode=new Xit(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){var e=new Hit;return e.grammarSource=t,e.root=this.rootNode,this.current.content.push(e),this.nodeStack.push(e),e}buildLeafNode(t,e){return(t=new Yit(t.startOffset,t.image.length,ZY(t),t.tokenType,!1)).grammarSource=e,t.root=this.rootNode,this.current.content.push(t),t}removeNode(t){var e=t.container;e&&0<=(t=e.content.indexOf(t))&&e.content.splice(t,1)}construct(t){var e=this.current;"string"==typeof t.$type&&(this.current.astNode=t),t.$cstNode=e,0===(t=this.nodeStack.pop())?.content.length&&this.removeNode(t)}addHiddenTokens(t){for(var e of t)(e=new Yit(e.startOffset,e.image.length,ZY(e),e.tokenType,!0)).root=this.rootNode,this.addHiddenToken(this.rootNode,e)}addHiddenToken(e,r){var{offset:n,end:i}=r;for(let t=0;t{Jet(),Zit(),cX(),UK(),EX(),Jit(),eat=Symbol("Datatype"),Ae(tat,"isDataTypeNode"),rat=Ae(t=>t.endsWith("​")?t:t+"​","withRuleSuffix"),nat=class{static{Ae(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.lexer=t.parser.Lexer;var e=this.lexer.definition;this.wrapper=new cat(e,Object.assign(Object.assign({},t.parser.ParserConfig),{errorMessageProvider:t.parser.ParserErrorMessageProvider}))}alternatives(t,e){this.wrapper.wrapOr(t,e)}optional(t,e){this.wrapper.wrapOption(t,e)}many(t,e){this.wrapper.wrapMany(t,e)}atLeastOne(t,e){this.wrapper.wrapAtLeastOne(t,e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},iat=class extends nat{static{Ae(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new Git,this.stack=[],this.assignmentMap=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,e){var r=t.fragment?void 0:_K(t)?eat:LK(t),r=this.wrapper.DEFINE_RULE(rat(t.name),this.startImplementation(r,e).bind(this));return t.entry&&(this.mainRule=r),r}parse(t){this.nodeBuilder.buildRootNode(t);var t=this.lexer.tokenize(t),e=(this.wrapper.input=t.tokens,this.mainRule.call(this.wrapper,{}));return this.nodeBuilder.addHiddenTokens(t.hidden),this.unorderedGroups.clear(),{value:e,lexerErrors:t.errors,parserErrors:this.wrapper.errors}}startImplementation(n,i){return t=>{var e;this.isRecording()||(this.stack.push(e={$type:n}),n===eat&&(e.value=""));let r;try{r=i(t)}catch{r=void 0}return r=this.isRecording()||void 0!==r?r:this.construct()}}consume(e,r,n){if(e=this.wrapper.wrapConsume(e,r),!this.isRecording()&&this.isValidToken(e)){var r=this.nodeBuilder.buildLeafNode(e,n),{assignment:t,isCrossRef:i}=this.getAssignment(n),a=this.current;if(t){var s=iV(n)?e.image:this.converter.convert(e.image,r);this.assign(t.operator,t.feature,s,r,i)}else if(tat(a)){let t=e.image;iV(n)||(t=this.converter.convert(t,r).toString()),a.value+=t}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&"number"==typeof t.endOffset&&!isNaN(t.endOffset)}subrule(t,e,r,n){let i;this.isRecording()||(i=this.nodeBuilder.buildCompositeNode(r)),t=this.wrapper.wrapSubrule(t,e,n),!this.isRecording()&&i&&0{var e=this.keepStackSize();try{r(t)}finally{this.resetStackSize(e)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){var t=this.elementStack.length;return this.stackSize=t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,e,r){this.wrapper.wrapConsume(t,e),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(t,e,r,n){this.before(r),this.wrapper.wrapSubrule(t,e,n),this.after(r)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){this.isRecording()||0<=(t=this.elementStack.lastIndexOf(t))&&this.elementStack.splice(t)}get currIdx(){return this.wrapper.currIdx}},lat={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new sat},cat=class extends Het{static{Ae(this,"ChevrotainWrapper")}constructor(t,e){var r=e&&"maxLookahead"in e;super(t,Object.assign(Object.assign(Object.assign({},lat),{lookaheadStrategy:r?new jtt({maxLookahead:e.maxLookahead}):new xnt}),e))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,e){return this.RULE(t,e)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,e){return this.consume(t,e)}wrapSubrule(t,e,r){return this.subrule(t,e,{ARGS:[r]})}wrapOr(t,e){this.or(t,e)}wrapOption(t,e){this.option(t,e)}wrapMany(t,e){this.many(t,e)}wrapAtLeastOne(t,e){this.atLeastOne(t,e)}}});function uat(t,e,r){return dat({parser:e,tokens:r,rules:new Map,ruleNames:new Map},t),e}function dat(t,e){let r=oK(e,!1),n=zY(e.rules).filter(UH).filter(t=>r.has(t));for(var i of n){var a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});a.rules.set(i.name,t.parser.rule(i,pat(a,i.definition)))}}function pat(e,r,t=!1){let n;if(iV(r))n=Tat(e,r);else if(ZH(r))n=gat(e,r);else if(JH(r))n=pat(e,r.terminal);else if(eV(r))n=kat(e,r);else if(oV(r))n=fat(e,r);else if(QH(r))n=vat(e,r);else if(uV(r))n=xat(e,r);else if(nV(r))n=bat(e,r);else{if(!rV(r))throw new yH(r.$cstNode,"Unexpected element type: "+r.$type);{let t=e.consume++;n=Ae(()=>e.parser.consume(t,wJ,r),"method")}}return _at(e,t?void 0:wat(r),n,r.cardinality)}function gat(t,e){let r=LK(e);return()=>t.parser.action(r,e)}function fat(n,i){let a=i.rule.ref;if(UH(a)){let e=n.subrule++,r=0({});return t=>n.parser.subrule(e,Eat(n,a),i,r(t))}if(HH(a)){let t=n.consume++,e=Cat(n,a.name);return()=>n.parser.consume(t,e,i)}if(!a)throw new yH(i.$cstNode,"Undefined rule type: "+i.$type);mH(a)}function mat(a,t){let s=t.map(t=>yat(t.value));return e=>{var r={};for(let t=0;te(t)||r(t)}if(IH(n)){let e=yat(n.left),r=yat(n.right);return t=>e(t)&&r(t)}if(FH(n)){let e=yat(n.value);return t=>!e(t)}if(qH(n)){let e=n.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if(NH(n)){let t=!!n.true;return()=>t}mH()}function vat(r,n){if(1===n.elements.length)return pat(r,n.elements[0]);{let t=[];for(var i of n.elements){var a={ALT:pat(r,i,!0)};(i=wat(i))&&(a.GATE=yat(i)),t.push(a)}let e=r.or++;return n=>r.parser.alternatives(e,t.map(t=>{let e={ALT:Ae(()=>t.ALT(n),"ALT")},r=t.GATE;return r&&(e.GATE=()=>r(n)),e}))}}function xat(s,t){if(1===t.elements.length)return pat(s,t.elements[0]);let e=[];for(var r of t.elements){var n={ALT:pat(s,r,!0)};(r=wat(r))&&(n.GATE=yat(r)),e.push(n)}let o=s.or++,l=Ae((t,e)=>`uGroup_${t}_`+e.getRuleStack().join("-"),"idFunc"),i=Ae(a=>s.parser.alternatives(o,e.map((e,r)=>{let t={ALT:Ae(()=>!0,"ALT")},n=s.parser,i=(t.ALT=()=>{var t;e.ALT(a),n.isRecording()||(t=l(o,n),n.unorderedGroups.get(t)||n.unorderedGroups.set(t,[]),"u"i(a):t.GATE=()=>!n.unorderedGroups.get(l(o,n))?.[r],t})),"alternatives"),a=_at(s,wat(t),i,"*");return t=>{a(t),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function bat(e,t){let r=t.elements.map(t=>pat(e,t));return e=>r.forEach(t=>t(e))}function wat(t){if(nV(t))return t.guardCondition}function kat(r,n,i=n.terminal){if(i){if(oV(i)&&UH(i.rule.ref)){let e=r.subrule++;return t=>r.parser.subrule(e,Eat(r,i.rule.ref),n,t)}if(oV(i)&&HH(i.rule.ref)){let t=r.consume++,e=Cat(r,i.rule.ref.name);return()=>r.parser.consume(t,e,n)}if(iV(i)){let t=r.consume++,e=Cat(r,i.value);return()=>r.parser.consume(t,e,n)}throw new Error("Could not build cross reference parser")}if(!n.type.ref)throw new Error("Could not resolve reference to type: "+n.type.$refText);var t=vK(n.type.ref)?.terminal;if(t)return kat(r,n,t);throw new Error("Could not find name assignment for type: "+LK(n.type.ref))}function Tat(t,e){let r=t.consume++,n=t.tokens[e.value];if(n)return()=>t.parser.consume(r,n,e);throw new Error("Could not find token for keyword: "+e.value)}function _at(n,t,i,e){let a=t&&yat(t);if(!e){if(a){let e=n.or++;return t=>n.parser.alternatives(e,[{ALT:Ae(()=>i(t),"ALT"),GATE:Ae(()=>a(t),"GATE")},{ALT:qet(),GATE:Ae(()=>!a(t),"GATE")}])}return i}if("*"===e){let e=n.many++;return t=>n.parser.many(e,{DEF:Ae(()=>i(t),"DEF"),GATE:a?()=>a(t):void 0})}if("+"===e){let r=n.many++;if(a){let e=n.or++;return t=>n.parser.alternatives(e,[{ALT:Ae(()=>n.parser.atLeastOne(r,{DEF:Ae(()=>i(t),"DEF")}),"ALT"),GATE:Ae(()=>a(t),"GATE")},{ALT:qet(),GATE:Ae(()=>!a(t),"GATE")}])}return t=>n.parser.atLeastOne(r,{DEF:Ae(()=>i(t),"DEF")})}if("?"===e){let e=n.optional++;return t=>n.parser.optional(e,{DEF:Ae(()=>i(t),"DEF"),GATE:a?()=>a(t):void 0})}mH()}function Eat(t,e){if(e=Sat(t,e),t=t.rules.get(e))return t;throw new Error(`Rule "${e}" not found."`)}function Sat(n,i){if(UH(i))return i.name;if(n.ruleNames.has(i))return n.ruleNames.get(i);{let t=i,e=t.$container,r=i.$type;for(;!UH(e);)(nV(e)||QH(e)||uV(e))&&(r=e.elements.indexOf(t).toString()+":"+r),e=(t=e).$container;return r=e.name+":"+r,n.ruleNames.set(i,r),r}}function Cat(t,e){if(t=t.tokens[e])return t;throw new Error(`Token "${e}" not found."`)}var Aat=i(()=>{Jet(),cX(),vH(),YY(),UK(),Ae(uat,"createParser"),Ae(dat,"buildRules"),Ae(pat,"buildElement"),Ae(gat,"buildAction"),Ae(fat,"buildRuleCall"),Ae(mat,"buildRuleCallPredicate"),Ae(yat,"buildPredicate"),Ae(vat,"buildAlternatives"),Ae(xat,"buildUnorderedGroup"),Ae(bat,"buildGroup"),Ae(wat,"getGuardCondition"),Ae(kat,"buildCrossReference"),Ae(Tat,"buildKeyword"),Ae(_at,"wrap"),Ae(Eat,"getRule"),Ae(Sat,"getRuleName"),Ae(Cat,"getToken")});function Lat(t){var e=t.Grammar,r=t.parser.Lexer;return uat(e,t=new oat(t),r.definition),t.finalize(),t}var Nat=i(()=>{hat(),Aat(),Ae(Lat,"createCompletionParser")});function Iat(t){return(t=Mat(t)).finalize(),t}function Mat(t){var e=t.Grammar,r=t.parser.Lexer;return uat(e,new iat(t),r.definition)}var Rat,Dat,Oat,Pat=i(()=>{hat(),Aat(),Ae(Iat,"createLangiumParser"),Ae(Mat,"prepareLangiumParser")}),Bat=i(()=>{Jet(),cX(),EX(),UK(),nK(),YY(),Rat=class{static{Ae(this,"DefaultTokenBuilder")}buildTokens(t,e){let r=zY(oK(t,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,e);return n.forEach(t=>{var e=t.PATTERN;"object"==typeof e&&e&&"test"in e&&VX(e)?i.unshift(t):i.push(t)}),i}buildTerminalTokens(t){return t.filter(HH).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){var e=MK(t),r=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,r={name:t.name,PATTERN:r,LINE_BREAKS:!0};return t.hidden&&(r.GROUP=VX(e)?rJ.SKIPPED:"hidden"),r}requiresCustomPattern(t){return!!t.flags.includes("u")||!(!t.source.includes("?<=")&&!t.source.includes("?(r.lastIndex=e,r.exec(t))}buildKeywordTokens(t,e,r){return t.filter(UH).flatMap(t=>yX(t).filter(iV)).distinct(t=>t.value).toArray().sort((t,e)=>e.value.length-t.value.length).map(t=>this.buildKeywordToken(t,e,!!r?.caseInsensitive))}buildKeywordToken(t,e,r){return{name:t.value,PATTERN:this.buildKeywordPattern(t,r),LONGER_ALT:this.findLongerAlt(t,e)}}buildKeywordPattern(t,e){return e?new RegExp(KX(t.value)):t.value}findLongerAlt(n,t){return t.reduce((t,e)=>{var r=e?.PATTERN;return r?.source&&ZX("^"+r.source+"$",n.value)&&t.push(e),t},[])}}}),Fat=i(()=>{function t(e){let r="";for(let t=1;t{var e,r;function n(){if(void 0===e)throw new Error("No runtime abstraction layer installed");return e}function i(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");e=t}Object.defineProperty(t,"__esModule",{value:!0}),Ae(n,"RAL"),r=n,Ae(i,"install"),r.install=i,t.default=n}),zat=C(t=>{function e(t){return!0===t||!1===t}function r(t){return"string"==typeof t||t instanceof String}function n(t){return"number"==typeof t||t instanceof Number}function i(t){return t instanceof Error}function a(t){return"function"==typeof t}function s(t){return Array.isArray(t)}function o(t){return s(t)&&t.every(t=>r(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,Ae(e,"boolean"),t.boolean=e,Ae(r,"string"),t.string=r,Ae(n,"number"),t.number=n,Ae(i,"error"),t.error=i,Ae(a,"func"),t.func=a,Ae(s,"array"),t.array=s,Ae(o,"stringArray"),t.stringArray=o}),qat=C(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var s=$at();{var r=e.Event={};let t={dispose(){}};r.None=function(){return t}}var i=class{static{Ae(this,"CallbackList")}add(t,e=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(e),Array.isArray(r)&&r.push({dispose:Ae(()=>this.remove(t,e),"dispose")})}remove(n,i=null){if(this._callbacks){let r=!1;for(let t=0,e=this._callbacks.length;t{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,e);let n={dispose:Ae(()=>{this._callbacks&&(this._callbacks.remove(t,e),n.dispose=a._noop,this._options)&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)},"dispose")};return Array.isArray(r)&&r.push(n),n}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};(e.Emitter=r)._noop=function(){}}),Uat=C(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e,r,n=$at(),i=zat(),a=qat();function s(t){return t&&(t===r.None||t===r.Cancelled||i.boolean(t.isCancellationRequested)&&!!t.onCancellationRequested)}(r=e||(t.CancellationToken=e={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),Ae(s,"is"),r.is=s;var o=Object.freeze(function(t,e){let r=(0,n.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),l=class{static{Ae(this,"MutableToken")}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?o:(this._emitter||(this._emitter=new a.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}},c=class{static{Ae(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=e.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=e.None}};t.CancellationTokenSource=c}),jat={},Gat=i(()=>{I(jat,M(Uat(),1))});function Wat(){return new Promise(t=>{"u"{Gat(),Ae(Wat,"delayNextTick"),Kat=0,Zat=10,Ae(Yat,"startCancelableOperation"),Ae(Hat,"setInterruptionPeriod"),Qat=Symbol("OperationCancelled"),Ae(Vat,"isOperationCancelled"),Ae(Xat,"interruptAndCheck"),Jat=class{static{Ae(this,"Deferred")}constructor(){this.promise=new Promise((e,r)=>{this.resolve=t=>(e(t),this),this.reject=t=>(r(t),this)})}}});function est(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);est(s,i),est(o,i);let t=0,e=0,r=0;for(;tr.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function ast(t){var e=ist(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var sst,ost,lst,cst,hst,ust,dst,pst,gst,fst=i(()=>{function t(t,e,r,n){return new sst(t,e,r,n)}function e(t,e,r){if(t instanceof sst)return t.update(e,r),t;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(t,e){let r=t.getText(),n=est(e.map(ast),(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),i=0,a=[];for(var s of n){var o=t.offsetAt(s.range.start);if(oi&&a.push(r.substring(i,o)),s.newText.length&&a.push(s.newText),i=t.offsetAt(s.range.end)}return a.push(r.substr(i)),a.join("")}var n;sst=class i{static{Ae(this,"FullTextDocument")}constructor(t,e,r,n){this._uri=t,this._languageId=e,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){var e;return t?(e=this.offsetAt(t.start),t=this.offsetAt(t.end),this._content.substring(e,t)):this._content}update(t,e){for(var a of t)if(i.isIncremental(a)){var s=ist(a.range),o=this.offsetAt(s.start),l=this.offsetAt(s.end);this._content=this._content.substring(0,o)+a.text+this._content.substring(l,this._content.length);let r=Math.max(s.start.line,0),t=Math.max(s.end.line,0),n=this._lineOffsets,i=rst(a.text,!1,o);if(t-r===i.length)for(let t=0,e=i.length;tt?n=i:r=i+1}var a=r-1;return{line:a,character:(t=this.ensureBeforeEOL(t,e[a]))-e[a]}}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],t.character<=0?e:(r=t.line+1{var r={470:t=>{function d(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function a(t,e){for(var r,n="",i=0,a=-1,s=0,o=0;o<=t.length;++o){if(o{for(var r in e)h.o(e,r)&&!h.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var t={};{let n,r=((h.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(t),h.d(t,{URI:Ae(()=>b,"URI"),Utils:Ae(()=>v,"Utils")}),"object"==typeof process?n="win32"===process.platform:"object"==typeof navigator&&(n=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),i=/^\//,a=/^\/\//;function u(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!r.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!i.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(a.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}Ae(u,"s");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class b{static{Ae(this,"f")}static isUri(t){return t instanceof b||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,a=!1){"object"==typeof t?(this.scheme=t.scheme||"",this.authority=t.authority||"",this.path=t.path||"",this.query=t.query||"",this.fragment=t.fragment||""):(this.scheme=t||a?t:"file",this.authority=e||"",this.path=function(t,e){switch(t){case"https":case"http":case"file":e?"/"!==e[0]&&(e="/"+e):e="/"}return e}(this.scheme,r||""),this.query=n||"",this.fragment=i||"",u(this,a))}get fsPath(){return g(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:a}=t;return void 0===e?e=this.scheme:null===e&&(e=""),void 0===r?r=this.authority:null===r&&(r=""),void 0===n?n=this.path:null===n&&(n=""),void 0===i?i=this.query:null===i&&(i=""),void 0===a?a=this.fragment:null===a&&(a=""),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&a===this.fragment?this:new w(e,r,n,i,a)}static parse(t,e=!1){return(t=s.exec(t))?new w(t[2]||"",y(t[4]||""),y(t[5]||""),y(t[7]||""),y(t[9]||""),e):new w("","","","","")}static file(t){let e="";var r;return"/"===(t=n?t.replace(/\\/g,"/"):t)[0]&&"/"===t[1]&&(t=-1===(r=t.indexOf("/",2))?(e=t.substring(2),"/"):(e=t.substring(2,r),t.substring(r)||"/")),new w("file",e,t,"","")}static from(t){return u(t=new w(t.scheme,t.authority,t.path,t.query,t.fragment),!0),t}toString(t=!1){return f(this,t)}toJSON(){return this}static revive(t){var e;return t&&(t instanceof b?t:((e=new w(t))._formatted=t.external,e._fsPath=t._sep===o?t.fsPath:null,e))}}let o=n?1:void 0;class w extends b{static{Ae(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath}toString(t=!1){return t?f(this,!0):(this._formatted||(this._formatted=f(this,!1)),this._formatted)}toJSON(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=o),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}let l={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function d(e,r,n){let i,a=-1;for(let t=0;tm(t)):t}Ae(y,"C");var v,x=h(470);let c=x.posix||x;(x=v=v||{}).joinPath=function(t,...e){return t.with({path:c.join(t.path,...e)})},x.resolvePath=function(t,...e){let r=t.path,n=!1,i=("/"!==r[0]&&(r="/"+r,n=!0),c.resolve(r,...e));return n&&"/"===i[0]&&!t.authority&&(i=i.substring(1)),t.with({path:i})},x.dirname=function(t){if(0===t.path.length||"/"===t.path)return t;let e=c.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},x.basename=function(t){return c.basename(t.path)},x.extname=function(t){return c.extname(t.path)}}({URI:lst,Utils:cst}=t)}),yst=i(()=>{function t(t,e){return t?.toString()===e?.toString()}function e(t,e){let r="string"==typeof t?t:t.path,n="string"==typeof e?e:e.path,i=r.split("/").filter(t=>00{var t;fst(),vst(),Gat(),YY(),yst(),(t=ust=ust||{})[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated",dst=class{static{Ae(this,"DefaultLangiumDocumentFactory")}constructor(t){this.serviceRegistry=t.ServiceRegistry,this.textDocuments=t.workspace.TextDocuments,this.fileSystemProvider=t.workspace.FileSystemProvider}async fromUri(t,e=jat.CancellationToken.None){var r=await this.fileSystemProvider.readFile(t);return this.createAsync(t,r,e)}fromTextDocument(t,e,r){return e=e??lst.parse(t.uri),r?this.createAsync(e,t,r):this.create(e,t)}fromString(t,e,r){return r?this.createAsync(e,t,r):this.create(e,t)}fromModel(t,e){return this.create(e,{$model:t})}create(t,e){var r;return"string"==typeof e?(r=this.parse(t,e),this.createLangiumDocument(r,t,void 0,e)):"$model"in e?(r={value:e.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(r,t)):(r=this.parse(t,e.getText()),this.createLangiumDocument(r,t,e))}async createAsync(t,e,r){var n;return"string"==typeof e?(n=await this.parseAsync(t,e,r),this.createLangiumDocument(n,t,void 0,e)):(n=await this.parseAsync(t,e.getText(),r),this.createLangiumDocument(n,t,e))}createLangiumDocument(e,r,t,n){let i;if(t)i={parseResult:e,uri:r,state:ust.Parsed,references:[],textDocument:t};else{let t=this.createTextDocumentGetter(r,n);i={parseResult:e,uri:r,state:ust.Parsed,references:[],get textDocument(){return t()}}}return e.value.$document=i}async update(t,e){var r=null==(r=t.parseResult.value.$cstNode)?void 0:r.root.fullText,n=null==(n=this.textDocuments)?void 0:n.get(t.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(t.uri);return n?Object.defineProperty(t,"textDocument",{value:n}):(n=this.createTextDocumentGetter(t.uri,i),Object.defineProperty(t,"textDocument",{get:n})),r!==i&&(t.parseResult=await this.parseAsync(t.uri,i,e),t.parseResult.value.$document=t),t.state=ust.Parsed,t}parse(t,e){return this.serviceRegistry.getServices(t).parser.LangiumParser.parse(e)}parseAsync(t,e,r){return this.serviceRegistry.getServices(t).parser.AsyncParser.parse(e,r)}createTextDocumentGetter(t,e){let r=this.serviceRegistry,n;return()=>n=n??ost.create(t.toString(),r.getServices(t).LanguageMetaData.languageId,0,e??"")}},pst=class{static{Ae(this,"DefaultLangiumDocuments")}constructor(t){this.documentMap=new Map,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory}get all(){return zY(this.documentMap.values())}addDocument(t){var e=t.uri.toString();if(this.documentMap.has(e))throw new Error(`A document with the URI '${e}' is already present.`);this.documentMap.set(e,t)}getDocument(t){return t=t.toString(),this.documentMap.get(t)}async getOrCreateDocument(t,e){return this.getDocument(t)||(t=await this.langiumDocumentFactory.fromUri(t,e),this.addDocument(t),t)}createDocument(t,e,r){return r?this.langiumDocumentFactory.fromString(e,t,r).then(t=>(this.addDocument(t),t)):(r=this.langiumDocumentFactory.fromString(e,t),this.addDocument(r),r)}hasDocument(t){return this.documentMap.has(t.toString())}invalidateDocument(t){return t=t.toString(),(t=this.documentMap.get(t))&&(t.state=ust.Changed,t.precomputedScopes=void 0,t.references=[],t.diagnostics=void 0),t}deleteDocument(t){var t=t.toString(),e=this.documentMap.get(t);return e&&(e.state=ust.Changed,this.documentMap.delete(t)),e}}}),xst=i(()=>{Gat(),BY(),EX(),tst(),vst(),gst=class{static{Ae(this,"DefaultLinker")}constructor(t){this.reflection=t.shared.AstReflection,this.langiumDocuments=()=>t.shared.workspace.LangiumDocuments,this.scopeProvider=t.references.ScopeProvider,this.astNodeLocator=t.workspace.AstNodeLocator}async link(e,t=jat.CancellationToken.None){for(var r of vX(e.parseResult.value))await Xat(t),bX(r).forEach(t=>this.doLink(t,e))}doLink(t,e){var r=t.reference;if(void 0===r._ref)try{var n,i=this.getCandidate(t);MY(i)?r._ref=i:(r._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)&&(n=this.loadAstNode(i),r._ref=n??this.createLinkingError(t,i)))}catch(e){r._ref=Object.assign(Object.assign({},t),{message:`An error occurred while resolving reference to '${r.$refText}': `+e})}e.references.push(r)}unlink(t){for(var e of t.references)delete e._ref,delete e._nodeDescription;t.references=[]}getCandidate(t){return this.scopeProvider.getScope(t).getElement(t.reference.$refText)??this.createLinkingError(t)}buildReference(r,n,t,e){let i=this,a={$refNode:t,$refText:e,get ref(){var t;if(LY(this._ref))return this._ref;if(IY(this._nodeDescription)){var e=i.loadAstNode(this._nodeDescription);this._ref=e??i.createLinkingError({reference:a,container:r,property:n},this._nodeDescription)}else if(void 0===this._ref){if((e=i.getLinkedNode({reference:a,container:r,property:n})).error&&gX(r).state{UK(),Ae(bst,"isNamed"),wst=class{static{Ae(this,"DefaultNameProvider")}getName(t){if(bst(t))return t.name}getNameNode(t){return dK(t.$cstNode,"name")}}}),Pst=i(()=>{UK(),BY(),EX(),fH(),YY(),yst(),kst=class{static{Ae(this,"DefaultReferences")}constructor(t){this.nameProvider=t.references.NameProvider,this.index=t.shared.workspace.IndexManager,this.nodeLocator=t.workspace.AstNodeLocator}findDeclaration(t){if(t){var e=yK(t),r=t.astNode;if(e&&r){if(NY(e=r[e.feature]))return e.ref;if(Array.isArray(e))for(var n of e)if(NY(n)&&n.$refNode&&n.$refNode.offset<=t.offset&&n.$refNode.end>=t.end)return n.ref}if(r&&(e=this.nameProvider.getNameNode(r))&&(e===t||KY(t,e)))return r}}findDeclarationNode(t){if((t=this.findDeclaration(t))?.$cstNode)return this.nameProvider.getNameNode(t)??t.$cstNode}findReferences(t,e){var r,n=[];e.includeDeclaration&&(r=this.getReferenceToSelf(t))&&n.push(r);let i=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return e.documentUri&&(i=i.filter(t=>hst.equals(t.sourceUri,e.documentUri))),n.push(...i),zY(n)}getReferenceToSelf(t){var e,r=this.nameProvider.getNameNode(t);if(r)return e=gX(t),t=this.nodeLocator.getAstNodePath(t),{sourceUri:e.uri,sourcePath:t,targetUri:e.uri,targetPath:t,segment:QY(r),local:!0}}}}),Bst=i(()=>{YY(),Tst=class{static{Ae(this,"MultiMap")}constructor(t){if(this.map=new Map,t)for(var[e,r]of t)this.add(e,r)}get size(){return WY.sum(zY(this.map.values()).map(t=>t.length))}clear(){this.map.clear()}delete(t,e){var r;return void 0===e?this.map.delete(t):!!((r=this.map.get(t))&&0<=(e=r.indexOf(e)))&&(1===r.length?this.map.delete(t):r.splice(e,1),!0)}get(t){return null!=(t=this.map.get(t))?t:[]}has(t,e){return void 0===e?this.map.has(t):!!(t=this.map.get(t))&&0<=t.indexOf(e)}add(t,e){return this.map.has(t)?this.map.get(t).push(e):this.map.set(t,[e]),this}addAll(t,e){return this.map.has(t)?this.map.get(t).push(...e):this.map.set(t,Array.from(e)),this}forEach(r){this.map.forEach((t,e)=>t.forEach(t=>r(t,e,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return zY(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return zY(this.map.keys())}values(){return zY(this.map.values()).flat()}entriesGroupedByKey(){return zY(this.map.entries())}},_st=class{static{Ae(this,"BiMap")}get size(){return this.map.size}constructor(t){if(this.map=new Map,this.inverse=new Map,t)for(var[e,r]of t)this.set(e,r)}clear(){this.map.clear(),this.inverse.clear()}set(t,e){return this.map.set(t,e),this.inverse.set(e,t),this}get(t){return this.map.get(t)}getKey(t){return this.inverse.get(t)}delete(t){var e=this.map.get(t);return void 0!==e&&(this.map.delete(t),this.inverse.delete(e),!0)}}}),Fst=i(()=>{Gat(),EX(),Bst(),tst(),Est=class{static{Ae(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async computeExports(t,e=jat.CancellationToken.None){return this.computeExportsForNode(t.parseResult.value,t,void 0,e)}async computeExportsForNode(t,e,r=mX,n=jat.CancellationToken.None){var i,a=[];this.exportNode(t,a,e);for(i of r(t))await Xat(n),this.exportNode(i,a,e);return a}exportNode(t,e,r){var n=this.nameProvider.getName(t);n&&e.push(this.descriptions.createDescription(t,n,r))}async computeLocalScopes(t,e=jat.CancellationToken.None){var r,n=t.parseResult.value,i=new Tst;for(r of yX(n))await Xat(e),this.processNode(r,t,i);return i}processNode(t,e,r){var n,i=t.$container;i&&(n=this.nameProvider.getName(t))&&r.add(i,this.descriptions.createDescription(t,n,e))}}}),$st=i(()=>{YY(),Sst=class{static{Ae(this,"StreamScope")}constructor(t,e,r){this.elements=t,this.outerScope=e,this.caseInsensitive=null!=(t=r?.caseInsensitive)&&t}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){return(this.caseInsensitive?this.elements.find(t=>t.name.toLowerCase()===e.toLowerCase()):this.elements.find(t=>t.name===e))||(this.outerScope?this.outerScope.getElement(e):void 0)}},Cst=class{static{Ae(this,"MapScope")}constructor(t,e,r){var n;this.elements=new Map,this.caseInsensitive=null!=(r=r?.caseInsensitive)&&r;for(n of t){var i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(i,n)}this.outerScope=e}getElement(t){var e=this.caseInsensitive?t.toLowerCase():t;return this.elements.get(e)||(this.outerScope?this.outerScope.getElement(t):void 0)}getAllElements(){let t=zY(this.elements.values());return t=this.outerScope?t.concat(this.outerScope.getAllElements()):t}},Ast={getElement(){},getAllElements(){return UY}}}),zst=i(()=>{Lst=class{static{Ae(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(t){this.toDispose.push(t)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(t=>t.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},Nst=class extends Lst{static{Ae(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(t){return this.throwIfDisposed(),this.cache.has(t)}set(t,e){this.throwIfDisposed(),this.cache.set(t,e)}get(t,e){return this.throwIfDisposed(),this.cache.has(t)?this.cache.get(t):e?(e=e(),this.cache.set(t,e),e):void 0}delete(t){return this.throwIfDisposed(),this.cache.delete(t)}clear(){this.throwIfDisposed(),this.cache.clear()}},Ist=class extends Lst{static{Ae(this,"ContextCache")}constructor(t){super(),this.cache=new Map,this.converter=t??(t=>t)}has(t,e){return this.throwIfDisposed(),this.cacheForContext(t).has(e)}set(t,e,r){this.throwIfDisposed(),this.cacheForContext(t).set(e,r)}get(t,e,r){return this.throwIfDisposed(),(t=this.cacheForContext(t)).has(e)?t.get(e):r?(r=r(),t.set(e,r),r):void 0}delete(t,e){return this.throwIfDisposed(),this.cacheForContext(t).delete(e)}clear(t){this.throwIfDisposed(),t?(t=this.converter(t),this.cache.delete(t)):this.cache.clear()}cacheForContext(t){let e=this.converter(t),r=this.cache.get(e);return r||(r=new Map,this.cache.set(e,r)),r}},Mst=class extends Ist{static{Ae(this,"DocumentCache")}constructor(t){super(t=>t.toString()),this.onDispose(t.workspace.DocumentBuilder.onUpdate((t,e)=>{var r;for(r of t.concat(e))this.clear(r)}))}},Rst=class extends Nst{static{Ae(this,"WorkspaceCache")}constructor(t){super(),this.onDispose(t.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}}}),qst=i(()=>{$st(),EX(),YY(),zst(),Dst=class{static{Ae(this,"DefaultScopeProvider")}constructor(t){this.reflection=t.shared.AstReflection,this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider,this.indexManager=t.shared.workspace.IndexManager,this.globalScopeCache=new Rst(t.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=gX(e.container).precomputedScopes;if(i){let t=e.container;do{var a=i.get(t);0this.reflection.isSubtype(t.type,n))),t=t.$container}while(t)}let s=this.getGlobalScope(n,e);for(let t=r.length-1;0<=t;t--)s=this.createScope(r[t],s);return s}createScope(t,e,r){return new Sst(zY(t),e,r)}createScopeForNodes(t,e,r){return t=zY(t).map(t=>{var e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)}).nonNullable(),new Sst(t,e,r)}getGlobalScope(t,e){return this.globalScopeCache.get(t,()=>new Cst(this.indexManager.allElements(t)))}}});function Ust(t){return"string"==typeof t.$comment}function jst(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}var Gst,Wst,Yst=i(()=>{mst(),BY(),EX(),UK(),Ae(Ust,"isAstNodeWithComment"),Ae(jst,"isIntermediateReference"),Gst=class{static{Ae(this,"DefaultJsonSerializer")}constructor(t){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=t.shared.workspace.LangiumDocuments,this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider,this.commentProvider=t.documentation.CommentProvider}serialize(t,r={}){let n=r?.replacer,i=Ae((t,e)=>this.replacer(t,e,r),"defaultReplacer"),e=n?(t,e)=>n(t,e,i):i;try{return this.currentDocument=gX(t),JSON.stringify(t,e,r?.space)}finally{this.currentDocument=void 0}}deserialize(t,e={}){return t=JSON.parse(t),this.linkNode(t,t,e),t}replacer(e,r,{refText:n,sourceText:i,textRegions:a,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(e)){if(NY(r)){var l=r.ref,n=n?r.$refText:void 0;if(l){let t=gX(l),e="";return this.currentDocument&&this.currentDocument!==t&&(e=o?o(t.uri,r):t.uri.toString()),o=this.astNodeLocator.getAstNodePath(l),{$ref:e+"#"+o,$refText:n}}return{$error:null!=(o=null==(l=r.error)?void 0:l.message)?o:"Could not resolve reference",$refText:n}}if(LY(r)){let t;return a&&(t=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),!e||r.$document)&&t?.$textRegion&&(t.$textRegion.documentURI=null==(l=this.currentDocument)?void 0:l.uri.toString()),i&&!e&&((t=t??Object.assign({},r)).$sourceText=null==(o=r.$cstNode)?void 0:o.text),s&&(t=t??Object.assign({},r),n=this.commentProvider.getComment(r))&&(t.$comment=n.replace(/\r/g,"")),t??r}return r}}addAstNodeRegionWithAssignmentsTo(n){let i=Ae(t=>({offset:t.offset,end:t.end,length:t.length,range:t.range}),"createDocumentSegment");if(n.$cstNode){let t=n.$textRegion=i(n.$cstNode),r=t.assignments={};return Object.keys(n).filter(t=>!t.startsWith("$")).forEach(t=>{var e=uK(n.$cstNode,t).map(i);0!==e.length&&(r[t]=e)}),n}}linkNode(e,r,n,t,i,a){for(var[s,o]of Object.entries(e))if(Array.isArray(o))for(let t=0;t{yst(),Wst=class{static{Ae(this,"DefaultServiceRegistry")}register(t){if(this.singleton||this.map){if(!this.map&&(this.map={},this.singleton)){for(var e of this.singleton.LanguageMetaData.fileExtensions)this.map[e]=this.singleton;this.singleton=void 0}for(var r of t.LanguageMetaData.fileExtensions)void 0!==this.map[r]&&this.map[r]!==t&&console.warn(`The file extension ${r} is used by multiple languages. It is now assigned to '${t.LanguageMetaData.languageId}'.`),this.map[r]=t}else this.singleton=t}getServices(t){if(void 0!==this.singleton)return this.singleton;if(void 0===this.map)throw new Error("The service registry is empty. Use `register` to register the services of a language.");var t=hst.extname(t),e=this.map[t];if(e)return e;throw new Error(`The service registry contains no services for the extension '${t}'.`)}get all(){return void 0!==this.singleton?[this.singleton]:void 0!==this.map?Object.values(this.map):[]}}});function Vst(t){return{code:t}}var Xst,Kst,Zst=i(()=>{Bst(),tst(),YY(),Ae(Vst,"diagnosticData"),(Xst=Xst||{}).all=["fast","slow","built-in"],Kst=class{static{Ae(this,"ValidationRegistry")}constructor(t){this.entries=new Tst,this.reflection=t.shared.AstReflection}register(t,e=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(var[n,i]of Object.entries(t))if(Array.isArray(i))for(var a of i)a={check:this.wrapValidationException(a,e),category:r},this.addEntry(n,a);else"function"==typeof i&&(i={check:this.wrapValidationException(i,e),category:r},this.addEntry(n,i))}wrapValidationException(t,i){return async(e,r,n)=>{try{await t.call(i,e,r,n)}catch(t){if(Vat(t))throw t;console.error("An error occurred during validation:",t),n=t instanceof Error?t.message:String(t),t instanceof Error&&t.stack&&console.error(t.stack),r("error","An error occurred during validation: "+n,{node:e})}}}addEntry(t,e){if("AstNode"===t)this.entries.add("AstNode",e);else for(var r of this.reflection.getAllSubTypes(t))this.entries.add(r,e)}getChecks(t,e){let r=zY(this.entries.get(t)).concat(this.entries.get("AstNode"));return(r=e?r.filter(t=>e.includes(t.category)):r).map(t=>t.check)}}});function Qst(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=dK(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=fK(t.node.$cstNode,t.keyword,t.index)),(e=e??t.node.$cstNode)?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Jst(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}var tot,eot,rot,not,iot,aot,sot,oot,lot,cot,hot=i(()=>{var t;Gat(),UK(),EX(),fH(),tst(),Zst(),tot=class{static{Ae(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData}async validateDocument(t,e={},r=jat.CancellationToken.None){var n=t.parseResult,i=[];if(await Xat(r),e.categories&&!e.categories.includes("built-in")||(this.processLexingErrors(n,i,e),!(e.stopAfterLexingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===eot.LexingError)||(this.processParsingErrors(n,i,e),e.stopAfterParsingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===eot.ParsingError))||(this.processLinkingErrors(t,i,e),e.stopAfterLinkingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===eot.LinkingError))))){try{i.push(...await this.validateAst(n.value,e,r))}catch(t){if(Vat(t))throw t;console.error("An error occurred during validation:",t)}await Xat(r)}return i}processLexingErrors(t,e,r){for(var n of t.lexerErrors)n={severity:Jst("error"),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:Vst(eot.LexingError),source:this.getSource()},e.push(n)}processParsingErrors(t,e,r){for(var n of t.parserErrors){let t;var i,a;isNaN(n.token.startOffset)?"previousToken"in n&&(a=n.previousToken,t=isNaN(a.startOffset)?{start:i={line:0,character:0},end:i}:{start:i={line:a.endLine-1,character:a.endColumn},end:i}):t=ZY(n.token),t&&(a={severity:Jst("error"),range:t,message:n.message,data:Vst(eot.ParsingError),source:this.getSource()},e.push(a))}}processLinkingErrors(t,e,r){for(var n of t.references){var i;(n=n.error)&&(i={node:n.container,property:n.property,index:n.index,data:{code:eot.LinkingError,containerType:n.container.$type,property:n.property,refText:n.reference.$refText}},e.push(this.toDiagnostic("error",n.message,i)))}}async validateAst(t,r,n=jat.CancellationToken.None){let i=[],a=Ae((t,e,r)=>{i.push(this.toDiagnostic(t,e,r))},"acceptor");return await Promise.all(vX(t).map(async t=>{var e;await Xat(n);for(e of this.validationRegistry.getChecks(t.$type,r.categories))await e(t,a,n)})),i}toDiagnostic(t,e,r){return{message:e,range:Qst(r),severity:Jst(t),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},Ae(Qst,"getDiagnosticRange"),Ae(Jst,"toDiagnosticSeverity"),(t=eot=eot||{}).LexingError="lexing-error",t.ParsingError="parsing-error",t.LinkingError="linking-error"}),uot=i(()=>{Gat(),BY(),EX(),fH(),tst(),yst(),rot=class{static{Ae(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(e,t,r=gX(e)){t=t??this.nameProvider.getName(e);var n=this.astNodeLocator.getAstNodePath(e);if(!t)throw new Error(`Node at path ${n} has no name.`);let i,a=Ae(()=>{var t;return i=i??QY(null!=(t=this.nameProvider.getNameNode(e))?t:e.$cstNode)},"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:QY(e.$cstNode),type:e.$type,documentUri:r.uri,path:n}}},not=class{static{Ae(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=jat.CancellationToken.None){let r=[],n=t.parseResult.value;for(var i of vX(n))await Xat(e),bX(i).filter(t=>!MY(t)).forEach(t=>{(t=this.createDescription(t))&&r.push(t)});return r}createDescription(t){var e,r=t.reference.$nodeDescription,n=t.reference.$refNode;if(r&&n)return{sourceUri:e=gX(t.container).uri,sourcePath:this.nodeLocator.getAstNodePath(t.container),targetUri:r.documentUri,targetPath:r.path,segment:QY(n),local:hst.equals(r.documentUri,e)}}}}),dot=i(()=>{iot=class{static{Ae(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(t){var e;return t.$container?(e=this.getAstNodePath(t.$container),t=this.getPathSegment(t),e+this.segmentSeparator+t):""}getPathSegment({$containerProperty:t,$containerIndex:e}){if(t)return void 0!==e?t+this.indexSeparator+e:t;throw new Error("Missing '$containerProperty' in AST node.")}getAstNode(t,e){return e.split(this.segmentSeparator).reduce((t,e)=>{var r,n;return t&&0!==e.length?0<(n=e.indexOf(this.indexSeparator))?(r=e.substring(0,n),n=parseInt(e.substring(n+1)),t[r]?.[n]):t[e]:t},t)}}}),pot=i(()=>{tst(),aot=class{static{Ae(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new Jat,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=t.ServiceRegistry}get ready(){return this._ready.promise}initialize(t){this.workspaceConfig=null!=(t=null==(t=t.capabilities.workspace)?void 0:t.configuration)&&t}async initialized(e){var t;if(this.workspaceConfig&&(e.register&&(t=this.serviceRegistry.all,e.register({section:t.map(t=>this.toSectionName(t.LanguageMetaData.languageId))})),e.fetchConfiguration)){let t=this.serviceRegistry.all.map(t=>({section:this.toSectionName(t.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((t,e)=>{this.updateSectionConfiguration(t.section,r[e])})}this._ready.resolve()}updateConfiguration(e){e.settings&&Object.keys(e.settings).forEach(t=>{this.updateSectionConfiguration(t,e.settings[t])})}updateSectionConfiguration(t,e){this.settings[t]=e}async getConfiguration(t,e){if(await this.ready,t=this.toSectionName(t),this.settings[t])return this.settings[t][e]}toSectionName(t){return""+t}}}),got=i(()=>{function t(t){return{dispose:Ae(async()=>t(),"dispose")}}var e=sot=sot||{};Ae(t,"create"),e.create=t}),fot=i(()=>{Gat(),got(),Bst(),tst(),YY(),Zst(),vst(),oot=class{static{Ae(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new Tst,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=ust.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.indexManager=t.workspace.IndexManager,this.serviceRegistry=t.ServiceRegistry}async build(t,r={},e=jat.CancellationToken.None){var n;for(n of t){var i,a=n.uri.toString();if(n.state===ust.Validated){if("boolean"==typeof r.validation&&r.validation)n.state=ust.IndexedReferences,n.diagnostics=void 0,this.buildState.delete(a);else if("object"==typeof r.validation){let t=this.buildState.get(a),e=null==(i=t?.result)?void 0:i.validationChecks;e&&0<(i=(null!=(i=r.validation.categories)?i:Xst.all).filter(t=>!e.includes(t))).length&&(this.buildState.set(a,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:i})},result:t.result}),n.state=ust.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=ust.Changed,await this.emitUpdate(t.map(t=>t.uri),[]),await this.buildDocuments(t,r,e)}async update(t,e,r=jat.CancellationToken.None){this.currentState=ust.Changed;for(var n of e)this.langiumDocuments.deleteDocument(n),this.buildState.delete(n.toString()),this.indexManager.remove(n);for(var i of t){var a;this.langiumDocuments.invalidateDocument(i)||((a=this.langiumDocumentFactory.fromModel({$type:"INVALID"},i)).state=ust.Changed,this.langiumDocuments.addDocument(a)),this.buildState.delete(i.toString())}let s=zY(t).concat(e).map(t=>t.toString()).toSet();this.langiumDocuments.all.filter(t=>!s.has(t.uri.toString())&&this.shouldRelink(t,s)).forEach(t=>{this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t),t.state=Math.min(t.state,ust.ComputedScopes),t.diagnostics=void 0}),await this.emitUpdate(t,e),await Xat(r),t=this.langiumDocuments.all.filter(t=>t.statet(e,r)))}shouldRelink(t,e){return!!t.references.some(t=>void 0!==t.error)||this.indexManager.isAffected(t,e)}onUpdate(e){return this.updateListeners.push(e),sot.create(()=>{var t=this.updateListeners.indexOf(e);0<=t&&this.updateListeners.splice(t,1)})}async buildDocuments(t,e,r){this.prepareBuild(t,e),await this.runCancelable(t,ust.Parsed,r,t=>this.langiumDocumentFactory.update(t,r)),await this.runCancelable(t,ust.IndexedContent,r,t=>this.indexManager.updateContent(t,r)),await this.runCancelable(t,ust.ComputedScopes,r,async t=>{var e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.precomputedScopes=await e.computeLocalScopes(t,r)}),await this.runCancelable(t,ust.Linked,r,t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,r)),await this.runCancelable(t,ust.IndexedReferences,r,t=>this.indexManager.updateReferences(t,r));var n,e=t.filter(t=>this.shouldValidate(t));await this.runCancelable(e,ust.Validated,r,t=>this.validate(t,r));for(n of t){var i=this.buildState.get(n.uri.toString());i&&(i.completed=!0)}}prepareBuild(t,e){for(var r of t){var r=r.uri.toString(),n=this.buildState.get(r);n&&!n.completed||this.buildState.set(r,{completed:!1,options:e,result:n?.result})}}async runCancelable(t,e,r,n){var i;for(i of t=t.filter(t=>t.state{this.buildPhaseListeners.delete(t,e)})}waitUntil(i,t,a){let s;return t&&"path"in t?s=t:a=t,a=a??jat.CancellationToken.None,s&&(t=this.langiumDocuments.getDocument(s))&&t.state>i?Promise.resolve(s):this.currentState>=i?Promise.resolve(void 0):a.isCancellationRequested?Promise.reject(Qat):new Promise((e,t)=>{let r=this.onBuildPhase(i,()=>{var t;r.dispose(),n.dispose(),s?(t=this.langiumDocuments.getDocument(s),e(t?.uri)):e(void 0)}),n=a.onCancellationRequested(()=>{r.dispose(),n.dispose(),t(Qat)})})}async notifyBuildPhase(t,e,r){var n;if(0!==t.length)for(n of this.buildPhaseListeners.get(e))await Xat(r),await n(t,r)}shouldValidate(t){return!!this.getBuildOptions(t).validation}async validate(t,e){var r=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,n=this.getBuildOptions(t).validation,r=await r.validateDocument(t,n="object"==typeof n?n:void 0,e);t.diagnostics?t.diagnostics.push(...r):t.diagnostics=r,(e=this.buildState.get(t.uri.toString()))&&(null==e.result&&(e.result={}),t=null!=(r=n?.categories)?r:Xst.all,e.result.validationChecks?e.result.validationChecks.push(...t):e.result.validationChecks=[...t])}getBuildOptions(t){return null!=(t=null==(t=this.buildState.get(t.uri.toString()))?void 0:t.options)?t:{}}}}),mot=i(()=>{EX(),zst(),Gat(),YY(),yst(),lot=class{static{Ae(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new Ist,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){let r=gX(t).uri,n=[];return this.referenceIndex.forEach(t=>{t.forEach(t=>{hst.equals(t.targetUri,r)&&t.targetPath===e&&n.push(t)})}),zY(n)}allElements(e,r){let t=zY(this.symbolIndex.keys());return(t=r?t.filter(t=>!r||r.has(t)):t).map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,r){var t;return r?this.symbolByTypeIndex.get(e,r,()=>{var t;return(null!=(t=this.symbolIndex.get(e))?t:[]).filter(t=>this.astReflection.isSubtype(t.type,r))}):null!=(t=this.symbolIndex.get(e))?t:[]}remove(t){t=t.toString(),this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(t,e=jat.CancellationToken.None){e=await this.serviceRegistry.getServices(t.uri).references.ScopeComputation.computeExports(t,e),t=t.uri.toString(),this.symbolIndex.set(t,e),this.symbolByTypeIndex.clear(t)}async updateReferences(t,e=jat.CancellationToken.None){e=await this.serviceRegistry.getServices(t.uri).workspace.ReferenceDescriptionProvider.createDescriptions(t,e),this.referenceIndex.set(t.uri.toString(),e)}isAffected(t,e){return!!(t=this.referenceIndex.get(t.uri.toString()))&&t.some(t=>!t.local&&e.has(t.targetUri.toString()))}}}),yot=i(()=>{Gat(),tst(),yst(),cot=class{static{Ae(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new Jat,this.serviceRegistry=t.ServiceRegistry,this.langiumDocuments=t.workspace.LangiumDocuments,this.documentBuilder=t.workspace.DocumentBuilder,this.fileSystemProvider=t.workspace.FileSystemProvider,this.mutex=t.workspace.WorkspaceLock}get ready(){return this._ready.promise}initialize(t){this.folders=null!=(t=t.workspaceFolders)?t:void 0}initialized(t){return this.mutex.write(t=>{var e;return this.initializeWorkspace(null!=(e=this.folders)?e:[],t)})}async initializeWorkspace(t,e=jat.CancellationToken.None){t=await this.performStartup(t),await Xat(e),await this.documentBuilder.build(t,this.initialBuildOptions,e)}async performStartup(t){let e=this.serviceRegistry.all.flatMap(t=>t.LanguageMetaData.fileExtensions),r=[],n=Ae(t=>{r.push(t),this.langiumDocuments.hasDocument(t.uri)||this.langiumDocuments.addDocument(t)},"collector");return await this.loadAdditionalDocuments(t,n),await Promise.all(t.map(t=>[t,this.getRootFolder(t)]).map(async t=>this.traverseFolder(...t,e,n))),this._ready.resolve(),r}loadAdditionalDocuments(t,e){return Promise.resolve()}getRootFolder(t){return lst.parse(t.uri)}async traverseFolder(e,t,r,n){t=await this.fileSystemProvider.readDirectory(t),await Promise.all(t.map(async t=>{this.includeEntry(e,t,r)&&(t.isDirectory?await this.traverseFolder(e,t.uri,r,n):t.isFile&&(t=await this.langiumDocuments.getOrCreateDocument(t.uri),n(t)))}))}includeEntry(t,e,r){var n=hst.basename(e.uri);return!n.startsWith(".")&&(e.isDirectory?"node_modules"!==n&&"out"!==n:!!e.isFile&&(n=hst.extname(e.uri),r.includes(n)))}}});function vot(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}function xot(t){return t&&"modes"in t&&"defaultMode"in t}function bot(t){return!vot(t)&&!xot(t)}var wot,kot=i(()=>{Jet(),wot=class{static{Ae(this,"DefaultLexer")}constructor(t){t=t.parser.TokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive}),this.tokenTypes=this.toTokenTypeDictionary(t),t=bot(t)?Object.values(t):t,this.chevrotainLexer=new rJ(t,{positionTracking:"full"})}get definition(){return this.tokenTypes}tokenize(t){return{tokens:(t=this.chevrotainLexer.tokenize(t)).tokens,errors:t.errors,hidden:null!=(t=t.groups.hidden)?t:[]}}toTokenTypeDictionary(t){if(bot(t))return t;let e=xot(t)?Object.values(t.modes).flat():t,r={};return e.forEach(t=>r[t.name]=t),r}},Ae(vot,"isTokenTypeArray"),Ae(xot,"isIMultiModeLexerDefinition"),Ae(bot,"isTokenTypeDictionary")});function Tot(t,e,r){let n,i;return n="string"==typeof t?(i=e,r):(i=t.range.start,e),i=i||_nt.create(0,0),r=Eot(t),e=Bot(n),Not({index:0,tokens:Sot({lines:r,position:i,options:e}),position:i})}function _ot(t,e){var r,n,e=Bot(e);return 0!==(t=Eot(t)).length&&(r=t[0],t=t[t.length-1],n=e.start,e=e.end,!!n?.exec(r))&&!!e?.exec(t)}function Eot(t){return("string"==typeof t?t:t.text).split(JX)}function Sot(a){var s,o,l,c,h,u,d;let p=[],g=a.position.line,f=a.position.character;for(let i=0;i=r.length?0{Qit(),nK(),yst(),Ae(Tot,"parseJSDoc"),Ae(_ot,"isJSDoc"),Ae(Eot,"getLines"),Uot=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,jot=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,Ae(Sot,"tokenize"),Ae(Cot,"buildInlineTokens"),Got=/\S/,Wot=/\s*$/,Ae(Aot,"skipWhitespace"),Ae(Lot,"lastCharacter"),Ae(Not,"parseJSDocComment"),Ae(Iot,"parseJSDocElement"),Ae(Mot,"appendEmptyLine"),Ae(Rot,"parseJSDocText"),Ae(Dot,"parseJSDocInline"),Ae(Oot,"parseJSDocTag"),Ae(Pot,"parseJSDocLine"),Ae(Bot,"normalizeOptions"),Ae(Fot,"normalizeOption"),Yot=class{static{Ae(this,"JSDocCommentImpl")}constructor(t,e){this.elements=t,this.range=e}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(var e of this.elements)0===t.length?t=e.toString():(e=e.toString(),t+=qot(t)+e);return t.trim()}toMarkdown(t){let e="";for(var r of this.elements)0===e.length?e=r.toMarkdown(t):(r=r.toMarkdown(t),e+=qot(e)+r);return e.trim()}},Hot=class{static{Ae(this,"JSDocTagImpl")}constructor(t,e,r,n){this.name=t,this.content=e,this.inline=r,this.range=n}toString(){let t="@"+this.name,e=this.content.toString();return 1===this.content.inlines.length?t=t+" "+e:1r.range.start.line&&(e+=` +`)}return e}toMarkdown(e){let r="";for(let t=0;tn.range.start.line&&(r+=` +`)}return r}},Xot=class{static{Ae(this,"JSDocLineImpl")}constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}},Ae(qot,"fillNewlines")}),ilt=i(()=>{EX(),nlt(),Kot=class{static{Ae(this,"JSDocDocumentationProvider")}constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(r){var t=this.commentProvider.getComment(r);if(t&&_ot(t))return Tot(t).toMarkdown({renderLink:Ae((t,e)=>this.documentationLinkRenderer(r,t,e),"renderLink"),renderTag:Ae(t=>this.documentationTagRenderer(r,t),"renderTag")})}documentationLinkRenderer(t,e,r){var n=null!=(n=this.findNameInPrecomputedScopes(t,e))?n:this.findNameInGlobalScope(t,e);return n&&n.nameSegment?(t=n.nameSegment.range.start.line+1,e=n.nameSegment.range.start.character+1,`[${r}](${n.documentUri.with({fragment:`L${t},`+e}).toString()})`):void 0}documentationTagRenderer(t,e){}findNameInPrecomputedScopes(e,r){var n=gX(e).precomputedScopes;if(n){let t=e;do{var i=n.get(t).find(t=>t.name===r);if(i)return i}while(t=t.$container)}}findNameInGlobalScope(t,e){return this.indexManager.allElements().find(t=>t.name===e)}}}),alt=i(()=>{Yst(),fH(),Zot=class{static{Ae(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return Ust(t)?t.$comment:null==(t=rH(t.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:t.text}}}),slt={},olt=i(()=>{I(slt,M(qat(),1))}),llt=i(()=>{tst(),olt(),Qot=class{static{Ae(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t){return Promise.resolve(this.syncParser.parse(t))}},Jot=class{static{Ae(this,"AbstractThreadedAsyncParser")}constructor(t){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=t.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{var t;0{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(t).then(t=>{t=this.hydrator.hydrate(t),n.resolve(t)}).catch(t=>{n.reject(t)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.promise}terminateWorker(t){t.terminate(),0<=(t=this.workerPool.indexOf(t))&&this.workerPool.splice(t,1)}async acquireParserWorker(t){this.initializeWorkers();for(var e of this.workerPool)if(e.ready)return e.lock(),e;let r=new Jat;return t.onCancellationRequested(()=>{var t=this.queue.indexOf(r);0<=t&&this.queue.splice(t,1),r.reject(Qat)}),this.queue.push(r),r.promise}},tlt=class{static{Ae(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,e,r,n){this.onReadyEmitter=new slt.Emitter,this.deferred=new Jat,this._ready=!0,this._parsing=!1,this.sendMessage=t,this._terminate=n,e(t=>{this.deferred.resolve(t),this.unlock()}),r(t=>{this.deferred.reject(t),this.unlock()})}terminate(){this.deferred.reject(Qat),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(t){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new Jat,this.sendMessage(t),this.deferred.promise}}}),clt=i(()=>{Gat(),tst(),elt=class{static{Ae(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new jat.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();var e=new jat.CancellationTokenSource;return this.previousTokenSource=e,this.enqueue(this.writeQueue,t,e.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,e,r){var n=new Jat,e={action:e,deferred:n,cancellationToken:r??jat.CancellationToken.None};return t.push(e),this.performNextOperation(),n.promise}async performNextOperation(){if(this.done){var t=[];if(0{try{var n=await Promise.resolve().then(()=>t(r));e.resolve(n)}catch(t){Vat(t)?e.resolve(void 0):e.reject(t)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),hlt=i(()=>{Jit(),cX(),BY(),EX(),Bst(),fH(),rlt=class{static{Ae(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new _st,this.tokenTypeIdMap=new _st,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors.map(t=>Object.assign({},t)),parserErrors:t.parserErrors.map(t=>Object.assign({},t)),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}createDehyrationContext(t){var e,r=new Map,n=new Map;for(e of vX(t))r.set(e,{});if(t.$cstNode)for(var i of VY(t.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(t,e){var r,n,i=e.astNodes.get(t);i.$type=t.$type,i.$containerIndex=t.$containerIndex,i.$containerProperty=t.$containerProperty,void 0!==t.$cstNode&&(i.$cstNode=this.dehydrateCstNode(t.$cstNode,e));for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)LY(a)?s.push(this.dehydrateAstNode(a,e)):NY(a)?s.push(this.dehydrateReference(a,e)):s.push(a)}else LY(n)?i[r]=this.dehydrateAstNode(n,e):NY(n)?i[r]=this.dehydrateReference(n,e):void 0!==n&&(i[r]=n);return i}dehydrateReference(t,e){var r={};return r.$refText=t.$refText,t.$refNode&&(r.$refNode=e.cstNodes.get(t.$refNode)),r}dehydrateCstNode(t,e){var r=e.cstNodes.get(t);return OY(t)?r.fullText=t.fullText:r.grammarSource=this.getGrammarElementId(t.grammarSource),r.hidden=t.hidden,r.astNode=e.astNodes.get(t.astNode),RY(t)?r.content=t.content.map(t=>this.dehydrateCstNode(t,e)):DY(t)&&(r.tokenType=t.tokenType.name,r.offset=t.offset,r.length=t.length,r.startLine=t.range.start.line,r.startColumn=t.range.start.character,r.endLine=t.range.end.line,r.endColumn=t.range.end.character),r}hydrate(t){var e=t.value,r=this.createHydrationContext(e);return"$cstNode"in e&&this.hydrateCstNode(e.$cstNode,r),{lexerErrors:t.lexerErrors,parserErrors:t.parserErrors,value:this.hydrateAstNode(e,r)}}createHydrationContext(t){var e,r=new Map,n=new Map;for(e of vX(t))r.set(e,{});let i;if(t.$cstNode)for(var a of VY(t.$cstNode)){let t;"fullText"in a?(t=new Xit(a.fullText),i=t):"content"in a?t=new Hit:"tokenType"in a&&(t=this.hydrateCstLeafNode(a)),t&&(n.set(a,t),t.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(t,e){var r,n,i=e.astNodes.get(t);i.$type=t.$type,i.$containerIndex=t.$containerIndex,i.$containerProperty=t.$containerProperty,t.$cstNode&&(i.$cstNode=e.cstNodes.get(t.$cstNode));for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)LY(a)?s.push(this.setParent(this.hydrateAstNode(a,e),i)):NY(a)?s.push(this.hydrateReference(a,i,r,e)):s.push(a)}else LY(n)?i[r]=this.setParent(this.hydrateAstNode(n,e),i):NY(n)?i[r]=this.hydrateReference(n,i,r,e):void 0!==n&&(i[r]=n);return i}setParent(t,e){return t.$container=e,t}hydrateReference(t,e,r,n){return this.linker.buildReference(e,r,n.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,e,r=0){var n=e.cstNodes.get(t);if("number"==typeof t.grammarSource&&(n.grammarSource=this.getGrammarElement(t.grammarSource)),n.astNode=e.astNodes.get(t.astNode),RY(n))for(var i of t.content)i=this.hydrateCstNode(i,e,r++),n.content.push(i);return n}hydrateCstLeafNode(t){var e=this.getTokenType(t.tokenType),r=t.offset,n=t.length,i=t.startLine,a=t.startColumn,s=t.endLine,o=t.endColumn,t=t.hidden;return new Yit(r,n,{start:{line:i,character:a},end:{line:s,character:o}},e,t)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap();var e=this.grammarElementIdMap.getKey(t);if(e)return e;throw new Error("Invalid grammar element id: "+t)}createGrammarElementIdMap(){let t=0;for(var e of vX(this.grammar))CH(e)&&this.grammarElementIdMap.set(e,t++)}}});function ult(t){return{documentation:{CommentProvider:Ae(t=>new Zot(t),"CommentProvider"),DocumentationProvider:Ae(t=>new Kot(t),"DocumentationProvider")},parser:{AsyncParser:Ae(t=>new Qot(t),"AsyncParser"),GrammarConfig:Ae(t=>jK(t),"GrammarConfig"),LangiumParser:Ae(t=>Iat(t),"LangiumParser"),CompletionParser:Ae(t=>Lat(t),"CompletionParser"),ValueConverter:Ae(()=>new Dat,"ValueConverter"),TokenBuilder:Ae(()=>new Rat,"TokenBuilder"),Lexer:Ae(t=>new wot(t),"Lexer"),ParserErrorMessageProvider:Ae(()=>new sat,"ParserErrorMessageProvider")},workspace:{AstNodeLocator:Ae(()=>new iot,"AstNodeLocator"),AstNodeDescriptionProvider:Ae(t=>new rot(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:Ae(t=>new not(t),"ReferenceDescriptionProvider")},references:{Linker:Ae(t=>new gst(t),"Linker"),NameProvider:Ae(()=>new wst,"NameProvider"),ScopeProvider:Ae(t=>new Dst(t),"ScopeProvider"),ScopeComputation:Ae(t=>new Est(t),"ScopeComputation"),References:Ae(t=>new kst(t),"References")},serializer:{Hydrator:Ae(t=>new rlt(t),"Hydrator"),JsonSerializer:Ae(t=>new Gst(t),"JsonSerializer")},validation:{DocumentValidator:Ae(t=>new tot(t),"DocumentValidator"),ValidationRegistry:Ae(t=>new Kst(t),"ValidationRegistry")},shared:Ae(()=>t.shared,"shared")}}function dlt(e){return{ServiceRegistry:Ae(()=>new Wst,"ServiceRegistry"),workspace:{LangiumDocuments:Ae(t=>new pst(t),"LangiumDocuments"),LangiumDocumentFactory:Ae(t=>new dst(t),"LangiumDocumentFactory"),DocumentBuilder:Ae(t=>new oot(t),"DocumentBuilder"),IndexManager:Ae(t=>new lot(t),"IndexManager"),WorkspaceManager:Ae(t=>new cot(t),"WorkspaceManager"),FileSystemProvider:Ae(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:Ae(()=>new elt,"WorkspaceLock"),ConfigurationProvider:Ae(t=>new aot(t),"ConfigurationProvider")}}}var plt=i(()=>{GK(),Nat(),Pat(),Bat(),Fat(),xst(),Ost(),Pst(),Fst(),qst(),Yst(),Hst(),hot(),Zst(),uot(),dot(),pot(),fot(),vst(),mot(),yot(),kot(),ilt(),alt(),hat(),llt(),clt(),hlt(),Ae(ult,"createDefaultCoreModule"),Ae(dlt,"createDefaultSharedCoreModule")});function glt(t,e,r,n,i,a,s,o,l){return mlt([t,e,r,n,i,a,s,o,l].reduce(vlt,{}))}function flt(t){if(t&&t[blt])for(var e of Object.values(t))flt(e);return t}function mlt(r,n){let i=new Proxy({},{deleteProperty:Ae(()=>!1,"deleteProperty"),get:Ae((t,e)=>ylt(t,e,r,n||i),"get"),getOwnPropertyDescriptor:Ae((t,e)=>(ylt(t,e,r,n||i),Object.getOwnPropertyDescriptor(t,e)),"getOwnPropertyDescriptor"),has:Ae((t,e)=>e in r,"has"),ownKeys:Ae(()=>[...Reflect.ownKeys(r),blt],"ownKeys")});return i[blt]=!0,i}function ylt(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===wlt)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. See https://langium.org/docs/configuration-services/#resolving-cyclic-dependencies');return t[e]}if(e in r){r=r[e],t[e]=wlt;try{t[e]="function"==typeof r?r(n):mlt(r,n)}catch(r){throw t[e]=r instanceof Error?r:void 0,r}return t[e]}}function vlt(t,e){if(e)for(var[r,n]of Object.entries(e)){var i;void 0!==n&&(null!==(i=t[r])&&null!==n&&"object"==typeof i&&"object"==typeof n?t[r]=vlt(i,n):t[r]=n)}return t}var xlt,blt,wlt,klt,Tlt,_lt=i(()=>{(xlt=xlt||{}).merge=(t,e)=>vlt(vlt({},t),e),Ae(glt,"inject"),blt=Symbol("isProxy"),Ae(flt,"eagerLoad"),Ae(mlt,"_inject"),wlt=Symbol(),Ae(ylt,"_resolve"),Ae(vlt,"_merge")}),Elt=i(()=>{}),Slt=i(()=>{alt(),ilt(),nlt()}),Clt=i(()=>{}),Alt=i(()=>{GK(),Clt()}),Llt=i(()=>{}),Nlt=i(()=>{llt(),Nat(),Jit(),Pat(),hat(),kot(),Llt(),Bat(),Fat()}),Ilt=i(()=>{xst(),Ost(),Pst(),$st(),Fst(),qst()}),Mlt=i(()=>{hlt(),Yst()}),Rlt=i(()=>{klt=class{static{Ae(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},Tlt={fileSystemProvider:Ae(()=>new klt,"fileSystemProvider")}});function Dlt(){var t=glt(dlt(Tlt),Blt),e=glt(ult({shared:t}),Plt);return t.ServiceRegistry.register(e),e}function Olt(t){var e=Dlt(),t=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(t,lst.parse(`memory://${null!=(e=t.name)?e:"grammar"}.langium`)),t}var Plt,Blt,Flt=i(()=>{plt(),_lt(),cX(),Rlt(),yst(),Plt={Grammar:Ae(()=>{},"Grammar"),LanguageMetaData:Ae(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Blt={AstReflection:Ae(()=>new oX,"AstReflection")},Ae(Dlt,"createMinimalGrammarServices"),Ae(Olt,"loadGrammarFromJson")}),$lt={},zlt=(A($lt,{AstUtils:()=>hX,BiMap:()=>_st,Cancellation:()=>jat,ContextCache:()=>Ist,CstUtils:()=>HY,DONE_RESULT:()=>jY,Deferred:()=>Jat,Disposable:()=>sot,DisposableCache:()=>Lst,DocumentCache:()=>Mst,EMPTY_STREAM:()=>UY,ErrorWithLocation:()=>yH,GrammarUtils:()=>iK,MultiMap:()=>Tst,OperationCancelled:()=>Qat,Reduction:()=>WY,RegExpUtils:()=>WX,SimpleCache:()=>Nst,StreamImpl:()=>qY,TreeStreamImpl:()=>GY,URI:()=>lst,UriUtils:()=>hst,WorkspaceCache:()=>Rst,assertUnreachable:()=>mH,delayNextTick:()=>Wat,interruptAndCheck:()=>Xat,isOperationCancelled:()=>Vat,loadGrammarFromJson:()=>Olt,setInterruptionPeriod:()=>Hat,startCancelableOperation:()=>Yat,stream:()=>zY}),i(()=>{zst(),olt(),I($lt,slt),Bst(),got(),vH(),Flt(),tst(),YY(),yst(),EX(),Gat(),fH(),UK(),nK()})),qlt=i(()=>{hot(),Zst()}),Ult=i(()=>{uot(),dot(),pot(),fot(),vst(),Rlt(),mot(),clt(),yot()}),jlt={},Glt=(A(jlt,{AbstractAstReflection:()=>PY,AbstractCstNode:()=>Wit,AbstractLangiumParser:()=>nat,AbstractParserErrorMessageProvider:()=>aat,AbstractThreadedAsyncParser:()=>Jot,AstUtils:()=>hX,BiMap:()=>_st,Cancellation:()=>jat,CompositeCstNodeImpl:()=>Hit,ContextCache:()=>Ist,CstNodeBuilder:()=>Git,CstUtils:()=>HY,DONE_RESULT:()=>jY,DatatypeSymbol:()=>eat,DefaultAstNodeDescriptionProvider:()=>rot,DefaultAstNodeLocator:()=>iot,DefaultAsyncParser:()=>Qot,DefaultCommentProvider:()=>Zot,DefaultConfigurationProvider:()=>aot,DefaultDocumentBuilder:()=>oot,DefaultDocumentValidator:()=>tot,DefaultHydrator:()=>rlt,DefaultIndexManager:()=>lot,DefaultJsonSerializer:()=>Gst,DefaultLangiumDocumentFactory:()=>dst,DefaultLangiumDocuments:()=>pst,DefaultLexer:()=>wot,DefaultLinker:()=>gst,DefaultNameProvider:()=>wst,DefaultReferenceDescriptionProvider:()=>not,DefaultReferences:()=>kst,DefaultScopeComputation:()=>Est,DefaultScopeProvider:()=>Dst,DefaultServiceRegistry:()=>Wst,DefaultTokenBuilder:()=>Rat,DefaultValueConverter:()=>Dat,DefaultWorkspaceLock:()=>elt,DefaultWorkspaceManager:()=>cot,Deferred:()=>Jat,Disposable:()=>sot,DisposableCache:()=>Lst,DocumentCache:()=>Mst,DocumentState:()=>ust,DocumentValidator:()=>eot,EMPTY_SCOPE:()=>Ast,EMPTY_STREAM:()=>UY,EmptyFileSystem:()=>Tlt,EmptyFileSystemProvider:()=>klt,ErrorWithLocation:()=>yH,GrammarAST:()=>xH,GrammarUtils:()=>iK,JSDocDocumentationProvider:()=>Kot,LangiumCompletionParser:()=>oat,LangiumParser:()=>iat,LangiumParserErrorMessageProvider:()=>sat,LeafCstNodeImpl:()=>Yit,MapScope:()=>Cst,Module:()=>xlt,MultiMap:()=>Tst,OperationCancelled:()=>Qat,ParserWorker:()=>tlt,Reduction:()=>WY,RegExpUtils:()=>WX,RootCstNodeImpl:()=>Xit,SimpleCache:()=>Nst,StreamImpl:()=>qY,StreamScope:()=>Sst,TextDocument:()=>ost,TreeStreamImpl:()=>GY,URI:()=>lst,UriUtils:()=>hst,ValidationCategory:()=>Xst,ValidationRegistry:()=>Kst,ValueConverter:()=>Oat,WorkspaceCache:()=>Rst,assertUnreachable:()=>mH,createCompletionParser:()=>Lat,createDefaultCoreModule:()=>ult,createDefaultSharedCoreModule:()=>dlt,createGrammarConfig:()=>jK,createLangiumParser:()=>Iat,delayNextTick:()=>Wat,diagnosticData:()=>Vst,eagerLoad:()=>flt,getDiagnosticRange:()=>Qst,inject:()=>glt,interruptAndCheck:()=>Xat,isAstNode:()=>LY,isAstNodeDescription:()=>IY,isAstNodeWithComment:()=>Ust,isCompositeCstNode:()=>RY,isIMultiModeLexerDefinition:()=>xot,isJSDoc:()=>_ot,isLeafCstNode:()=>DY,isLinkingError:()=>MY,isNamed:()=>bst,isOperationCancelled:()=>Vat,isReference:()=>NY,isRootCstNode:()=>OY,isTokenTypeArray:()=>vot,isTokenTypeDictionary:()=>bot,loadGrammarFromJson:()=>Olt,parseJSDoc:()=>Tot,prepareLangiumParser:()=>Mat,setInterruptionPeriod:()=>Hat,startCancelableOperation:()=>Yat,stream:()=>zY,toDiagnosticSeverity:()=>Jst}),i(()=>{plt(),_lt(),Hst(),Elt(),BY(),Slt(),Alt(),Nlt(),Ilt(),Mlt(),zlt(),I(jlt,$lt),qlt(),Ult(),cX()}));function Wlt(t){return ict.isInstance(t,"Branch")}function Ylt(t){return ict.isInstance(t,"Commit")}function Hlt(t){return ict.isInstance(t,"Common")}function Vlt(t){return ict.isInstance(t,"GitGraph")}function Xlt(t){return ict.isInstance(t,"Info")}function Klt(t){return ict.isInstance(t,"Merge")}function Zlt(t){return ict.isInstance(t,"Packet")}function Qlt(t){return ict.isInstance(t,"PacketBlock")}function Jlt(t){return ict.isInstance(t,"Pie")}function tct(t){return ict.isInstance(t,"PieSection")}var ect,rct,nct,ict,act,sct,oct,lct,cct,hct,uct,dct,pct,gct,fct,mct,yct,vct,xct,bct,wct,kct,Tct,_ct,Ect,Sct=i(()=>{Glt(),Glt(),Glt(),Glt(),ect=Object.defineProperty,rct=Ae((t,e)=>ect(t,"name",{value:e,configurable:!0}),"__name"),Ae(Wlt,"isBranch"),rct(Wlt,"isBranch"),Ae(Ylt,"isCommit"),rct(Ylt,"isCommit"),Ae(Hlt,"isCommon"),rct(Hlt,"isCommon"),Ae(Vlt,"isGitGraph"),rct(Vlt,"isGitGraph"),Ae(Xlt,"isInfo"),rct(Xlt,"isInfo"),Ae(Klt,"isMerge"),rct(Klt,"isMerge"),Ae(Zlt,"isPacket"),rct(Zlt,"isPacket"),Ae(Qlt,"isPacketBlock"),rct(Qlt,"isPacketBlock"),Ae(Jlt,"isPie"),rct(Jlt,"isPie"),Ae(tct,"isPieSection"),rct(tct,"isPieSection"),nct=class extends PY{static{Ae(this,"MermaidAstReflection")}static{rct(this,"MermaidAstReflection")}getAllTypes(){return["Branch","Checkout","CherryPicking","Commit","Common","Direction","GitGraph","Info","Merge","Packet","PacketBlock","Pie","PieSection","Statement"]}computeIsSubtype(t,e){switch(t){case"Branch":case"Checkout":case"CherryPicking":case"Commit":case"Merge":return this.isSubtype("Statement",e);case"Direction":return this.isSubtype("GitGraph",e);default:return!1}}getReferenceType(t){throw t=t.container.$type+":"+t.property,new Error(t+" is not a valid reference id.")}getTypeMetaData(t){switch(t){case"Branch":return{name:"Branch",properties:[{name:"name"},{name:"order"}]};case"Checkout":return{name:"Checkout",properties:[{name:"branch"}]};case"CherryPicking":return{name:"CherryPicking",properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case"Commit":return{name:"Commit",properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Common":return{name:"Common",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"GitGraph":return{name:"GitGraph",properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Info":return{name:"Info",properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case"Merge":return{name:"Merge",properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Packet":return{name:"Packet",properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case"PacketBlock":return{name:"PacketBlock",properties:[{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case"PieSection":return{name:"PieSection",properties:[{name:"label"},{name:"value"}]};case"Direction":return{name:"Direction",properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:t,properties:[]}}}},ict=new nct,sct=rct(()=>act=act??Olt('{"$type":"Grammar","isDeclared":true,"name":"Info","imports":[],"rules":[{"$type":"ParserRule","name":"Info","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'),"InfoGrammar"),lct=rct(()=>oct=oct??Olt(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","name":"Packet","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"packet-beta"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"?"},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}`),"PacketGrammar"),hct=rct(()=>cct=cct??Olt('{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","name":"Pie","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},"cardinality":"+"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"PIE_SECTION_LABEL","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]+\\"/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PIE_SECTION_VALUE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/(0|[1-9][0-9]*)(\\\\.[0-9]+)?/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"types":[],"usedGrammars":[]}'),"PieGrammar"),dct=rct(()=>uct=uct??Olt(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","name":"TitleAndAccessibilities","fragment":true,"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"EOL","fragment":true,"dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"ParserRule","name":"GitGraph","entry":true,"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"*"}]}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+(?=\\\\s)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[]}`),"GitGraphGrammar"),mct={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(fct={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(gct={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(pct={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1})})})},yct={AstReflection:rct(()=>new nct,"AstReflection")},vct={Grammar:rct(()=>sct(),"Grammar"),LanguageMetaData:rct(()=>pct,"LanguageMetaData"),parser:{}},xct={Grammar:rct(()=>lct(),"Grammar"),LanguageMetaData:rct(()=>gct,"LanguageMetaData"),parser:{}},bct={Grammar:rct(()=>hct(),"Grammar"),LanguageMetaData:rct(()=>fct,"LanguageMetaData"),parser:{}},wct={Grammar:rct(()=>dct(),"Grammar"),LanguageMetaData:rct(()=>mct,"LanguageMetaData"),parser:{}},kct={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},Tct=class extends Dat{static{Ae(this,"AbstractMermaidValueConverter")}static{rct(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){var n=this.runCommonConverter(t,e,r);return void 0===(n=void 0===n?this.runCustomConverter(t,e,r):n)?super.runConverter(t,e,r):n}runCommonConverter(t,e,r){return void 0!==(t=kct[t.name])&&null!==(t=t.exec(e))?void 0!==t[1]?t[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==t[2]?t[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` +`):void 0:void 0}},_ct=class extends Tct{static{Ae(this,"CommonValueConverter")}static{rct(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},class extends(Ect=class extends Rat{static{Ae(this,"AbstractMermaidTokenBuilder")}static{rct(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){return(t=super.buildKeywordTokens(t,e,r)).forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),t}}){static{Ae(this,"CommonTokenBuilder")}static{rct(this,"CommonTokenBuilder")}}});function Cct(t=Tlt){var t=glt(dlt(t),yct),e=glt(ult({shared:t}),wct,Lct);return t.ServiceRegistry.register(e),{shared:t,GitGraph:e}}var Act,Lct,Nct=i(()=>{Sct(),Glt(),Act=class extends Ect{static{Ae(this,"GitGraphTokenBuilder")}static{rct(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},Lct={parser:{TokenBuilder:rct(()=>new Act,"TokenBuilder"),ValueConverter:rct(()=>new _ct,"ValueConverter")}},Ae(Cct,"createGitGraphServices"),rct(Cct,"createGitGraphServices")});function Ict(t=Tlt){var t=glt(dlt(t),yct),e=glt(ult({shared:t}),vct,Rct);return t.ServiceRegistry.register(e),{shared:t,Info:e}}var Mct,Rct,Dct=i(()=>{Sct(),Glt(),Mct=class extends Ect{static{Ae(this,"InfoTokenBuilder")}static{rct(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},Rct={parser:{TokenBuilder:rct(()=>new Mct,"TokenBuilder"),ValueConverter:rct(()=>new _ct,"ValueConverter")}},Ae(Ict,"createInfoServices"),rct(Ict,"createInfoServices")});function Oct(t=Tlt){var t=glt(dlt(t),yct),e=glt(ult({shared:t}),xct,Bct);return t.ServiceRegistry.register(e),{shared:t,Packet:e}}var Pct,Bct,Fct=i(()=>{Sct(),Glt(),Pct=class extends Ect{static{Ae(this,"PacketTokenBuilder")}static{rct(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},Bct={parser:{TokenBuilder:rct(()=>new Pct,"TokenBuilder"),ValueConverter:rct(()=>new _ct,"ValueConverter")}},Ae(Oct,"createPacketServices"),rct(Oct,"createPacketServices")});function $ct(t=Tlt){var t=glt(dlt(t),yct),e=glt(ult({shared:t}),bct,Uct);return t.ServiceRegistry.register(e),{shared:t,Pie:e}}var zct,qct,Uct,jct=i(()=>{Sct(),Glt(),zct=class extends Ect{static{Ae(this,"PieTokenBuilder")}static{rct(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},qct=class extends Tct{static{Ae(this,"PieValueConverter")}static{rct(this,"PieValueConverter")}runCustomConverter(t,e,r){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},Uct={parser:{TokenBuilder:rct(()=>new zct,"TokenBuilder"),ValueConverter:rct(()=>new qct,"ValueConverter")}},Ae($ct,"createPieServices"),rct($ct,"createPieServices")}),Gct={},Wct=(A(Gct,{InfoModule:()=>Rct,createInfoServices:()=>Ict}),i(()=>{Dct(),Sct()})),Yct={},Hct=(A(Yct,{PacketModule:()=>Bct,createPacketServices:()=>Oct}),i(()=>{Fct(),Sct()})),Vct={},Xct=(A(Vct,{PieModule:()=>Uct,createPieServices:()=>$ct}),i(()=>{jct(),Sct()})),Kct={},Zct=(A(Kct,{GitGraphModule:()=>Lct,createGitGraphServices:()=>Cct}),i(()=>{Nct(),Sct()}));async function Qct(t,e){var r=tht[t];if(!r)throw new Error("Unknown diagram type: "+t);if(Jct[t]||await r(),0<(r=Jct[t].parse(e)).lexerErrors.length||0{Nct(),Dct(),Fct(),jct(),Sct(),Jct={},tht={info:rct(async()=>{var t=(t=(await Promise.resolve().then(()=>(Wct(),Gct))).createInfoServices)().Info.parser.LangiumParser;Jct.info=t},"info"),packet:rct(async()=>{var t=(t=(await Promise.resolve().then(()=>(Hct(),Yct))).createPacketServices)().Packet.parser.LangiumParser;Jct.packet=t},"packet"),pie:rct(async()=>{var t=(t=(await Promise.resolve().then(()=>(Xct(),Vct))).createPieServices)().Pie.parser.LangiumParser;Jct.pie=t},"pie"),gitGraph:rct(async()=>{var t=(t=(await Promise.resolve().then(()=>(Zct(),Kct))).createGitGraphServices)().GitGraph.parser.LangiumParser;Jct.gitGraph=t},"gitGraph")},Ae(Qct,"parse"),rct(Qct,"parse"),eht=class extends Error{static{Ae(this,"MermaidParseError")}constructor(t){super(`Parsing failed: ${t.lexerErrors.map(t=>t.message).join(` +`)} `+t.parserErrors.map(t=>t.message).join(` +`)),this.result=t}static{rct(this,"MermaidParseError")}}});function nht(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var iht,aht,sht=i(()=>{Ae(nht,"populateCommonDb")}),oht=i(()=>{iht={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),lht=i(()=>{aht=class{constructor(t){this.init=t,this.records=this.init()}static{Ae(this,"ImperativeState")}reset(){this.records=this.init()}}});function cht(){return q8({length:7})}function hht(t,n){let i=Object.create(null);return t.reduce((t,e)=>{var r=n(e);return i[r]||(i[r]=!0,t.push(e)),t},[])}function uht(t,e,r){-1===(e=t.indexOf(e))?t.push(r):t.splice(e,1,r)}function dht(t){let e=t.reduce((t,e)=>t.seq>e.seq?t:e,t[0]),r="";t.forEach(function(t){t===e?r+="\t*":r+="\t|"});var n,i=[r,e.id,e.seq];for(n in w.records.branches)w.records.branches.get(n)===e.id&&i.push(n);if(R.debug(i.join(" ")),e.parents&&2==e.parents.length&&e.parents[0]&&e.parents[1]){var a=w.records.commits.get(e.parents[0]);uht(t,e,a),e.parents[1]&&t.push(w.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;e.parents[0]&&(a=w.records.commits.get(e.parents[0]),uht(t,e,a))}dht(t=hht(t,t=>t.id))}var pht,ght,w,fht,mht,yht,vht,xht,bht,wht,kht,Tht,_ht,Eht,Sht,Cht,Aht,Lht,Nht,Iht,Mht,Rht,Dht,Oht,Pht,Bht,Fht,$ht,zht,qht,Uht,jht,Ght,Wht,Yht,Hht,Vht,Xht,Kht,Zht,Qht,Jht,tut,eut,rut,nut,iut,aut,sut,out,lut,cut,hut,uut,dut,put,gut,fut,mut,yut,vut,xut,but=i(()=>{t(),rT(),Pr(),al(),bc(),oht(),lht(),Dr(),pht=ke.gitGraph,ght=Ae(()=>S8({...pht,...Be().gitGraph}),"getConfig"),w=new aht(()=>{var t=(e=ght()).mainBranchName,e=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:e}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}}),Ae(cht,"getID"),Ae(hht,"uniqBy"),fht=Ae(function(t){w.records.direction=t},"setDirection"),mht=Ae(function(t){R.debug("options str",t),t=t?.trim()||"{}";try{w.records.options=JSON.parse(t)}catch(t){R.error("error while parsing gitGraph options",t.message)}},"setOptions"),yht=Ae(function(){return w.records.options},"getOptions"),vht=Ae(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags,a=(R.info("commit",e,r,n,i),R.debug("Entering commit:",e,r,n,i),ght());r=L.sanitizeText(r,a),e=L.sanitizeText(e,a),i=i?.map(t=>L.sanitizeText(t,a)),t={id:r||w.records.seq+"-"+cht(),message:e,seq:w.records.seq++,type:n??iht.NORMAL,tags:i??[],parents:null==w.records.head?[]:[w.records.head.id],branch:w.records.currBranch},w.records.head=t,R.info("main branch",a.mainBranchName),w.records.commits.set(t.id,t),w.records.branches.set(w.records.currBranch,t.id),R.debug("in pushCommit "+t.id)},"commit"),xht=Ae(function(t){var e=t.name,t=t.order,e=L.sanitizeText(e,ght());if(w.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);w.records.branches.set(e,null!=w.records.head?w.records.head.id:null),w.records.branchConfig.set(e,{name:e,order:t}),kht(e),R.debug("in createBranch")},"branch"),bht=Ae(t=>{var e=t.branch,r=t.id,n=t.type,i=t.tags,a=ght(),e=L.sanitizeText(e,a),r=r&&L.sanitizeText(r,a),t=w.records.branches.get(w.records.currBranch),a=w.records.branches.get(e),t=t?w.records.commits.get(t):void 0,s=a?w.records.commits.get(a):void 0;if(t&&s&&t.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(w.records.currBranch===e)throw(o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(void 0===t||!t)throw(o=new Error(`Incorrect usage of "merge". Current branch (${w.records.currBranch})has no commits`)).hash={text:"merge "+e,token:"merge "+e,expected:["commit"]},o;if(!w.records.branches.has(e))throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist")).hash={text:"merge "+e,token:"merge "+e,expected:["branch "+e]},o;if(void 0===s||!s)throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits")).hash={text:"merge "+e,token:"merge "+e,expected:['"commit"']},o;if(t===s)throw(o=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(r&&w.records.commits.has(r))throw(t=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom Id")).hash={text:`merge ${e} ${r} ${n} `+i?.join(" "),token:`merge ${e} ${r} ${n} `+i?.join(" "),expected:[`merge ${e} ${r}_UNIQUE ${n} `+i?.join(" ")]},t;var s=a||"",o={id:r||w.records.seq+"-"+cht(),message:`merged branch ${e} into `+w.records.currBranch,seq:w.records.seq++,parents:null==w.records.head?[]:[w.records.head.id,s],branch:w.records.currBranch,type:iht.MERGE,customType:n,customId:!!r,tags:i??[]};w.records.head=o,w.records.commits.set(o.id,o),w.records.branches.set(w.records.currBranch,o.id),R.debug(w.records.branches),R.debug("in mergeBranch")},"merge"),wht=Ae(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent,a=(R.debug("Entering cherryPick:",e,r,n),ght());if(e=L.sanitizeText(e,a),r=L.sanitizeText(r,a),n=n?.map(t=>L.sanitizeText(t,a)),i=L.sanitizeText(i,a),!e||!w.records.commits.has(e))throw(t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided')).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},t;if(void 0===(t=w.records.commits.get(e))||!t)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&(!Array.isArray(t.parents)||!t.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");var s=t.branch;if(t.type===iht.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!w.records.commits.has(r)){if(s===w.records.currBranch)throw(s=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch')).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;if(void 0===(s=w.records.branches.get(w.records.currBranch))||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${w.records.currBranch})has no commits`)).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},o;var o=w.records.commits.get(s);if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${w.records.currBranch})has no commits`)).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;o={id:w.records.seq+"-"+cht(),message:`cherry-picked ${t?.message} into `+w.records.currBranch,seq:w.records.seq++,parents:null==w.records.head?[]:[w.records.head.id,t.id],branch:w.records.currBranch,type:iht.CHERRY_PICK,tags:n?n.filter(Boolean):["cherry-pick:"+t.id+(t.type===iht.MERGE?"|parent:"+i:"")]},w.records.head=o,w.records.commits.set(o.id,o),w.records.branches.set(w.records.currBranch,o.id),R.debug(w.records.branches),R.debug("in cherryPick")}},"cherryPick"),kht=Ae(function(t){var e;if(t=L.sanitizeText(t,ght()),!w.records.branches.has(t))throw(e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`)).hash={text:"checkout "+t,token:"checkout "+t,expected:["branch "+t]},e;w.records.currBranch=t,e=w.records.branches.get(w.records.currBranch),w.records.head=void 0!==e&&e?w.records.commits.get(e)??null:null},"checkout"),Ae(uht,"upsert"),Ae(dht,"prettyPrintCommitHistory"),Tht=Ae(function(){R.debug(w.records.commits),dht([Aht()[0]])},"prettyPrint"),_ht=Ae(function(){w.reset(),pl()},"clear"),Eht=Ae(function(){return[...w.records.branchConfig.values()].map((t,e)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat("0."+e)}).sort((t,e)=>(t.order??0)-(e.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),Sht=Ae(function(){return w.records.branches},"getBranches"),Cht=Ae(function(){return w.records.commits},"getCommits"),Aht=Ae(function(){var t=[...w.records.commits.values()];return t.forEach(function(t){R.debug(t.id)}),t.sort((t,e)=>t.seq-e.seq),t},"getCommitsArray"),Lht=Ae(function(){return w.records.currBranch},"getCurrentBranch"),Nht=Ae(function(){return w.records.direction},"getDirection"),Iht=Ae(function(){return w.records.head},"getHead"),Mht={commitType:iht,getConfig:ght,setDirection:fht,setOptions:mht,getOptions:yht,commit:vht,branch:xht,merge:bht,cherryPick:wht,checkout:kht,prettyPrint:Tht,clear:_ht,getBranchesAsObjArray:Eht,getBranches:Sht,getCommits:Cht,getCommitsArray:Aht,getCurrentBranch:Lht,getDirection:Nht,getHead:Iht,setAccTitle:gl,getAccTitle:fl,getAccDescription:yl,setAccDescription:ml,setDiagramTitle:vl,getDiagramTitle:xl}}),wut=i(()=>{rht(),t(),sht(),but(),oht(),Rht=Ae((t,e)=>{nht(t,e),t.dir&&e.setDirection(t.dir);for(var r of t.statements)Dht(r,e)},"populate"),Dht=Ae((t,e)=>{var r={Commit:Ae(t=>e.commit(Oht(t)),"Commit"),Branch:Ae(t=>e.branch(Pht(t)),"Branch"),Merge:Ae(t=>e.merge(Bht(t)),"Merge"),Checkout:Ae(t=>e.checkout(Fht(t)),"Checkout"),CherryPicking:Ae(t=>e.cherryPick($ht(t)),"CherryPicking")}[t.$type];r?r(t):R.error("Unknown statement type: "+t.$type)},"parseStatement"),Oht=Ae(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?iht[t.type]:iht.NORMAL,tags:t.tags??void 0}),"parseCommit"),Pht=Ae(t=>({name:t.name,order:t.order??0}),"parseBranch"),Bht=Ae(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?iht[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Fht=Ae(t=>t.branch,"parseCheckout"),$ht=Ae(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),zht={parse:Ae(async t=>{t=await Qct("gitGraph",t),R.debug(t),Rht(t,Mht)},"parse")}}),kut=i(()=>{i3(),wc(),t(),rT(),oht(),mut=D(),qht=mut?.gitGraph,Uht=new Map,jht=new Map,Ght=new Map,Wht=[],Yht=0,Hht="LR",Vht=Ae(()=>{Uht.clear(),jht.clear(),Ght.clear(),Yht=0,Wht=[],Hht="LR"},"clear"),Xht=Ae(t=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach(t=>{var e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),Kht=Ae(t=>{let r,n,i;return i="BT"===Hht?(n=Ae((t,e)=>t<=e,"comparisonFunc"),1/0):(n=Ae((t,e)=>e<=t,"comparisonFunc"),0),t.forEach(t=>{var e="TB"===Hht||"BT"==Hht?jht.get(t)?.y:jht.get(t)?.x;void 0!==e&&n(e,i)&&(r=t,i=e)}),r},"findClosestParent"),Zht=Ae(t=>{let r="",n=1/0;return t.forEach(t=>{var e=jht.get(t).y;e<=n&&(r=t,n=e)}),r||void 0},"findClosestParentBT"),Qht=Ae((t,n,e)=>{let i=e,a=e,r=[];t.forEach(t=>{var e=n.get(t);if(!e)throw new Error("Commit not found for key "+t);e.parents.length?(i=tut(e),a=Math.max(i,a)):r.push(e),eut(e,i)}),i=a,r.forEach(t=>{rut(t,i,e)}),t.forEach(t=>{var e,r;(t=n.get(t))?.parents.length&&(e=Zht(t.parents),(i=jht.get(e).y-40)<=a&&(a=i),e=Uht.get(t.branch).pos,r=i-10,jht.set(t.id,{x:e,y:r}))})},"setParallelBTPos"),Jht=Ae(t=>{var e=Kht(t.parents.filter(t=>null!==t));if(!e)throw new Error("Closest parent not found for commit "+t.id);if(void 0===(e=jht.get(e)?.y))throw new Error("Closest parent position not found for commit "+t.id);return e},"findClosestParentPos"),tut=Ae(t=>Jht(t)+40,"calculateCommitPosition"),eut=Ae((t,e)=>{var r=Uht.get(t.branch);if(r)return r=r.pos,jht.set(t.id,{x:r,y:e+=10}),{x:r,y:e};throw new Error("Branch not found for commit "+t.id)},"setCommitPosition"),rut=Ae((t,e,r)=>{var n=Uht.get(t.branch);if(!n)throw new Error("Branch not found for commit "+t.id);n=n.pos,jht.set(t.id,{x:n,y:e+r})},"setRootPosition"),nut=Ae((t,e,r,n,i,a)=>{var s;a===iht.HIGHLIGHT?(t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%8} ${n}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%8} ${n}-inner`)):a===iht.CHERRY_PICK?(t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} `+n),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} `+n),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} `+n),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} `+n),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} `+n)):((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===iht.MERGE?9:10),s.attr("class",`commit ${e.id} commit`+i%8),a===iht.MERGE&&((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",6),s.attr("class",`commit ${n} ${e.id} commit`+i%8)),a===iht.REVERSE&&t.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},`+(r.y-5)).attr("class",`commit ${n} ${e.id} commit`+i%8))},"drawCommitBullet"),iut=Ae((t,e,r,n)=>{var i,a;e.type!==iht.CHERRY_PICK&&(e.customId&&e.type===iht.MERGE||e.type!==iht.MERGE)&&qht?.showCommitLabel&&(a=(t=t.append("g")).insert("rect").attr("class","commit-label-bkg"),i=(e=t.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id)).node()?.getBBox())&&(a.attr("x",r.posWithOffset-i.width/2-2).attr("y",r.y+13.5).attr("width",i.width+4).attr("height",i.height+4),"TB"===Hht||"BT"===Hht?(a.attr("x",r.x-(i.width+16+5)).attr("y",r.y-12),e.attr("x",r.x-(i.width+16)).attr("y",r.y+i.height-12)):e.attr("x",r.posWithOffset-i.width/2),qht.rotateCommitLabel)&&("TB"===Hht||"BT"===Hht?(e.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(e=-7.5-(i.width+10)/25*9.5,a=10+i.width/25*8.5,t.attr("transform","translate("+e+", "+a+") rotate(-45, "+n+", "+r.y+")")))},"drawCommitLabel"),aut=Ae((i,a,s,o)=>{if(0{switch(t.customType??t.type){case iht.NORMAL:return"commit-normal";case iht.REVERSE:return"commit-reverse";case iht.HIGHLIGHT:return"commit-highlight";case iht.MERGE:return"commit-merge";case iht.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),out=Ae((t,e,r,n)=>{var i,a={x:0,y:0};return 0{var r="BT"===Hht&&r?e:e+10,e="TB"===Hht||"BT"===Hht?r:Uht.get(t.branch)?.pos,n="TB"===Hht||"BT"===Hht?Uht.get(t.branch)?.pos:r;if(void 0===n||void 0===e)throw new Error("Position were undefined for commit "+t.id);return{x:n,y:e,posWithOffset:r}},"getCommitPosition"),cut=Ae((t,a,s)=>{if(!qht)throw new Error("GitGraph config not found");let o=t.append("g").attr("class","commit-bullets"),l=t.append("g").attr("class","commit-labels"),c="TB"===Hht||"BT"===Hht?30:0,e=[...a.keys()],h=qht?.parallelCommits??!1,r=Ae((t,e)=>(t=a.get(t)?.seq,e=a.get(e)?.seq,void 0!==t&&void 0!==e?t-e:0),"sortKeys"),n=e.sort(r);"BT"===Hht&&(h&&Qht(n,a,c),n=n.reverse()),n.forEach(t=>{var e=a.get(t);if(!e)throw new Error("Commit not found for key "+t);h&&(c=out(e,Hht,c,jht));var r,n,i,t=lut(e,c,h);s&&(r=sut(e),n=e.customType??e.type,i=Uht.get(e.branch)?.index??0,nut(o,e,t,r,i,n),iut(l,e,t,c),aut(l,e,t,c)),"TB"===Hht||"BT"===Hht?jht.set(e.id,{x:t.x,y:t.posWithOffset}):jht.set(e.id,{x:t.posWithOffset,y:t.y}),(c="BT"===Hht&&h?c+40:c+40+10)>Yht&&(Yht=c)})},"drawCommits"),hut=Ae((e,r,t,n,i)=>{let a=(("TB"===Hht||"BT"===Hht?t.xt.branch===a,"isOnBranchToGetCurve"),o=Ae(t=>t.seq>e.seq&&t.seqo(t)&&s(t))},"shouldRerouteArrow"),uut=Ae((t,e,r=0)=>{let n=t+Math.abs(t-e)/2;var i;return 510<=Math.abs(t-n))?(Wht.push(n),n):(i=Math.abs(t-e),uut(t,e-i/5,r+1))},"findLane"),dut=Ae((t,e,r,n)=>{var i,a=jht.get(e.id),s=jht.get(r.id);if(void 0===a||void 0===s)throw new Error(`Commit positions not found for commits ${e.id} and `+r.id);let o=hut(e,r,a,s,n),l="",c="",h=0,u=0,d=Uht.get(r.branch)?.index;r.type===iht.MERGE&&e.id!==r.parents[0]&&(d=Uht.get(e.branch)?.index);let p;if(o?(l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,u=10,n=a.ys.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===iht.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${c} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x+h} ${a.y} ${l} ${s.x} ${a.y+u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):"BT"===Hht?(a.xs.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===iht.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${l} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):(a.ys.y&&(p=r.type===iht.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${c} ${a.x+u} ${s.y} L ${s.x} `+s.y),a.y===s.y&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y))),void 0===p)throw new Error("Line definition not found");t.append("path").attr("d",p).attr("class","arrow arrow"+d%8)},"drawArrow"),put=Ae((t,r)=>{let n=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{let e=r.get(t);e.parents&&0{dut(n,r.get(t),e,r)})})},"drawArrows"),gut=Ae((t,e)=>{let a=t.append("g");e.forEach((t,e)=>{var e=e%8,r=Uht.get(t.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+t.name);(n=a.append("line")).attr("x1",0),n.attr("y1",r),n.attr("x2",Yht),n.attr("y2",r),n.attr("class","branch branch"+e),"TB"===Hht?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",Yht),n.attr("x2",r)):"BT"===Hht&&(n.attr("y1",Yht),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),Wht.push(r);var n=t.name,t=Xht(n),n=a.insert("rect"),i=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+e),t=(i.node().appendChild(t),t.getBBox());n.attr("class","branchLabelBkg label"+e).attr("rx",4).attr("ry",4).attr("x",-t.width-4-(!0===qht?.rotateCommitLabel?30:0)).attr("y",-t.height/2+8).attr("width",t.width+18).attr("height",t.height+4),i.attr("transform","translate("+(-t.width-14-(!0===qht?.rotateCommitLabel?30:0))+", "+(r-t.height/2-1)+")"),"TB"===Hht?(n.attr("x",r-t.width/2-10).attr("y",0),i.attr("transform","translate("+(r-t.width/2-5)+", 0)")):"BT"===Hht?(n.attr("x",r-t.width/2-10).attr("y",Yht),i.attr("transform","translate("+(r-t.width/2-5)+", "+Yht+")")):n.attr("transform","translate(-19, "+(r-t.height/2)+")")})},"drawBranches"),fut=Ae(function(t,e,r,n,i){return Uht.set(t,{pos:e,index:r}),e+(50+(i?40:0)+("TB"===Hht||"BT"===Hht?n.width/2:0))},"setBranchPosition"),mut=Ae(function(t,e,r,n){if(Vht(),R.debug("in gitgraph renderer",t+` +`,"id:",e,r),!qht)throw new Error("GitGraph config not found");let s=qht.rotateCommitLabel??!1,i=n.db,o=(Ght=i.getCommits(),t=i.getBranchesAsObjArray(),Hht=i.getDirection(),O(`[id="${e}"]`)),l=0;t.forEach((t,e)=>{var r=Xht(t.name),n=o.append("g"),i=n.insert("g").attr("class","branchLabel"),a=i.insert("g").attr("class","label branch-label"),r=(a.node()?.appendChild(r),r.getBBox());l=fut(t.name,l,e,r,s),a.remove(),i.remove(),n.remove()}),cut(o,Ght,!1),qht.showBranches&&gut(o,t),put(o,Ght),cut(o,Ght,!0),Q8.insertTitle(o,"gitTitleText",qht.titleTopMargin??0,i.getDiagramTitle()),El(void 0,o,qht.diagramPadding,qht.useMaxWidth)},"draw"),yut={draw:mut}}),Tut=i(()=>{vut=Ae(e=>` + .commit-id, + .commit-msg, + .branch-label { + fill: lightgrey; + color: lightgrey; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + } + ${[0,1,2,3,4,5,6,7].map(t=>` + .branch-label${t} { fill: ${e["gitBranchLabel"+t]}; } + .commit${t} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; } + .commit-highlight${t} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; } + .label${t} { fill: ${e["git"+t]}; } + .arrow${t} { stroke: ${e["git"+t]}; } + `).join(` +`)} + + .branch { + stroke-width: 1; + stroke: ${e.lineColor}; + stroke-dasharray: 2; + } + .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelColor};} + .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} + .tag-label-bkg { fill: ${e.tagLabelBackground}; stroke: ${e.tagLabelBorder}; } + .tag-hole { fill: ${e.textColor}; } + + .commit-merge { + stroke: ${e.primaryColor}; + fill: ${e.primaryColor}; + } + .commit-reverse { + stroke: ${e.primaryColor}; + fill: ${e.primaryColor}; + stroke-width: 3; + } + .commit-highlight-outer { + } + .commit-highlight-inner { + stroke: ${e.primaryColor}; + fill: ${e.primaryColor}; + } + + .arrow { stroke-width: 8; stroke-linecap: round; fill: none} + .gitTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${e.textColor}; + } +`,"getStyles"),xut=vut}),_ut={};A(_ut,{diagram:()=>Eut});var Eut,Sut,Cut,Aut=i(()=>{wut(),but(),kut(),Tut(),Eut={parser:zht,db:Mht,renderer:yut,styles:xut}}),Lut=i(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],i=[1,27],a=[1,28],s=[1,29],o=[1,30],l=[1,31],c=[1,32],h=[1,33],u=[1,34],d=[1,9],p=[1,10],g=[1,11],f=[1,12],m=[1,13],y=[1,14],v=[1,15],x=[1,16],b=[1,19],w=[1,20],k=[1,21],T=[1,22],_=[1,23],E=[1,25],S=[1,35],n={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.setWeekday("monday");break;case 9:n.setWeekday("tuesday");break;case 10:n.setWeekday("wednesday");break;case 11:n.setWeekday("thursday");break;case 12:n.setWeekday("friday");break;case 13:n.setWeekday("saturday");break;case 14:n.setWeekday("sunday");break;case 15:n.setWeekend("friday");break;case 16:n.setWeekend("saturday");break;case 17:n.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:n.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:n.TopAxis(),this.$=a[o].substr(8);break;case 20:n.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:n.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:n.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:n.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:n.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 31:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:n.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],n.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],null),n.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],n.setClickEvent(a[o-2],a[o],null),n.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-1],a[o]),n.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],n.setLink(a[o-1],a[o]);break;case 41:case 47:this.$=a[o-1]+" "+a[o];break;case 42:case 43:case 45:this.$=a[o-2]+" "+a[o-1]+" "+a[o];break;case 44:case 46:this.$=a[o-3]+" "+a[o-2]+" "+a[o-1]+" "+a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:w,33:k,35:T,36:_,37:24,38:E,40:S},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:36,11:17,12:n,13:i,14:a,15:s,16:o,17:l,18:c,19:18,20:h,21:u,22:d,23:p,24:g,25:f,26:m,27:y,28:v,29:x,30:b,31:w,33:k,35:T,36:_,37:24,38:E,40:S},e(r,[2,5]),e(r,[2,6]),e(r,[2,17]),e(r,[2,18]),e(r,[2,19]),e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),e(r,[2,23]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),e(r,[2,27]),{32:[1,37]},{34:[1,38]},e(r,[2,30]),e(r,[2,31]),e(r,[2,32]),{39:[1,39]},e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{41:[1,40],43:[1,41]},e(r,[2,4]),e(r,[2,28]),e(r,[2,29]),e(r,[2,33]),e(r,[2,34],{42:[1,42],43:[1,43]}),e(r,[2,40],{41:[1,44]}),e(r,[2,35],{43:[1,45]}),e(r,[2,36]),e(r,[2,38],{42:[1,46]}),e(r,[2,37]),e(r,[2,39])],defaultActions:{},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0{function r(){return function(t,e,i){var a=Ae(function(t){return t.add(4-t.isoWeekday(),"day")},"a"),s=((e=e.prototype).isoWeekYear=function(){return a(this).year()},e.isoWeek=function(t){var e,r,n;return this.$utils().u(t)?(r=a(this),n=this.isoWeekYear(),e=4-(n=(this.$u?i.utc:i)().year(n).startOf("year")).isoWeekday(),4{function r(){var o={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},l=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,t=/\d\d/,e=/\d\d?/,r=/\d*[^-_:/,()\s\d]+/,g={},n=Ae(function(t){return(t=+t)+(68{function r(){return function(t,e){var a=(e=e.prototype).format;e.format=function(t){var e,r,n=this,i=this.$locale();return this.isValid()?(e=this.$utils(),r=(t||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(t){switch(t){case"Q":return Math.ceil((n.$M+1)/3);case"Do":return i.ordinal(n.$D);case"gggg":return n.weekYear();case"GGGG":return n.isoWeekYear();case"wo":return i.ordinal(n.week(),"W");case"w":case"ww":return e.s(n.week(),"w"===t?1:2,"0");case"W":case"WW":return e.s(n.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return e.s(String(0===n.$H?24:n.$H),"k"===t?1:2,"0");case"X":return Math.floor(n.$d.getTime()/1e3);case"x":return n.$d.getTime();case"z":return"["+n.offsetName()+"]";case"zzz":return"["+n.offsetName("long")+"]";default:return t}}),a.bind(this)(r)):a.bind(this)(t)}}}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=r()});function Rut(r,n,t){let i=!0;for(;i;)i=!1,t.forEach(function(t){var e=new RegExp("^\\s*"+t+"\\s*$");r[0].match(e)&&(n[t]=!0,r.shift(1),i=!0)})}var Dut,Out,Put,But,Fut,$ut,zut,qut,Uut,jut,Gut,Wut,Yut,Hut,Vut,Xut,Kut,Zut,Qut,Jut,tdt,edt,rdt,ndt,idt,adt,sdt,odt,ldt,cdt,hdt,udt,ddt,pdt,gdt,fdt,mdt,ydt,vdt,xdt,bdt,wdt,kdt,Tdt,_dt,Edt,Sdt,Cdt,Adt,Ldt,Ndt,Idt,Mdt,Rdt,Ddt,Odt,Pdt,Bdt,Fdt,$dt,zdt,qdt,Udt,jdt,Gdt,Wdt,Ydt,Hdt,Vdt,Xdt,Kdt,Zdt,Qdt,Jdt,t0t,e0t,r0t,n0t,i0t,a0t,s0t,o0t=i(()=>{Dut=M(s3(),1),Out=M(Ye(),1),edt=M(Nut(),1),rdt=M(Iut(),1),ndt=M(Mut(),1),t(),wc(),rT(),bc(),Out.default.extend(edt.default),Out.default.extend(rdt.default),Out.default.extend(ndt.default),Put={friday:5,saturday:6},zut=Fut=But="",qut=[],Uut=[],jut=new Map,Gut=[],Wut=[],Hut=Yut="",Vut=["active","done","crit","milestone"],Zut=Kut=!(Xut=[]),Qut="sunday",Jut="saturday",tdt=0,edt=Ae(function(){Gut=[],Wut=[],Xut=[],$dt=[],$ut=Fdt=Bdt=void(Rdt=0),zut=Hut=Fut=But=Yut="",qut=[],Zut=Kut=!(Uut=[]),tdt=0,jut=new Map,pl(),Qut="sunday",Jut="saturday"},"clear"),rdt=Ae(function(t){Fut=t},"setAxisFormat"),ndt=Ae(function(){return Fut},"getAxisFormat"),idt=Ae(function(t){$ut=t},"setTickInterval"),adt=Ae(function(){return $ut},"getTickInterval"),sdt=Ae(function(t){zut=t},"setTodayMarker"),odt=Ae(function(){return zut},"getTodayMarker"),ldt=Ae(function(t){But=t},"setDateFormat"),cdt=Ae(function(){Kut=!0},"enableInclusiveEndDates"),hdt=Ae(function(){return Kut},"endDatesAreInclusive"),udt=Ae(function(){Zut=!0},"enableTopAxis"),ddt=Ae(function(){return Zut},"topAxisEnabled"),pdt=Ae(function(t){Hut=t},"setDisplayMode"),gdt=Ae(function(){return Hut},"getDisplayMode"),fdt=Ae(function(){return But},"getDateFormat"),mdt=Ae(function(t){qut=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),ydt=Ae(function(){return qut},"getIncludes"),vdt=Ae(function(t){Uut=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),xdt=Ae(function(){return Uut},"getExcludes"),bdt=Ae(function(){return jut},"getLinks"),wdt=Ae(function(t){Yut=t,Gut.push(t)},"addSection"),kdt=Ae(function(){return Gut},"getSections"),Tdt=Ae(function(){let t=Gdt(),e=0;for(;!t&&e<10;)t=Gdt(),e++;return Wut=$dt},"getTasks"),_dt=Ae(function(t,e,r,n){return!n.includes(t.format(e.trim()))&&(!((!r.includes("weekends")||t.isoWeekday()!==Put[Jut]&&t.isoWeekday()!==Put[Jut]+1)&&!r.includes(t.format("dddd").toLowerCase()))||r.includes(t.format(e.trim())))},"isInvalidDate"),Edt=Ae(function(t){Qut=t},"setWeekday"),Sdt=Ae(function(){return Qut},"getWeekday"),Cdt=Ae(function(t){Jut=t},"setWeekend"),Adt=Ae(function(e,r,n,i){if(n.length&&!e.manualEndTime){let t;t=(t=e.startTime instanceof Date?(0,Out.default)(e.startTime):(0,Out.default)(e.startTime,r,!0)).add(1,"d");var a=e.endTime instanceof Date?(0,Out.default)(e.endTime):(0,Out.default)(e.endTime,r,!0),[r,n]=Ldt(t,a,r,n,i);e.endTime=r.toDate(),e.renderEndTime=n}},"checkTaskDates"),Ldt=Ae(function(t,e,r,n,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),(a=_dt(t,r,n,i))&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},"fixTaskDates"),Ndt=Ae(function(t,e,r){r=r.trim();var n=/^after\s+(?[\d\w- ]+)/.exec(r);if(null!==n){let t=null;for(var i of n.groups.ids.split(" "))void 0!==(i=Udt(i))&&(!t||i.endTime>t.endTime)&&(t=i);return t?t.endTime:((n=new Date).setHours(0,0,0,0),n)}if((n=(0,Out.default)(r,e.trim(),!0)).isValid())return n.toDate();if(R.debug("Invalid date:"+r),R.debug("With date format:"+e.trim()),void 0===(n=new Date(r))||isNaN(n.getTime())||n.getFullYear()<-1e4||1e4[\d\w- ]+)/.exec(r);if(null!==i){let t=null;for(var a of i.groups.ids.split(" "))void 0!==(a=Udt(a))&&(!t||a.startTime{window.open(r,"_self")}),jut.set(t,r))}),Ydt(t,"clickable")},"setLink"),Ydt=Ae(function(t,e){t.split(",").forEach(function(t){void 0!==(t=Udt(t))&&t.classes.push(e)})},"setClass"),Hdt=Ae(function(t,e,n){if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{Q8.runFunc(e,...r)})}},"setClickFun"),Vdt=Ae(function(e,r){Xut.push(function(){var t=document.querySelector(`[id="${e}"]`);null!==t&&t.addEventListener("click",function(){r()})},function(){var t=document.querySelector(`[id="${e}-text"]`);null!==t&&t.addEventListener("click",function(){r()})})},"pushFun"),Xdt=Ae(function(t,e,r){t.split(",").forEach(function(t){Hdt(t,e,r)}),Ydt(t,"clickable")},"setClickEvent"),Kdt=Ae(function(e){Xut.forEach(function(t){t(e)})},"bindFunctions"),Zdt={getConfig:Ae(()=>D().gantt,"getConfig"),clear:edt,setDateFormat:ldt,getDateFormat:fdt,enableInclusiveEndDates:cdt,endDatesAreInclusive:hdt,enableTopAxis:udt,topAxisEnabled:ddt,setAxisFormat:rdt,getAxisFormat:ndt,setTickInterval:idt,getTickInterval:adt,setTodayMarker:sdt,getTodayMarker:odt,setAccTitle:gl,getAccTitle:fl,setDiagramTitle:vl,getDiagramTitle:xl,setDisplayMode:pdt,getDisplayMode:gdt,setAccDescription:ml,getAccDescription:yl,addSection:wdt,getSections:kdt,getTasks:Tdt,addTask:qdt,findTaskById:Udt,addTaskOrg:jdt,setIncludes:mdt,getIncludes:ydt,setExcludes:vdt,getExcludes:xdt,setClickEvent:Xdt,setLink:Wdt,getLinks:bdt,bindFunctions:Kdt,parseDuration:Idt,isInvalidDate:_dt,setWeekday:Edt,getWeekday:Sdt,setWeekend:Cdt},Ae(Rut,"getTaskTags")}),l0t=i(()=>{Qdt=M(Ye(),1),t(),i3(),al(),wc(),sl(),Jdt=Ae(function(){R.debug("Something is calling, setConf, remove the call")},"setConf"),t0t={monday:h2,tuesday:u2,wednesday:d2,thursday:p2,friday:g2,saturday:f2,sunday:c2},e0t=Ae((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),i=0;for(var a of n)for(let t=0;t=r[t]){r[t]=a.endTime,a.order=t+e,t>i&&(i=t);break}return i},"getMaxIntersections"),n0t=Ae(function(t,l,e,d){let p=D().gantt,r=D().securityLevel,n,i=("sandbox"===r&&(n=O("#i"+l)),O("sandbox"===r?n.nodes()[0].contentDocument.body:"body")),s="sandbox"===r?n.nodes()[0].contentDocument:document,a=s.getElementById(l),o=(void 0===(r0t=a.parentElement.offsetWidth)&&(r0t=1200),void 0!==p.useWidth&&(r0t=p.useWidth),d.db.getTasks()),u=[];for(var c of o)u.push(c.type);u=A(u);let h={},g=2*p.topPadding;if("compact"===d.db.getDisplayMode()||"compact"===p.displayMode){var f,m,y={};for(f of o)void 0===y[f.section]?y[f.section]=[f]:y[f.section].push(f);let t=0;for(m of Object.keys(y)){var v=e0t(y[m],t)+1;t+=v,g+=v*(p.barHeight+p.barGap),h[m]=v}}else{g+=o.length*(p.barHeight+p.barGap);for(let e of u)h[e]=o.filter(t=>t.type===e).length}a.setAttribute("viewBox","0 0 "+r0t+" "+g);let x=i.select(`[id="${l}"]`),b=p4().domain([Qc(o,function(t){return t.startTime}),Kc(o,function(t){return t.endTime})]).rangeRound([0,r0t-p.leftPadding-p.rightPadding]);function w(t,e){let r=t.startTime,n=e.startTime,i=0;return nt.order))].map(e=>t.find(t=>t.order===e));x.append("g").selectAll("rect").data(a).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*r+n-2}).attr("width",function(){return h-p.rightPadding/2}).attr("height",r).attr("class",function(t){for(var[e,r]of u.entries())if(t.type===r)return"section section"+e%p.numberSectionStyles;return"section section0"});let s=x.append("g").selectAll("rect").data(t).enter(),o=d.db.getLinks();if(s.append("rect").attr("id",function(t){return t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?b(t.startTime)+i+.5*(b(t.endTime)-b(t.startTime))-.5*c:b(t.startTime)+i}).attr("y",function(t,e){return t.order*r+n}).attr("width",function(t){return t.milestone?c:b(t.renderEndTime||t.endTime)-b(t.startTime)}).attr("height",c).attr("transform-origin",function(t,e){return e=t.order,(b(t.startTime)+i+.5*(b(t.endTime)-b(t.startTime))).toString()+"px "+(e*r+n+.5*c).toString()+"px"}).attr("class",function(t){let e="",r=(0r-e?r+t+1.5*p.leftPadding>h?e+i-5:r+i+5:(r-e)/2+e+i}).attr("y",function(t,e){return t.order*r+p.barHeight/2+(p.fontSize/2-2)+n}).attr("text-height",c).attr("class",function(t){let e=b(t.startTime),r=b(t.endTime),n=(t.milestone&&(r=e+c),this.getBBox().width),i="",a=(0r-e?r+n+1.5*p.leftPadding>h?i+" taskTextOutsideLeft taskTextOutside"+a+" "+l:i+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+n:i+" taskText taskText"+a+" "+l+" width-"+n}),"sandbox"===D().securityLevel){let a=O("#i"+l).nodes()[0].contentDocument;s.filter(function(t){return o.has(t.id)}).each(function(t){var e=a.querySelector("#"+t.id),r=a.querySelector("#"+t.id+"-text"),n=e.parentNode,i=a.createElement("a");i.setAttribute("xlink:href",o.get(t.id)),i.setAttribute("target","_top"),n.appendChild(i),i.appendChild(e),i.appendChild(r)})}}function _(s,o,l,t,c,e,h,u){if(0!==h.length||0!==u.length){let i,a;for(var{startTime:r,endTime:n}of e)(void 0===i||ra)&&(a=n);if(i&&a)if(5<(0,Qdt.default)(a).diff((0,Qdt.default)(i),"year"))R.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");else{let t=d.db.getDateFormat(),e=[],r=null,n=(0,Qdt.default)(i);for(;n.valueOf()<=a;)d.db.isInvalidDate(n,t,h,u)?r?r.end=n:r={start:n,end:n}:r&&(e.push(r),r=null),n=n.add(1,"d");x.append("g").selectAll("rect").data(e).enter().append("rect").attr("id",function(t){return"exclude-"+t.start.format("YYYY-MM-DD")}).attr("x",function(t){return b(t.start)+l}).attr("y",p.gridLineStartPadding).attr("width",function(t){var e=t.end.add(1,"day");return b(e)-b(t.start)}).attr("height",c-o-p.gridLineStartPadding).attr("transform-origin",function(t,e){return(b(t.start)+l+.5*(b(t.end)-b(t.start))).toString()+"px "+(e*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function E(t,e,r,n){var i=dh(b).tickSize(-n+e+p.gridLineStartPadding).tickFormat(o4(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d")),a=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(d.db.getTickInterval()||p.tickInterval);if(null!==a){var s=a[1],o=a[2],l=d.db.getWeekday()||p.weekday;switch(o){case"millisecond":i.ticks(Yy.every(s));break;case"second":i.ticks(Hy.every(s));break;case"minute":i.ticks(Vy.every(s));break;case"hour":i.ticks(Ky.every(s));break;case"day":i.ticks(Qy.every(s));break;case"week":i.ticks(t0t[l].every(s));break;case"month":i.ticks(T2.every(s))}}if(x.append("g").attr("class","grid").attr("transform","translate("+t+", "+(n-50)+")").call(i).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),d.db.topAxisEnabled()||p.topAxis){var c=uh(b).tickSize(-n+e+p.gridLineStartPadding).tickFormat(o4(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d"));if(null!==a){var h=a[1],o=a[2],u=d.db.getWeekday()||p.weekday;switch(o){case"millisecond":c.ticks(Yy.every(h));break;case"second":c.ticks(Hy.every(h));break;case"minute":c.ticks(Vy.every(h));break;case"hour":c.ticks(Ky.every(h));break;case"day":c.ticks(Qy.every(h));break;case"week":c.ticks(t0t[u].every(h));break;case"month":c.ticks(T2.every(h))}}x.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function S(r,n){let i=0,a=Object.keys(h).map(t=>[t,h[t]]);x.append("g").selectAll("text").data(a).enter().append(function(t){var e,r,n=-((t=t[0].split(L.lineBreakRegex)).length-1)/2,i=s.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for([e,r]of t.entries()){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),0{a0t=Ae(t=>` + .mermaid-main-font { + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .exclude-range { + fill: ${t.excludeBkgColor}; + } + + .section { + stroke: none; + opacity: 0.2; + } + + .section0 { + fill: ${t.sectionBkgColor}; + } + + .section2 { + fill: ${t.sectionBkgColor2}; + } + + .section1, + .section3 { + fill: ${t.altSectionBkgColor}; + opacity: 0.2; + } + + .sectionTitle0 { + fill: ${t.titleColor}; + } + + .sectionTitle1 { + fill: ${t.titleColor}; + } + + .sectionTitle2 { + fill: ${t.titleColor}; + } + + .sectionTitle3 { + fill: ${t.titleColor}; + } + + .sectionTitle { + text-anchor: start; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + + /* Grid and axis */ + + .grid .tick { + stroke: ${t.gridColor}; + opacity: 0.8; + shape-rendering: crispEdges; + } + + .grid .tick text { + font-family: ${t.fontFamily}; + fill: ${t.textColor}; + } + + .grid path { + stroke-width: 0; + } + + + /* Today line */ + + .today { + fill: none; + stroke: ${t.todayLineColor}; + stroke-width: 2px; + } + + + /* Task styling */ + + /* Default task */ + + .task { + stroke-width: 2; + } + + .taskText { + text-anchor: middle; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .taskTextOutsideRight { + fill: ${t.taskTextDarkColor}; + text-anchor: start; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } + + .taskTextOutsideLeft { + fill: ${t.taskTextDarkColor}; + text-anchor: end; + } + + + /* Special case clickable */ + + .task.clickable { + cursor: pointer; + } + + .taskText.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideLeft.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + .taskTextOutsideRight.clickable { + cursor: pointer; + fill: ${t.taskTextClickableColor} !important; + font-weight: bold; + } + + + /* Specific task settings for the sections*/ + + .taskText0, + .taskText1, + .taskText2, + .taskText3 { + fill: ${t.taskTextColor}; + } + + .task0, + .task1, + .task2, + .task3 { + fill: ${t.taskBkgColor}; + stroke: ${t.taskBorderColor}; + } + + .taskTextOutside0, + .taskTextOutside2 + { + fill: ${t.taskTextOutsideColor}; + } + + .taskTextOutside1, + .taskTextOutside3 { + fill: ${t.taskTextOutsideColor}; + } + + + /* Active task */ + + .active0, + .active1, + .active2, + .active3 { + fill: ${t.activeTaskBkgColor}; + stroke: ${t.activeTaskBorderColor}; + } + + .activeText0, + .activeText1, + .activeText2, + .activeText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Completed task */ + + .done0, + .done1, + .done2, + .done3 { + stroke: ${t.doneTaskBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + } + + .doneText0, + .doneText1, + .doneText2, + .doneText3 { + fill: ${t.taskTextDarkColor} !important; + } + + + /* Tasks on the critical line */ + + .crit0, + .crit1, + .crit2, + .crit3 { + stroke: ${t.critBorderColor}; + fill: ${t.critBkgColor}; + stroke-width: 2; + } + + .activeCrit0, + .activeCrit1, + .activeCrit2, + .activeCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.activeTaskBkgColor}; + stroke-width: 2; + } + + .doneCrit0, + .doneCrit1, + .doneCrit2, + .doneCrit3 { + stroke: ${t.critBorderColor}; + fill: ${t.doneTaskBkgColor}; + stroke-width: 2; + cursor: pointer; + shape-rendering: crispEdges; + } + + .milestone { + transform: rotate(45deg) scale(0.8,0.8); + } + + .milestoneText { + font-style: italic; + } + .doneCritText0, + .doneCritText1, + .doneCritText2, + .doneCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .activeCritText0, + .activeCritText1, + .activeCritText2, + .activeCritText3 { + fill: ${t.taskTextDarkColor} !important; + } + + .titleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.titleColor||t.textColor}; + font-family: var(--mermaid-font-family, "trebuchet ms", verdana, arial, sans-serif); + } +`,"getStyles"),s0t=a0t}),h0t={};A(h0t,{diagram:()=>u0t});var u0t,d0t,p0t,g0t,f0t,m0t,y0t,v0t,x0t,b0t=i(()=>{Lut(),o0t(),l0t(),c0t(),u0t={parser:Cut,db:Zdt,renderer:i0t,styles:s0t}}),w0t=i(()=>{rht(),t(),d0t={parse:Ae(async t=>{t=await Qct("info",t),R.debug(t)},"parse")}}),k0t=i(()=>{p0t="11.0.2"}),T0t=i(()=>{k0t(),g0t={version:p0t},f0t=Ae(()=>g0t.version,"getVersion"),m0t={getVersion:f0t}}),_0t=i(()=>{i3(),wc(),y0t=Ae(t=>{let e=D().securityLevel,r=O("body");var n;return"sandbox"===e&&(n=O("#i"+t).node()?.contentDocument??document,r=O(n.body)),r.select("#"+t)},"selectSvgElement")}),E0t=i(()=>{t(),_0t(),sl(),v0t=Ae((t,e,r)=>{R.debug(`rendering info diagram +`+t),t=y0t(e),Jo(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text("v"+r)},"draw"),x0t={draw:v0t}}),S0t={};A(S0t,{diagram:()=>C0t});var C0t,A0t,L0t,N0t,I0t,M0t,R0t,D0t,O0t,P0t,B0t,F0t,$0t,z0t,q0t,U0t,j0t,G0t,W0t,Y0t=i(()=>{w0t(),T0t(),E0t(),C0t={parser:d0t,db:m0t,renderer:x0t}}),H0t=i(()=>{t(),bc(),Dr(),M0t=ke.pie,A0t={sections:new Map,showData:!1,config:M0t},L0t=A0t.sections,N0t=A0t.showData,I0t=structuredClone(M0t),M0t=Ae(()=>structuredClone(I0t),"getConfig"),R0t=Ae(()=>{L0t=new Map,N0t=A0t.showData,pl()},"clear"),D0t=Ae(({label:t,value:e})=>{L0t.has(t)||(L0t.set(t,e),R.debug(`added new section: ${t}, with value: `+e))},"addSection"),O0t=Ae(()=>L0t,"getSections"),P0t=Ae(t=>{N0t=t},"setShowData"),B0t=Ae(()=>N0t,"getShowData"),F0t={getConfig:M0t,clear:R0t,setDiagramTitle:vl,getDiagramTitle:xl,setAccTitle:gl,getAccTitle:fl,setAccDescription:ml,getAccDescription:yl,addSection:D0t,getSections:O0t,setShowData:P0t,getShowData:B0t}}),V0t=i(()=>{rht(),t(),sht(),H0t(),$0t=Ae((t,e)=>{nht(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),z0t={parse:Ae(async t=>{t=await Qct("pie",t),R.debug(t),$0t(t,F0t)},"parse")}}),X0t=i(()=>{q0t=Ae(t=>` + .pieCircle{ + stroke: ${t.pieStrokeColor}; + stroke-width : ${t.pieStrokeWidth}; + opacity : ${t.pieOpacity}; + } + .pieOuterCircle{ + stroke: ${t.pieOuterStrokeColor}; + stroke-width: ${t.pieOuterStrokeWidth}; + fill: none; + } + .pieTitleText { + text-anchor: middle; + font-size: ${t.pieTitleTextSize}; + fill: ${t.pieTitleTextColor}; + font-family: ${t.fontFamily}; + } + .slice { + font-family: ${t.fontFamily}; + fill: ${t.pieSectionTextColor}; + font-size:${t.pieSectionTextSize}; + // fill: white; + } + .legend text { + fill: ${t.pieLegendTextColor}; + font-family: ${t.fontFamily}; + font-size: ${t.pieLegendTextSize}; + } +`,"getStyles"),U0t=q0t}),K0t=i(()=>{i3(),wc(),t(),_0t(),sl(),rT(),j0t=Ae(t=>(t=[...t.entries()].map(t=>({label:t[0],value:t[1]})).sort((t,e)=>e.value-t.value),lx().value(t=>t.value)(t)),"createPieArcs"),G0t=Ae((t,e,r,n)=>{R.debug(`rendering pie chart +`+t);let i=n.db,a=D(),s=S8(i.getConfig(),a.pie),o=y0t(e),l=o.append("g");l.attr("transform","translate(225,225)");var t=a.themeVariables,[n]=Z8(t.pieOuterStrokeWidth);n??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=Y4().innerRadius(0).outerRadius(h),d=Y4().innerRadius(h*c).outerRadius(h*c),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",h+n/2).attr("class","pieOuterCircle"),i.getSections()),g=j0t(p),f=[t.pie1,t.pie2,t.pie3,t.pie4,t.pie5,t.pie6,t.pie7,t.pie8,t.pie9,t.pie10,t.pie11,t.pie12],m=yy(f),y=(l.selectAll("mySlices").data(g).enter().append("path").attr("d",u).attr("fill",t=>m(t.data.label)).attr("class","pieCircle"),0);p.forEach(t=>{y+=t}),l.selectAll("mySlices").data(g).enter().append("text").text(t=>(t.data.value/y*100).toFixed(0)+"%").attr("transform",t=>"translate("+d.centroid(t)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),(e=l.selectAll(".legend").data(m.domain()).enter().append("g").attr("class","legend").attr("transform",(t,e)=>"translate(216,"+(22*e-22*m.domain().length/2)+")")).append("rect").attr("width",18).attr("height",18).style("fill",m).style("stroke",m),e.data(g).append("text").attr("x",22).attr("y",14).text(t=>{var{label:t,value:e}=t.data;return i.getShowData()?t+` [${e}]`:t}),t=512+(n=Math.max(...e.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0))),o.attr("viewBox",`0 0 ${t} 450`),Jo(o,450,t,s.useMaxWidth)},"draw"),W0t={draw:G0t}}),Z0t={};A(Z0t,{diagram:()=>Q0t});var Q0t,J0t,tpt,ept,rpt,npt=i(()=>{V0t(),H0t(),X0t(),K0t(),Q0t={parser:z0t,db:F0t,renderer:W0t,styles:U0t}}),ipt=i(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,3],n=[1,4],i=[1,5],a=[1,6],s=[1,7],P=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],B=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[55,56,57],F=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],$=[1,14],z=[1,23],q=[1,18],U=[1,19],j=[1,20],G=[1,21],W=[1,22],Y=[1,24],H=[1,25],V=[1,26],X=[1,27],K=[1,28],Z=[1,29],g=[1,32],f=[1,33],m=[1,34],y=[1,39],v=[1,40],x=[1,42],b=[1,44],w=[1,62],k=[1,61],T=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],J=[1,66],tt=[1,67],et=[1,68],rt=[1,69],nt=[1,70],it=[1,71],at=[1,72],st=[1,73],ot=[1,74],lt=[1,75],ct=[1,76],_=[4,5,6,7,8,9,10,11,12,13,14,15,18],E=[1,90],S=[1,91],C=[1,92],A=[1,99],L=[1,93],N=[1,96],I=[1,94],M=[1,95],R=[1,97],D=[1,98],ht=[1,102],ut=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:"error",4:"ALPHA",5:"NUM",6:"NODE_STRING",7:"DOWN",8:"MINUS",9:"DEFAULT",10:"COMMA",11:"COLON",12:"AMP",13:"BRKT",14:"MULT",15:"UNICODE_TEXT",17:"UNIT",18:"SPACE",19:"STYLE",20:"PCT",25:"CLASSDEF",28:"QUADRANT",35:"title",36:"title_value",37:"acc_title",38:"acc_title_value",39:"acc_descr",40:"acc_descr_value",41:"acc_descr_multiline_value",42:"section",44:"point_start",45:"point_x",46:"point_y",47:"class_name",48:"X-AXIS",49:"AXIS-TEXT-DELIMITER",50:"Y-AXIS",51:"QUADRANT_1",52:"QUADRANT_2",53:"QUADRANT_3",54:"QUADRANT_4",55:"NEWLINE",56:"SEMI",57:"EOF",60:"STR",61:"MD_STR",63:"PUNCTUATION",64:"PLUS",65:"EQUALS",66:"DOT",67:"UNDERSCORE"},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 23:this.$=a[o];break;case 24:this.$=a[o-1]+""+a[o];break;case 26:this.$=a[o-1]+a[o];break;case 27:this.$=[a[o].trim()];break;case 28:a[o-2].push(a[o].trim()),this.$=a[o-2];break;case 29:this.$=a[o-4],n.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),n.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 46:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:n.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:n.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:n.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:n.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:n.setXAxisLeftText(a[o-2]),n.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",n.setXAxisLeftText(a[o-1]);break;case 53:n.setXAxisLeftText(a[o]);break;case 54:n.setYAxisBottomText(a[o-2]),n.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",n.setYAxisBottomText(a[o-1]);break;case 56:n.setYAxisBottomText(a[o]);break;case 57:n.setQuadrant1Text(a[o]);break;case 58:n.setQuadrant2Text(a[o]);break;case 59:n.setQuadrant3Text(a[o]);break;case 60:n.setQuadrant4Text(a[o]);break;case 64:this.$={text:a[o],type:"text"};break;case 65:this.$={text:a[o-1].text+""+a[o],type:a[o-1].type};break;case 66:this.$={text:a[o],type:"text"};break;case 67:this.$={text:a[o],type:"markdown"};break;case 68:this.$=a[o];break;case 69:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[{18:r,26:1,27:2,28:n,55:i,56:a,57:s},{1:[3]},{18:r,26:8,27:2,28:n,55:i,56:a,57:s},{18:r,26:9,27:2,28:n,55:i,56:a,57:s},e(P,[2,33],{29:10}),e(B,[2,61]),e(B,[2,62]),e(B,[2,63]),{1:[2,30]},{1:[2,31]},e(o,F,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:l,5:c,10:h,12:u,13:d,14:p,18:$,25:z,35:q,37:U,39:j,41:G,42:W,48:Y,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(P,[2,34]),{27:45,55:i,56:a,57:s},e(o,[2,37]),e(o,F,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:l,5:c,10:h,12:u,13:d,14:p,18:$,25:z,35:q,37:U,39:j,41:G,42:W,48:Y,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(o,[2,39]),e(o,[2,40]),e(o,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},e(o,[2,45]),e(o,[2,46]),{18:[1,50]},{4:l,5:c,10:h,12:u,13:d,14:p,43:51,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:52,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:53,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:54,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:55,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:56,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,44:[1,57],47:[1,58],58:60,59:59,63:m,64:y,65:v,66:x,67:b},e(T,[2,64]),e(T,[2,66]),e(T,[2,67]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(T,[2,79]),e(T,[2,80]),e(P,[2,35]),e(o,[2,38]),e(o,[2,42]),e(o,[2,43]),e(o,[2,44]),{3:64,4:Q,5:J,6:tt,7:et,8:rt,9:nt,10:it,11:at,12:st,13:ot,14:lt,15:ct,21:63},e(o,[2,53],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,77],63:m,64:y,65:v,66:x,67:b}),e(o,[2,56],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,78],63:m,64:y,65:v,66:x,67:b}),e(o,[2,57],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,58],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,59],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,60],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),{45:[1,79]},{44:[1,80]},e(T,[2,65]),e(T,[2,81]),e(T,[2,82]),e(T,[2,83]),{3:82,4:Q,5:J,6:tt,7:et,8:rt,9:nt,10:it,11:at,12:st,13:ot,14:lt,15:ct,18:[1,81]},e(_,[2,23]),e(_,[2,1]),e(_,[2,2]),e(_,[2,3]),e(_,[2,4]),e(_,[2,5]),e(_,[2,6]),e(_,[2,7]),e(_,[2,8]),e(_,[2,9]),e(_,[2,10]),e(_,[2,11]),e(_,[2,12]),e(o,[2,52],{58:31,43:83,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(o,[2,55],{58:31,43:84,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),{46:[1,85]},{45:[1,86]},{4:E,5:S,6:C,8:A,11:L,13:N,16:89,17:I,18:M,19:R,20:D,22:88,23:87},e(_,[2,24]),e(o,[2,51],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,54],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,47],{22:88,16:89,23:100,4:E,5:S,6:C,8:A,11:L,13:N,17:I,18:M,19:R,20:D}),{46:[1,101]},e(o,[2,29],{10:ht}),e(ut,[2,27],{16:103,4:E,5:S,6:C,8:A,11:L,13:N,17:I,18:M,19:R,20:D}),e(O,[2,25]),e(O,[2,13]),e(O,[2,14]),e(O,[2,15]),e(O,[2,16]),e(O,[2,17]),e(O,[2,18]),e(O,[2,19]),e(O,[2,20]),e(O,[2,21]),e(O,[2,22]),e(o,[2,49],{10:ht}),e(o,[2,48],{22:88,16:89,23:104,4:E,5:S,6:C,8:A,11:L,13:N,17:I,18:M,19:R,20:D}),{4:E,5:S,6:C,8:A,11:L,13:N,16:89,17:I,18:M,19:R,20:D,22:105},e(O,[2,26]),e(o,[2,50],{10:ht}),e(ut,[2,28],{16:103,4:E,5:S,6:C,8:A,11:L,13:N,17:I,18:M,19:R,20:D})],defaultActions:{8:[2,30],9:[2,31]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0 *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};r.lexer=n,Ae(t,"Parser"),(J0t=new((t.prototype=r).Parser=t)).parser=J0t,tpt=J0t}),apt=i(()=>{i3(),Dr(),t(),Lr(),ept=ue(),rpt=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{Ae(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:ke.quadrantChart?.chartWidth||500,chartWidth:ke.quadrantChart?.chartHeight||500,titlePadding:ke.quadrantChart?.titlePadding||10,titleFontSize:ke.quadrantChart?.titleFontSize||20,quadrantPadding:ke.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:ke.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:ke.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:ke.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:ke.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:ke.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:ke.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:ke.quadrantChart?.pointTextPadding||5,pointLabelFontSize:ke.quadrantChart?.pointLabelFontSize||12,pointRadius:ke.quadrantChart?.pointRadius||5,xAxisPosition:ke.quadrantChart?.xAxisPosition||"top",yAxisPosition:ke.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:ke.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:ke.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:ept.quadrant1Fill,quadrant2Fill:ept.quadrant2Fill,quadrant3Fill:ept.quadrant3Fill,quadrant4Fill:ept.quadrant4Fill,quadrant1TextFill:ept.quadrant1TextFill,quadrant2TextFill:ept.quadrant2TextFill,quadrant3TextFill:ept.quadrant3TextFill,quadrant4TextFill:ept.quadrant4TextFill,quadrantPointFill:ept.quadrantPointFill,quadrantPointTextFill:ept.quadrantPointTextFill,quadrantXAxisTextFill:ept.quadrantXAxisTextFill,quadrantYAxisTextFill:ept.quadrantYAxisTextFill,quadrantTitleFill:ept.quadrantTitleFill,quadrantInternalBorderStrokeFill:ept.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:ept.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,R.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){R.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){R.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,r,n){var i=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,t={top:"top"===t&&e?i:0,bottom:"bottom"===t&&e?i:0},e=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,i={left:"left"===this.config.yAxisPosition&&r?e:0,right:"right"===this.config.yAxisPosition&&r?e:0},r=this.config.titleFontSize+2*this.config.titlePadding,e={top:n?r:0},n=this.config.quadrantPadding+i.left,r=this.config.quadrantPadding+t.top+e.top,a=this.config.chartWidth-2*this.config.quadrantPadding-i.left-i.right,s=this.config.chartHeight-2*this.config.quadrantPadding-t.top-t.bottom-e.top;return{xAxisSpace:t,yAxisSpace:i,titleSpace:e,quadrantSpace:{quadrantLeft:n,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:s,quadrantHalfHeight:s/2}}}getAxisLabels(t,e,r,n){var{quadrantSpace:n,titleSpace:i}=n,{quadrantHalfHeight:n,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:l,quadrantWidth:c}=n,h=!!this.data.xAxisRightText,u=!!this.data.yAxisTopText,d=[];return this.data.xAxisLeftText&&e&&d.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+(h?o/2:0),y:"top"===t?this.config.xAxisLabelPadding+i.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&d.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+o+(h?o/2:0),y:"top"===t?this.config.xAxisLabelPadding+i.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.yAxisBottomText&&r&&d.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+c+this.config.quadrantPadding,y:l+a-(u?n/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),this.data.yAxisTopText&&r&&d.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:"left"===this.config.yAxisPosition?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+s+c+this.config.quadrantPadding,y:l+n-(u?n/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),d}getQuadrants(t){var e,{quadrantHalfHeight:t,quadrantLeft:r,quadrantHalfWidth:n,quadrantTop:i}=t=t.quadrantSpace;for(e of r=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+n,y:i,width:n,height:t,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r,y:i,width:n,height:t,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r,y:i+t,width:n,height:t,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:"center",horizontalPos:"middle",rotation:0},x:r+n,y:i+t,width:n,height:t,fill:this.themeConfig.quadrant4Fill}])e.text.x=e.x+e.width/2,0===this.data.points.length?(e.text.y=e.y+e.height/2,e.text.horizontalPos="middle"):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos="top");return r}getQuadrantPoints(t){let e=t.quadrantSpace,{quadrantHeight:r,quadrantLeft:n,quadrantTop:i,quadrantWidth:a}=e,s=$y().domain([0,1]).range([n,a+n]),o=$y().domain([0,1]).range([r+i,i]);return this.data.points.map(t=>{var e=this.classes.get(t.className);return e&&(t={...e,...t}),{x:s(t.x),y:o(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:s(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){var e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantHalfHeight:t,quadrantHeight:r,quadrantLeft:n,quadrantHalfWidth:i,quadrantTop:a,quadrantWidth:s}=t=t.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-e,y1:a,x2:n+s+e,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n+s,y1:a+e,x2:n+s,y2:a+r-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-e,y1:a+r,x2:n+s+e,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n,y1:a+e,x2:n,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+i,y1:a+e,x2:n+i,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+e,y1:a+t,x2:n+s-e,y2:a+t}]}getTitle(t){if(t)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:"top",verticalPos:"center",rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){var t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,n=0{cpt=class extends Error{static{Ae(this,"InvalidStyleError")}constructor(t,e,r){super(`value for ${t} ${e} is invalid, please use a valid `+r),this.name="InvalidStyleError"}},Ae(spt,"validateHexCode"),Ae(opt,"validateNumber"),Ae(lpt,"validateSizeInPixels")});function upt(t){return Mo(t.trim(),Spt)}function dpt(t){Cpt.setData({quadrant1Text:upt(t.text)})}function ppt(t){Cpt.setData({quadrant2Text:upt(t.text)})}function gpt(t){Cpt.setData({quadrant3Text:upt(t.text)})}function fpt(t){Cpt.setData({quadrant4Text:upt(t.text)})}function mpt(t){Cpt.setData({xAxisLeftText:upt(t.text)})}function ypt(t){Cpt.setData({xAxisRightText:upt(t.text)})}function vpt(t){Cpt.setData({yAxisTopText:upt(t.text)})}function xpt(t){Cpt.setData({yAxisBottomText:upt(t.text)})}function bpt(t){var e,r={};for(e of t){var[n,i]=e.trim().split(/\s*:\s*/);if("radius"===n){if(opt(i))throw new cpt(n,i,"number");r.radius=parseInt(i)}else if("color"===n){if(spt(i))throw new cpt(n,i,"hex code");r.color=i}else if("stroke-color"===n){if(spt(i))throw new cpt(n,i,"hex code");r.strokeColor=i}else{if("stroke-width"!==n)throw new Error(`style named ${n} is not supported.`);if(lpt(i))throw new cpt(n,i,"number of pixels (eg. 10px)");r.strokeWidth=i}}return r}function wpt(t,e,r,n,i){i=bpt(i),Cpt.addPoints([{x:r,y:n,text:upt(t.text),className:e,...i}])}function kpt(t,e){Cpt.addClass(t,bpt(e))}function Tpt(t){Cpt.setConfig({chartWidth:t})}function _pt(t){Cpt.setConfig({chartHeight:t})}function Ept(){var{themeVariables:t,quadrantChart:e}=D();return e&&Cpt.setConfig(e),Cpt.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),Cpt.setData({titleText:xl()}),Cpt.build()}var Spt,Cpt,Apt,Lpt,Npt,Ipt,Mpt=i(()=>{wc(),al(),bc(),apt(),hpt(),Spt=D(),Ae(upt,"textSanitizer"),Cpt=new rpt,Ae(dpt,"setQuadrant1Text"),Ae(ppt,"setQuadrant2Text"),Ae(gpt,"setQuadrant3Text"),Ae(fpt,"setQuadrant4Text"),Ae(mpt,"setXAxisLeftText"),Ae(ypt,"setXAxisRightText"),Ae(vpt,"setYAxisTopText"),Ae(xpt,"setYAxisBottomText"),Ae(bpt,"parseStyles"),Ae(wpt,"addPoint"),Ae(kpt,"addClass"),Ae(Tpt,"setWidth"),Ae(_pt,"setHeight"),Ae(Ept,"getQuadrantData"),Apt=Ae(function(){Cpt.clear(),pl()},"clear"),Lpt={setWidth:Tpt,setHeight:_pt,setQuadrant1Text:dpt,setQuadrant2Text:ppt,setQuadrant3Text:gpt,setQuadrant4Text:fpt,setXAxisLeftText:mpt,setXAxisRightText:ypt,setYAxisTopText:vpt,setYAxisBottomText:xpt,parseStyles:bpt,addPoint:wpt,addClass:kpt,getQuadrantData:Ept,clear:Apt,setAccTitle:gl,getAccTitle:fl,setDiagramTitle:vl,getDiagramTitle:xl,getAccDescription:yl,setAccDescription:ml}}),Rpt=i(()=>{i3(),wc(),t(),sl(),Npt=Ae((t,e,r,n)=>{function i(t){return"top"===t?"hanging":"middle"}function a(t){return"left"===t?"start":"middle"}function s(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}Ae(i,"getDominantBaseLine"),Ae(a,"getTextAnchor"),Ae(s,"getTransformation");var o=D();R.debug(`Rendering quadrant chart +`+t);let l=o.securityLevel,c;"sandbox"===l&&(c=O("#i"+e));var e=(t=O("sandbox"===l?c.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)).append("g").attr("class","main"),h=o.quadrantChart?.chartWidth??500,u=o.quadrantChart?.chartHeight??500,o=(Jo(t,u,h,o.quadrantChart?.useMaxWidth??!0),t.attr("viewBox","0 0 "+h+" "+u),n.db.setHeight(u),n.db.setWidth(h),n.db.getQuadrantData()),t=e.append("g").attr("class","quadrants"),u=e.append("g").attr("class","border"),h=e.append("g").attr("class","data-points"),n=e.append("g").attr("class","labels"),e=e.append("g").attr("class","title");o.title&&e.append("text").attr("x",0).attr("y",0).attr("fill",o.title.fill).attr("font-size",o.title.fontSize).attr("dominant-baseline",i(o.title.horizontalPos)).attr("text-anchor",a(o.title.verticalPos)).attr("transform",s(o.title)).text(o.title.text),o.borderLines&&u.selectAll("line").data(o.borderLines).enter().append("line").attr("x1",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth),(e=t.selectAll("g.quadrant").data(o.quadrants).enter().append("g").attr("class","quadrant")).append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),e.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text)).text(t=>t.text.text),n.selectAll("g.label").data(o.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>i(t.horizontalPos)).attr("text-anchor",t=>a(t.verticalPos)).attr("transform",t=>s(t)),(u=h.selectAll("g.data-point").data(o.points).enter().append("g").attr("class","data-point")).append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),u.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text))},"draw"),Ipt={draw:Npt}}),Dpt={};A(Dpt,{diagram:()=>Opt});var Opt,Ppt,Bpt,Fpt=i(()=>{ipt(),Mpt(),Rpt(),Opt={parser:tpt,db:Lpt,renderer:Ipt,styles:Ae(()=>"","styles")}}),$pt=i(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,10,12,14,16,18,19,21,23],n=[2,6],i=[1,3],a=[1,5],s=[1,6],o=[1,7],l=[1,5,10,12,14,16,18,19,21,23,34,35,36],c=[1,25],h=[1,26],u=[1,28],d=[1,29],p=[1,30],g=[1,31],f=[1,32],m=[1,33],y=[1,34],v=[1,35],x=[1,36],b=[1,37],w=[1,43],k=[1,42],T=[1,47],_=[1,50],E=[1,10,12,14,16,18,19,21,23,34,35,36],S=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],A=[1,64],n={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 5:n.setOrientation(a[o]);break;case 9:n.setDiagramTitle(a[o].text.trim());break;case 12:n.setLineData({text:"",type:"text"},a[o]);break;case 13:n.setLineData(a[o-1],a[o]);break;case 14:n.setBarData({text:"",type:"text"},a[o]);break;case 15:n.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 19:this.$=a[o-1];break;case 20:this.$=[Number(a[o-2]),...a[o]];break;case 21:this.$=[Number(a[o])];break;case 22:n.setXAxisTitle(a[o]);break;case 23:n.setXAxisTitle(a[o-1]);break;case 24:n.setXAxisTitle({type:"text",text:""});break;case 25:n.setXAxisBand(a[o]);break;case 26:n.setXAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 27:this.$=a[o-1];break;case 28:this.$=[a[o-2],...a[o]];break;case 29:this.$=[a[o]];break;case 30:n.setYAxisTitle(a[o]);break;case 31:n.setYAxisTitle(a[o-1]);break;case 32:n.setYAxisTitle({type:"text",text:""});break;case 33:n.setYAxisRangeData(Number(a[o-2]),Number(a[o]));break;case 37:case 38:this.$={text:a[o],type:"text"};break;case 39:this.$={text:a[o],type:"markdown"};break;case 40:this.$=a[o];break;case 41:this.$=a[o-1]+""+a[o]}},"anonymous"),table:[e(r,n,{3:1,4:2,7:4,5:i,34:a,35:s,36:o}),{1:[3]},e(r,n,{4:2,7:4,3:8,5:i,34:a,35:s,36:o}),e(r,n,{4:2,7:4,6:9,3:10,5:i,8:[1,11],34:a,35:s,36:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(l,[2,34]),e(l,[2,35]),e(l,[2,36]),{1:[2,1]},e(r,n,{4:2,7:4,3:21,5:i,34:a,35:s,36:o}),{1:[2,3]},e(l,[2,5]),e(r,[2,7],{4:22,34:a,35:s,36:o}),{11:23,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:39,13:38,24:w,27:k,29:40,30:41,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:45,15:44,27:T,33:46,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:49,17:48,24:_,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{11:52,17:51,24:_,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},{20:[1,53]},{22:[1,54]},e(E,[2,18]),{1:[2,2]},e(E,[2,8]),e(E,[2,9]),e(S,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b}),e(S,[2,38]),e(S,[2,39]),e(C,[2,40]),e(C,[2,42]),e(C,[2,43]),e(C,[2,44]),e(C,[2,45]),e(C,[2,46]),e(C,[2,47]),e(C,[2,48]),e(C,[2,49]),e(C,[2,50]),e(C,[2,51]),e(E,[2,10]),e(E,[2,22],{30:41,29:56,24:w,27:k}),e(E,[2,24]),e(E,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},e(E,[2,11]),e(E,[2,30],{33:60,27:T}),e(E,[2,32]),{31:[1,61]},e(E,[2,12]),{17:62,24:_},{25:63,27:A},e(E,[2,14]),{17:65,24:_},e(E,[2,16]),e(E,[2,17]),e(C,[2,41]),e(E,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(E,[2,31]),{27:[1,69]},e(E,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(E,[2,15]),e(E,[2,26]),e(E,[2,27]),{11:59,32:72,37:24,38:c,39:h,40:27,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b},e(E,[2,33]),e(E,[2,19]),{25:73,27:A},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};n.lexer=i,Ae(t,"Parser"),(Ppt=new((t.prototype=n).Parser=t)).parser=Ppt,Bpt=Ppt});function zpt(t){return"bar"===t.type}function qpt(t){return"band"===t.type}function Upt(t){return"linear"===t.type}var jpt,Gpt,Wpt,Ypt,Hpt=i(()=>{Ae(zpt,"isBarPlot"),Ae(qpt,"isBandAxisData"),Ae(Upt,"isLinearAxisData")}),Vpt=i(()=>{eS(),jpt=class{constructor(t){this.parentGroup=t}static{Ae(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((t,e)=>Math.max(e.length,t),0)*e,height:e};var r,n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(r of t){var a=(s=KE(i,1,r))?s.width:r.length*e,s=s?s.height:e;n.width=Math.max(n.width,a),n.height=Math.max(n.height,s)}return i.remove(),n}}}),Xpt=i(()=>{Gpt=class{constructor(t,e,r,n){this.axisConfig=t,this.title=e,this.textDimensionCalculator=r,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}static{Ae(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){var t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;var r,n;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*t.width,this.outerPadding=Math.min(r.width/2,n),n=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,n<=e)&&(e-=n,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=e)&&(e-=n,this.showTitle=!0),this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;var r,n;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*t.height,this.outerPadding=Math.min(r.height/2,n),(n=r.width+2*this.axisConfig.labelPadding)<=e)&&(e-=n,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=e)&&(e-=n,this.showTitle=!0),this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){var t,r=[];if(this.showAxisLine&&(t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${e},${this.getScaleValue(t)} L ${e-this.axisConfig.tickLength},`+this.getScaleValue(t),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),r}getDrawableElementsForBottomAxis(){var t,r=[];if(this.showAxisLine&&(t=this.boundingRect.y+this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},`+t,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e} L ${this.getScaleValue(t)},`+(e+this.axisConfig.tickLength),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),r}getDrawableElementsForTopAxis(){var t,r=[];if(this.showAxisLine&&(t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},`+t,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+2*this.axisConfig.titlePadding:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){let e=this.boundingRect.y;r.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},`+(e+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)),strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&r.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),r}getDrawableElements(){if("left"===this.axisPosition)return this.getDrawableElementsForLeftAxis();if("right"===this.axisPosition)throw Error("Drawing of right axis is not implemented");return"bottom"===this.axisPosition?this.getDrawableElementsForBottomAxis():"top"===this.axisPosition?this.getDrawableElementsForTopAxis():[]}}}),Kpt=i(()=>{i3(),t(),Xpt(),Wpt=class extends Gpt{static{Ae(this,"BandAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.categories=r,this.scale=by().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=by().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),R.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}}}),Zpt=i(()=>{i3(),Xpt(),Ypt=class extends Gpt{static{Ae(this,"LinearAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.domain=r,this.scale=$y().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=$y().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function Qpt(t,e,r,n){return n=new jpt(n),qpt(t)?new Wpt(e,r,t.categories,t.title,n):new Ypt(e,r,[t.min,t.max],t.title,n)}var Jpt=i(()=>{Hpt(),Vpt(),Kpt(),Zpt(),Ae(Qpt,"getAxis")});function t1t(t,e,r,n){return n=new jpt(n),new e1t(n,t,e,r)}var e1t,r1t,n1t,i1t=i(()=>{Vpt(),e1t=class{constructor(t,e,r,n){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{Ae(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){var e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),t=Math.max(e.width,t.width),r=e.height+2*this.chartConfig.titlePadding;return e.width<=t&&e.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=t,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){var t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},Ae(t1t,"getChartTitleComponent")}),a1t=i(()=>{i3(),r1t=class{constructor(t,e,r,n,i){this.plotData=t,this.xAxis=e,this.yAxis=r,this.orientation=n,this.plotIndex=i}static{Ae(this,"LinePlot")}getDrawableElement(){var t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);return(t=("horizontal"===this.orientation?rx().y(t=>t[0]).x(t=>t[1]):rx().x(t=>t[0]).y(t=>t[1]))(t))?[{groupTexts:["plot","line-plot-"+this.plotIndex],type:"path",data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}}),s1t=i(()=>{n1t=class{constructor(t,e,r,n,i,a){this.barData=t,this.boundingRect=e,this.xAxis=r,this.yAxis=n,this.orientation=i,this.plotIndex=a}static{Ae(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),e=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),r=e/2;return"horizontal"===this.orientation?[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-r,height:e,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:t.map(t=>({x:t[0]-r,y:t[1],width:e,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function o1t(t,e,r){return new l1t(t,e,r)}var l1t,c1t,h1t,u1t=i(()=>{a1t(),s1t(),l1t=class{constructor(t,e,r){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{Ae(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!this.xAxis||!this.yAxis)throw Error("Axes must be passed to render Plots");var t,e,r=[];for([t,e]of this.chartData.plots.entries())switch(e.type){case"line":var n=new r1t(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);r.push(...n.getDrawableElement());break;case"bar":n=new n1t(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t),r.push(...n.getDrawableElement())}return r}},Ae(o1t,"getPlotComponent")}),d1t=i(()=>{Jpt(),i1t(),u1t(),Hpt(),c1t=class{constructor(t,e,r,n){this.chartConfig=t,this.chartData=e,this.componentStore={title:t1t(t,e,r,n),plot:o1t(t,e,r),xAxis:Qpt(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:Qpt(e.yAxis,t.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{Ae(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,n,i=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:i,height:a});t-=s.width,e-=s.height,n=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e})).height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),e-=this.componentStore.xAxis.calculateSpace({width:t,height:e}).height,this.componentStore.yAxis.setAxisPosition("left"),r=(s=this.componentStore.yAxis.calculateSpace({width:t,height:e})).width,0<(t-=s.width)&&(i+=t),0zpt(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,n,i,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});t-=o.width,e-=o.height,r=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e})).height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),t-=(o=this.componentStore.xAxis.calculateSpace({width:t,height:e})).width,n=o.width,this.componentStore.yAxis.setAxisPosition("top"),e-=(o=this.componentStore.yAxis.calculateSpace({width:t,height:e})).height,i=r+o.height,0zpt(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();var t,e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}}}),p1t=i(()=>{d1t(),h1t=class{static{Ae(this,"XYChartBuilder")}static build(t,e,r,n){return new c1t(t,e,r,n).getDrawableElement()}}});function g1t(){var t=ue(),e=Be();return S8(t.xyChart,e.themeVariables.xyChart)}function f1t(){var t=Be();return S8(ke.xyChart,t.xyChart)}function m1t(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function y1t(t){var e=Be();return Mo(t.trim(),e)}function v1t(t){D1t=t}function x1t(t){O1t.chartOrientation="horizontal"===t?"horizontal":"vertical"}function b1t(t){B1t.xAxis.title=y1t(t.text)}function w1t(t,e){B1t.xAxis={type:"linear",title:B1t.xAxis.title,min:t,max:e},$1t=!0}function k1t(t){B1t.xAxis={type:"band",title:B1t.xAxis.title,categories:t.map(t=>y1t(t.text))},$1t=!0}function T1t(t){B1t.yAxis.title=y1t(t.text)}function _1t(t,e){B1t.yAxis={type:"linear",title:B1t.yAxis.title,min:t,max:e},z1t=!0}function E1t(t){var e=Math.min(...t),t=Math.max(...t),r=Upt(B1t.yAxis)?B1t.yAxis.min:1/0,n=Upt(B1t.yAxis)?B1t.yAxis.max:-1/0;B1t.yAxis={type:"linear",title:B1t.yAxis.title,min:Math.min(r,e),max:Math.max(n,t)}}function S1t(r){let t=[];var e;if(0!==r.length&&($1t||(n=Upt(B1t.xAxis)?B1t.xAxis.min:1/0,e=Upt(B1t.xAxis)?B1t.xAxis.max:-1/0,w1t(Math.min(n,1),Math.max(e,r.length))),z1t||E1t(r),qpt(B1t.xAxis)&&(t=B1t.xAxis.categories.map((t,e)=>[t,r[e]])),Upt(B1t.xAxis))){var n=B1t.xAxis.min,i=B1t.xAxis.max,a=(i-n)/(r.length-1),s=[];for(let t=n;t<=i;t+=a)s.push(""+t);t=s.map((t,e)=>[t,r[e]])}return t}function C1t(t){return F1t[0===t?0:t%F1t.length]}function A1t(t,e){e=S1t(e),B1t.plots.push({type:"line",strokeFill:C1t(R1t),strokeWidth:2,data:e}),R1t++}function L1t(t,e){e=S1t(e),B1t.plots.push({type:"bar",fill:C1t(R1t),data:e}),R1t++}function N1t(){if(0===B1t.plots.length)throw Error("No Plot to render, please provide a plot with some data");return B1t.title=xl(),h1t.build(O1t,B1t,P1t,D1t)}function I1t(){return P1t}function M1t(){return O1t}var R1t,D1t,O1t,P1t,B1t,F1t,$1t,z1t,q1t,U1t,j1t,G1t,W1t=i(()=>{Pr(),Dr(),Lr(),rT(),al(),bc(),p1t(),Hpt(),R1t=0,O1t=f1t(),P1t=g1t(),B1t=m1t(),F1t=P1t.plotColorPalette.split(",").map(t=>t.trim()),z1t=$1t=!1,Ae(g1t,"getChartDefaultThemeConfig"),Ae(f1t,"getChartDefaultConfig"),Ae(m1t,"getChartDefaultData"),Ae(y1t,"textSanitizer"),Ae(v1t,"setTmpSVGG"),Ae(x1t,"setOrientation"),Ae(b1t,"setXAxisTitle"),Ae(w1t,"setXAxisRangeData"),Ae(k1t,"setXAxisBand"),Ae(T1t,"setYAxisTitle"),Ae(_1t,"setYAxisRangeData"),Ae(E1t,"setYAxisRangeFromPlotData"),Ae(S1t,"transformDataWithoutCategory"),Ae(C1t,"getPlotColorFromPalette"),Ae(A1t,"setLineData"),Ae(L1t,"setBarData"),Ae(N1t,"getDrawableElem"),Ae(I1t,"getChartThemeConfig"),Ae(M1t,"getChartConfig"),q1t=Ae(function(){pl(),R1t=0,O1t=f1t(),B1t=m1t(),P1t=g1t(),F1t=P1t.plotColorPalette.split(",").map(t=>t.trim()),z1t=$1t=!1},"clear"),U1t={getDrawableElem:N1t,clear:q1t,setAccTitle:gl,getAccTitle:fl,setDiagramTitle:vl,getDiagramTitle:xl,getAccDescription:yl,setAccDescription:ml,setOrientation:x1t,setXAxisTitle:b1t,setXAxisRangeData:w1t,setXAxisBand:k1t,setYAxisTitle:T1t,setYAxisRangeData:_1t,setLineData:A1t,setBarData:L1t,setTmpSVGG:v1t,getChartThemeConfig:I1t,getChartConfig:M1t}}),Y1t=i(()=>{t(),_0t(),sl(),j1t=Ae((t,e,r,n)=>{var i,a=(n=n.db).getChartThemeConfig(),s=n.getChartConfig();function o(t){return"top"===t?"text-before-edge":"middle"}function l(t){return"left"===t?"start":"right"===t?"end":"middle"}function c(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}Ae(o,"getDominantBaseLine"),Ae(l,"getTextAnchor"),Ae(c,"getTextTransformation"),R.debug(`Rendering xychart chart +`+t);let h=y0t(e),u=h.append("g").attr("class","main"),d=u.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),p=(Jo(h,s.height,s.width,!0),h.attr("viewBox",`0 0 ${s.width} `+s.height),d.attr("fill",a.backgroundColor),n.setTmpSVGG(h.append("g").attr("class","mermaid-tmp-group")),n.getDrawableElem()),g={};function f(e){let r=u,n="";for(var[i]of e.entries()){let t=u;0t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth);break;case"text":m.selectAll("text").data(i.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>o(t.verticalPos)).attr("text-anchor",t=>l(t.horizontalPos)).attr("transform",t=>c(t)).text(t=>t.text);break;case"path":m.selectAll("path").data(i.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill||"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw"),G1t={draw:j1t}}),H1t={};A(H1t,{diagram:()=>V1t});var V1t,X1t,K1t,Z1t,Q1t,J1t,tgt,egt,rgt,ngt,igt,agt,sgt,ogt,lgt,cgt,hgt,ugt,dgt,pgt,ggt,fgt,mgt,ygt,vgt,xgt,bgt,wgt,kgt,Tgt,_gt,Egt,Sgt,Cgt,Agt,Lgt,Ngt,Igt,Mgt,Rgt,Dgt,Ogt,Pgt,Bgt,Fgt,$gt=i(()=>{$pt(),W1t(),Y1t(),V1t={parser:Bpt,db:U1t,renderer:G1t}}),zgt=i(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,3],n=[1,4],i=[1,5],a=[1,6],s=[5,6,8,9,11,13,31,32,33,34,35,36,44,62,63],o=[1,18],l=[2,7],c=[1,22],h=[1,23],u=[1,24],d=[1,25],p=[1,26],g=[1,27],f=[1,20],m=[1,28],y=[1,29],v=[62,63],x=[5,8,9,11,13,31,32,33,34,35,36,44,51,53,62,63],b=[1,47],w=[1,48],k=[1,49],T=[1,50],P=[1,51],B=[1,52],F=[1,53],_=[53,54],E=[1,64],S=[1,60],C=[1,61],A=[1,62],L=[1,63],N=[1,65],I=[1,69],M=[1,70],R=[1,67],D=[1,68],O=[5,8,9,11,13,31,32,33,34,35,36,44,62,63],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,requirementType:17,requirementName:18,STRUCT_START:19,requirementBody:20,ID:21,COLONSEP:22,id:23,TEXT:24,text:25,RISK:26,riskLevel:27,VERIFYMTHD:28,verifyType:29,STRUCT_STOP:30,REQUIREMENT:31,FUNCTIONAL_REQUIREMENT:32,INTERFACE_REQUIREMENT:33,PERFORMANCE_REQUIREMENT:34,PHYSICAL_REQUIREMENT:35,DESIGN_CONSTRAINT:36,LOW_RISK:37,MED_RISK:38,HIGH_RISK:39,VERIFY_ANALYSIS:40,VERIFY_DEMONSTRATION:41,VERIFY_INSPECTION:42,VERIFY_TEST:43,ELEMENT:44,elementName:45,elementBody:46,TYPE:47,type:48,DOCREF:49,ref:50,END_ARROW_L:51,relationship:52,LINE:53,END_ARROW_R:54,CONTAINS:55,COPIES:56,DERIVES:57,SATISFIES:58,VERIFIES:59,REFINES:60,TRACES:61,unqString:62,qString:63,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",9:"acc_title",10:"acc_title_value",11:"acc_descr",12:"acc_descr_value",13:"acc_descr_multiline_value",19:"STRUCT_START",21:"ID",22:"COLONSEP",24:"TEXT",26:"RISK",28:"VERIFYMTHD",30:"STRUCT_STOP",31:"REQUIREMENT",32:"FUNCTIONAL_REQUIREMENT",33:"INTERFACE_REQUIREMENT",34:"PERFORMANCE_REQUIREMENT",35:"PHYSICAL_REQUIREMENT",36:"DESIGN_CONSTRAINT",37:"LOW_RISK",38:"MED_RISK",39:"HIGH_RISK",40:"VERIFY_ANALYSIS",41:"VERIFY_DEMONSTRATION",42:"VERIFY_INSPECTION",43:"VERIFY_TEST",44:"ELEMENT",47:"TYPE",49:"DOCREF",51:"END_ARROW_L",53:"LINE",54:"END_ARROW_R",55:"CONTAINS",56:"COPIES",57:"DERIVES",58:"SATISFIES",59:"VERIFIES",60:"REFINES",61:"TRACES",62:"unqString",63:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[14,5],[20,5],[20,5],[20,5],[20,5],[20,2],[20,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[27,1],[27,1],[27,1],[29,1],[29,1],[29,1],[29,1],[15,5],[46,5],[46,5],[46,2],[46,1],[16,5],[16,5],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[52,1],[18,1],[18,1],[23,1],[23,1],[25,1],[25,1],[45,1],[45,1],[48,1],[48,1],[50,1],[50,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 4:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 13:n.addRequirement(a[o-3],a[o-4]);break;case 14:n.setNewReqId(a[o-2]);break;case 15:n.setNewReqText(a[o-2]);break;case 16:n.setNewReqRisk(a[o-2]);break;case 17:n.setNewReqVerifyMethod(a[o-2]);break;case 20:this.$=n.RequirementType.REQUIREMENT;break;case 21:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 22:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 23:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 24:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 25:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 26:this.$=n.RiskLevel.LOW_RISK;break;case 27:this.$=n.RiskLevel.MED_RISK;break;case 28:this.$=n.RiskLevel.HIGH_RISK;break;case 29:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 30:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 31:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 32:this.$=n.VerifyType.VERIFY_TEST;break;case 33:n.addElement(a[o-3]);break;case 34:n.setNewElementType(a[o-2]);break;case 35:n.setNewElementDocRef(a[o-2]);break;case 38:n.addRelationship(a[o-2],a[o],a[o-4]);break;case 39:n.addRelationship(a[o-2],a[o-4],a[o]);break;case 40:this.$=n.Relationships.CONTAINS;break;case 41:this.$=n.Relationships.COPIES;break;case 42:this.$=n.Relationships.DERIVES;break;case 43:this.$=n.Relationships.SATISFIES;break;case 44:this.$=n.Relationships.VERIFIES;break;case 45:this.$=n.Relationships.REFINES;break;case 46:this.$=n.Relationships.TRACES}},"anonymous"),table:[{3:1,4:2,6:r,9:n,11:i,13:a},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:n,11:i,13:a},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(s,[2,6]),{3:12,4:2,6:r,9:n,11:i,13:a},{1:[2,2]},{4:17,5:o,7:13,8:l,9:n,11:i,13:a,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},e(s,[2,4]),e(s,[2,5]),{1:[2,1]},{8:[1,30]},{4:17,5:o,7:31,8:l,9:n,11:i,13:a,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{4:17,5:o,7:32,8:l,9:n,11:i,13:a,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{4:17,5:o,7:33,8:l,9:n,11:i,13:a,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{4:17,5:o,7:34,8:l,9:n,11:i,13:a,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{4:17,5:o,7:35,8:l,9:n,11:i,13:a,14:14,15:15,16:16,17:19,23:21,31:c,32:h,33:u,34:d,35:p,36:g,44:f,62:m,63:y},{18:36,62:[1,37],63:[1,38]},{45:39,62:[1,40],63:[1,41]},{51:[1,42],53:[1,43]},e(v,[2,20]),e(v,[2,21]),e(v,[2,22]),e(v,[2,23]),e(v,[2,24]),e(v,[2,25]),e(x,[2,49]),e(x,[2,50]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{19:[1,44]},{19:[2,47]},{19:[2,48]},{19:[1,45]},{19:[2,53]},{19:[2,54]},{52:46,55:b,56:w,57:k,58:T,59:P,60:B,61:F},{52:54,55:b,56:w,57:k,58:T,59:P,60:B,61:F},{5:[1,55]},{5:[1,56]},{53:[1,57]},e(_,[2,40]),e(_,[2,41]),e(_,[2,42]),e(_,[2,43]),e(_,[2,44]),e(_,[2,45]),e(_,[2,46]),{54:[1,58]},{5:E,20:59,21:S,24:C,26:A,28:L,30:N},{5:I,30:M,46:66,47:R,49:D},{23:71,62:m,63:y},{23:72,62:m,63:y},e(O,[2,13]),{22:[1,73]},{22:[1,74]},{22:[1,75]},{22:[1,76]},{5:E,20:77,21:S,24:C,26:A,28:L,30:N},e(O,[2,19]),e(O,[2,33]),{22:[1,78]},{22:[1,79]},{5:I,30:M,46:80,47:R,49:D},e(O,[2,37]),e(O,[2,38]),e(O,[2,39]),{23:81,62:m,63:y},{25:82,62:[1,83],63:[1,84]},{27:85,37:[1,86],38:[1,87],39:[1,88]},{29:89,40:[1,90],41:[1,91],42:[1,92],43:[1,93]},e(O,[2,18]),{48:94,62:[1,95],63:[1,96]},{50:97,62:[1,98],63:[1,99]},e(O,[2,36]),{5:[1,100]},{5:[1,101]},{5:[2,51]},{5:[2,52]},{5:[1,102]},{5:[2,26]},{5:[2,27]},{5:[2,28]},{5:[1,103]},{5:[2,29]},{5:[2,30]},{5:[2,31]},{5:[2,32]},{5:[1,104]},{5:[2,55]},{5:[2,56]},{5:[1,105]},{5:[2,57]},{5:[2,58]},{5:E,20:106,21:S,24:C,26:A,28:L,30:N},{5:E,20:107,21:S,24:C,26:A,28:L,30:N},{5:E,20:108,21:S,24:C,26:A,28:L,30:N},{5:E,20:109,21:S,24:C,26:A,28:L,30:N},{5:I,30:M,46:110,47:R,49:D},{5:I,30:M,46:111,47:R,49:D},e(O,[2,14]),e(O,[2,15]),e(O,[2,16]),e(O,[2,17]),e(O,[2,34]),e(O,[2,35])],defaultActions:{8:[2,2],12:[2,1],30:[2,3],31:[2,8],32:[2,9],33:[2,10],34:[2,11],35:[2,12],37:[2,47],38:[2,48],40:[2,53],41:[2,54],83:[2,51],84:[2,52],86:[2,26],87:[2,27],88:[2,28],90:[2,29],91:[2,30],92:[2,31],93:[2,32],95:[2,55],96:[2,56],98:[2,57],99:[2,58]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[48,49],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,50],inclusive:!0}}};r.lexer=s,Ae(t,"Parser"),(X1t=new((t.prototype=r).Parser=t)).parser=X1t,K1t=X1t}),qgt=i(()=>{wc(),t(),bc(),Z1t=[],Q1t={},J1t=new Map,tgt={},egt=new Map,rgt={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},ngt={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},igt={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},agt={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},sgt=Ae((t,e)=>(J1t.has(t)||J1t.set(t,{name:t,type:e,id:Q1t.id,text:Q1t.text,risk:Q1t.risk,verifyMethod:Q1t.verifyMethod}),Q1t={},J1t.get(t)),"addRequirement"),ogt=Ae(()=>J1t,"getRequirements"),lgt=Ae(t=>{void 0!==Q1t&&(Q1t.id=t)},"setNewReqId"),cgt=Ae(t=>{void 0!==Q1t&&(Q1t.text=t)},"setNewReqText"),hgt=Ae(t=>{void 0!==Q1t&&(Q1t.risk=t)},"setNewReqRisk"),ugt=Ae(t=>{void 0!==Q1t&&(Q1t.verifyMethod=t)},"setNewReqVerifyMethod"),dgt=Ae(t=>(egt.has(t)||(egt.set(t,{name:t,type:tgt.type,docRef:tgt.docRef}),R.info("Added new requirement: ",t)),tgt={},egt.get(t)),"addElement"),pgt=Ae(()=>egt,"getElements"),ggt=Ae(t=>{void 0!==tgt&&(tgt.type=t)},"setNewElementType"),fgt=Ae(t=>{void 0!==tgt&&(tgt.docRef=t)},"setNewElementDocRef"),mgt=Ae((t,e,r)=>{Z1t.push({type:t,src:e,dst:r})},"addRelationship"),ygt=Ae(()=>Z1t,"getRelationships"),vgt=Ae(()=>{Z1t=[],Q1t={},J1t=new Map,tgt={},egt=new Map,pl()},"clear"),xgt={RequirementType:rgt,RiskLevel:ngt,VerifyType:igt,Relationships:agt,getConfig:Ae(()=>D().req,"getConfig"),addRequirement:sgt,getRequirements:ogt,setNewReqId:lgt,setNewReqText:cgt,setNewReqRisk:hgt,setNewReqVerifyMethod:ugt,setAccTitle:gl,getAccTitle:fl,setAccDescription:ml,getAccDescription:yl,addElement:dgt,getElements:pgt,setNewElementType:ggt,setNewElementDocRef:fgt,addRelationship:mgt,getRelationships:ygt,clear:vgt}}),Ugt=i(()=>{bgt=Ae(t=>` + + marker { + fill: ${t.relationColor}; + stroke: ${t.relationColor}; + } + + marker.cross { + stroke: ${t.lineColor}; + } + + svg { + font-family: ${t.fontFamily}; + font-size: ${t.fontSize}; + } + + .reqBox { + fill: ${t.requirementBackground}; + fill-opacity: 1.0; + stroke: ${t.requirementBorderColor}; + stroke-width: ${t.requirementBorderSize}; + } + + .reqTitle, .reqLabel{ + fill: ${t.requirementTextColor}; + } + .reqLabelBox { + fill: ${t.relationLabelBackground}; + fill-opacity: 1.0; + } + + .req-title-line { + stroke: ${t.requirementBorderColor}; + stroke-width: ${t.requirementBorderSize}; + } + .relationshipLine { + stroke: ${t.relationColor}; + stroke-width: 1; + } + .relationshipLabel { + fill: ${t.relationLabelColor}; + } + +`,"getStyles"),wgt=bgt}),jgt=i(()=>{kgt={CONTAINS:"contains",ARROW:"arrow"},Tgt=Ae((t,e)=>{var r=t.append("defs").append("marker").attr("id",kgt.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",kgt.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0 + L${e.line_height},${e.line_height/2} + M${e.line_height},${e.line_height/2} + L0,`+e.line_height).attr("stroke-width",1)},"insertLineEndings"),_gt={ReqMarkers:kgt,insertLineEndings:Tgt}}),Ggt=i(()=>{i3(),kG(),cq(),wc(),t(),sl(),al(),jgt(),Egt={},Sgt=0,Cgt=Ae((t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",Egt.rect_min_width+"px").attr("height",Egt.rect_min_height+"px"),"newRectNode"),Agt=Ae((t,e,r)=>{let n=Egt.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",Egt.rect_padding).attr("dominant-baseline","hanging"),a=0;return r.forEach(t=>{(0==a?i.append("tspan").attr("text-anchor","middle").attr("x",Egt.rect_min_width/2).attr("dy",0):i.append("tspan").attr("text-anchor","middle").attr("x",Egt.rect_min_width/2).attr("dy",.75*Egt.line_height)).text(t),a++}),e=1.5*Egt.rect_padding+a*Egt.line_height*.75,t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",Egt.rect_min_width).attr("y1",e).attr("y2",e),{titleNode:i,y:e}},"newTitleNode"),Lgt=Ae((t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",Egt.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),a=0,s=[];return r.forEach(t=>{let e=t.length;for(;30{i.append("tspan").attr("x",Egt.rect_padding).attr("dy",Egt.line_height).text(t)}),i},"newBodyNode"),Ngt=Ae((t,e,r,n)=>{var i=e.node().getTotalLength(),e=e.node().getPointAtLength(.5*i),i="rel"+Sgt,n=(Sgt++,t.append("text").attr("class","req relationshipLabel").attr("id",i).attr("x",e.x).attr("y",e.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox());t.insert("rect","#"+i).attr("class","req reqLabelBox").attr("x",e.x-n.width/2).attr("y",e.y-n.height/2).attr("width",n.width).attr("height",n.height).attr("fill","white").attr("fill-opacity","85%")},"addEdgeLabel"),Igt=Ae(function(t,e,r,n,i){var r=r.edge(Pgt(e.src),Pgt(e.dst)),a=rx().x(function(t){return t.x}).y(function(t){return t.y}),n=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",a(r.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?n.attr("marker-start","url("+L.getUrl(Egt.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(n.attr("stroke-dasharray","10,7"),n.attr("marker-end","url("+L.getUrl(Egt.arrowMarkerAbsolute)+"#"+_gt.ReqMarkers.ARROW+"_line_ending)")),Ngt(t,n,Egt,`<<${e.type}>>`)},"drawRelationshipFromLayout"),Mgt=Ae((t,s,o)=>{t.forEach((t,e)=>{e=Pgt(e),R.info("Added new requirement: ",e);var r=o.append("g").attr("id",e),n=Cgt(r,"req-"+e),i=[],a=Agt(r,e+"_title",[`<<${t.type}>>`,""+t.name]),r=(i.push(a.titleNode),Lgt(r,e+"_body",["Id: "+t.id,"Text: "+t.text,"Risk: "+t.risk,"Verification: "+t.verifyMethod],a.y)),t=(i.push(r),n.node().getBBox());s.setNode(e,{width:t.width,height:t.height,shape:"rect",id:e})})},"drawReqs"),Rgt=Ae((t,o,l)=>{t.forEach((t,e)=>{var r=Pgt(e),n=l.append("g").attr("id",r),i=Cgt(n,s="element-"+r),a=[],e=Agt(n,s+"_title",["<>",""+e]),n=(a.push(e.titleNode),Lgt(n,s+"_body",["Type: "+(t.type||"Not Specified"),"Doc Ref: "+(t.docRef||"None")],e.y)),s=(a.push(n),i.node().getBBox());o.setNode(r,{width:s.width,height:s.height,shape:"rect",id:r})})},"drawElements"),Dgt=Ae((t,n)=>(t.forEach(function(t){var e=Pgt(t.src),r=Pgt(t.dst);n.setEdge(e,r,{relationship:t})}),t),"addRelationships"),Ogt=Ae(function(e,r){r.nodes().forEach(function(t){void 0!==t&&void 0!==r.node(t)&&(e.select("#"+t),e.select("#"+t).attr("transform","translate("+(r.node(t).x-r.node(t).width/2)+","+(r.node(t).y-r.node(t).height/2)+" )"))})},"adjustEntities"),Pgt=Ae(t=>t.replace(/\s/g,"").replace(/\./g,"_"),"elementString"),Bgt=Ae((t,e,r,n)=>{let i=(Egt=D().requirement).securityLevel,a,s=("sandbox"===i&&(a=O("#i"+e)),O("sandbox"===i?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`)),o=(_gt.insertLineEndings(s,Egt),new oq({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:Egt.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}})),l=n.db.getRequirements(),c=n.db.getElements(),h=n.db.getRelationships();Mgt(l,o,s),Rgt(c,o,s),Dgt(h,o),Xj(o),Ogt(s,o),h.forEach(function(t){Igt(s,t,o,e,n)});var u=Egt.rect_padding,d=s.node().getBBox(),p=d.width+2*u,g=d.height+2*u;Jo(s,g,p,Egt.useMaxWidth),s.attr("viewBox",`${d.x-u} ${d.y-u} ${p} `+g)},"draw"),Fgt={draw:Bgt}}),Wgt={};A(Wgt,{diagram:()=>Ygt});var Ygt,Hgt,Vgt,Xgt=i(()=>{zgt(),qgt(),Ugt(),Ggt(),Ygt={parser:K1t,db:xgt,renderer:Fgt,styles:wgt}}),Kgt=i(()=>{function P(){this.yy={}}var t=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,2],B=[1,3],F=[1,4],r=[2,4],n=[1,9],i=[1,11],a=[1,13],s=[1,14],o=[1,16],l=[1,17],c=[1,18],h=[1,24],u=[1,25],d=[1,26],p=[1,27],g=[1,28],f=[1,29],m=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],w=[1,35],k=[1,36],T=[1,37],_=[1,38],E=[1,39],S=[1,41],C=[1,42],A=[1,43],L=[1,44],N=[1,45],I=[1,46],M=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],R=[4,5,16,50,52,53],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],q=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],U=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],D=[68,69,70],O=[1,122],e={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.apply(a[o]),a[o];case 4:case 9:this.$=[];break;case 5:case 10:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 11:case 12:this.$=a[o];break;case 8:case 13:this.$=[];break;case 15:a[o].type="createParticipant",this.$=a[o];break;case 16:a[o-1].unshift({type:"boxStart",boxData:n.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:n.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 29:n.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 30:n.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 31:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 34:a[o-1].unshift({type:"loopStart",loopText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 35:a[o-1].unshift({type:"rectStart",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"optStart",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"altStart",altText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"criticalStart",criticalText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:n.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"breakStart",breakText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 43:this.$=a[o-3].concat([{type:"option",optionText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 45:this.$=a[o-3].concat([{type:"and",parText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.PAR_AND},a[o]]);break;case 47:this.$=a[o-3].concat([{type:"else",altText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.ALT_ELSE},a[o]]);break;case 48:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 49:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 50:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 51:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 52:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 53:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 54:a[o-2]=[].concat(a[o-1],a[o-1]).slice(0,2),a[o-2][0]=a[o-2][0].actor,a[o-2][1]=a[o-2][1].actor,this.$=[a[o-1],{type:"addNote",placement:n.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 55:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 56:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 57:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 58:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 61:this.$=[a[o-2],a[o]];break;case 62:this.$=a[o];break;case 63:this.$=n.PLACEMENT.LEFTOF;break;case 64:this.$=n.PLACEMENT.RIGHTOF;break;case 65:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o],activate:!0},{type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 66:this.$=[a[o-4],a[o-1],{type:"addMessage",from:a[o-4].actor,to:a[o-1].actor,signalType:a[o-3],msg:a[o]},{type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 67:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 68:this.$={type:"addParticipant",actor:a[o]};break;case 69:this.$=n.LINETYPE.SOLID_OPEN;break;case 70:this.$=n.LINETYPE.DOTTED_OPEN;break;case 71:this.$=n.LINETYPE.SOLID;break;case 72:this.$=n.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=n.LINETYPE.DOTTED;break;case 74:this.$=n.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=n.LINETYPE.SOLID_CROSS;break;case 76:this.$=n.LINETYPE.DOTTED_CROSS;break;case 77:this.$=n.LINETYPE.SOLID_POINT;break;case 78:this.$=n.LINETYPE.DOTTED_POINT;break;case 79:this.$=n.parseMessage(a[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:B,6:F},{1:[3]},{3:5,4:e,5:B,6:F},{3:6,4:e,5:B,6:F},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:i,8:8,9:10,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:_,53:E,54:S,59:C,60:A,61:L,62:N,70:I},t(M,[2,5]),{9:47,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:_,53:E,54:S,59:C,60:A,61:L,62:N,70:I},t(M,[2,7]),t(M,[2,8]),t(M,[2,14]),{12:48,50:T,52:_,53:E},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:I},{22:55,70:I},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(M,[2,29]),t(M,[2,30]),{32:[1,61]},{34:[1,62]},t(M,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:I},{22:72,70:I},{22:73,70:I},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:I},{22:90,70:I},{22:91,70:I},{22:92,70:I},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(M,[2,6]),t(M,[2,15]),t(R,[2,9],{10:93}),t(M,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(M,[2,21]),{5:[1,97]},{5:[1,98]},t(M,[2,24]),t(M,[2,25]),t(M,[2,26]),t(M,[2,27]),t(M,[2,28]),t(M,[2,31]),t(M,[2,32]),t($,r,{7:99}),t($,r,{7:100}),t($,r,{7:101}),t(z,r,{40:102,7:103}),t(q,r,{42:104,7:105}),t(q,r,{7:105,42:106}),t(U,r,{45:107,7:108}),t($,r,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:I},t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(D,[2,78]),{22:118,70:I},{22:120,58:119,70:I},{70:[2,63]},{70:[2,64]},{56:121,81:O},{56:123,81:O},{56:124,81:O},{56:125,81:O},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:T,52:_,53:E},{5:[1,131]},t(M,[2,19]),t(M,[2,20]),t(M,[2,22]),t(M,[2,23]),{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,132],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:_,53:E,54:S,59:C,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,133],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:_,53:E,54:S,59:C,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,134],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:_,53:E,54:S,59:C,60:A,61:L,62:N,70:I},{16:[1,135]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,46],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,49:[1,136],50:T,52:_,53:E,54:S,59:C,60:A,61:L,62:N,70:I},{16:[1,137]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,44],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,48:[1,138],50:T,52:_,53:E,54:S,59:C,60:A,61:L,62:N,70:I},{16:[1,139]},{16:[1,140]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,42],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,47:[1,141],50:T,52:_,53:E,54:S,59:C,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,142],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:_,53:E,54:S,59:C,60:A,61:L,62:N,70:I},{15:[1,143]},t(M,[2,49]),{15:[1,144]},t(M,[2,51]),t(M,[2,52]),{22:145,70:I},{22:146,70:I},{56:147,81:O},{56:148,81:O},{56:149,81:O},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(M,[2,16]),t(R,[2,10]),{12:151,50:T,52:_,53:E},t(R,[2,12]),t(R,[2,13]),t(M,[2,18]),t(M,[2,34]),t(M,[2,35]),t(M,[2,36]),t(M,[2,37]),{15:[1,152]},t(M,[2,38]),{15:[1,153]},t(M,[2,39]),t(M,[2,40]),{15:[1,154]},t(M,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:O},{56:158,81:O},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:I},t(R,[2,11]),t(z,r,{7:103,40:160}),t(q,r,{7:105,42:161}),t(U,r,{7:108,45:162}),t(M,[2,48]),t(M,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67],inclusive:!0}}};e.lexer=B,Ae(P,"Parser"),(Hgt=new((P.prototype=e).Parser=P)).parser=Hgt,Vgt=Hgt});function Zgt(t,e){if(null==t.links)t.links=e;else for(var r in e)t.links[r]=e[r]}function Qgt(t,e){if(null==t.properties)t.properties=e;else for(var r in e)t.properties[r]=e[r]}function Jgt(){tft.records.currentBox=void 0}var tft,eft,rft,nft,ift,aft,sft,oft,lft,cft,hft,uft,dft,pft,gft,fft,mft,yft,vft,xft,bft,wft,kft,Tft,_ft,Eft,Sft,Cft,Aft,Lft,Nft,Ift,Mft,Rft,Dft,Oft,Pft,Bft,Fft,$ft,zft,qft,Uft,jft,Gft,Wft,Yft,Hft,Vft,Xft,Kft,Zft,Qft,Jft,tmt,emt,rmt,nmt,imt,amt,smt,omt,lmt,cmt,hmt,umt,dmt,pmt,gmt=i(()=>{wc(),t(),lht(),al(),bc(),tft=new aht(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),eft=Ae(function(t){tft.records.boxes.push({name:t.text,wrap:t.wrap??bft(),fill:t.color,actorKeys:[]}),tft.records.currentBox=tft.records.boxes.slice(-1)[0]},"addBox"),rft=Ae(function(t,e,r,n){let i=tft.records.currentBox,a=tft.records.actors.get(t);if(a){if(tft.records.currentBox&&a.box&&tft.records.currentBox!==a.box)throw new Error(`A same participant should only be defined in one Box: ${a.name} can't be in '${a.box.name}' and in '${tft.records.currentBox.name}' at the same time.`);if(i=a.box||tft.records.currentBox,a.box=i,a&&e===a.name&&null==r)return}null==r?.text&&(r={text:e,type:n}),null!=n&&null!=r.text||(r={text:e,type:n}),tft.records.actors.set(t,{box:i,name:e,description:r.text,wrap:r.wrap??bft(),prevActor:tft.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),tft.records.prevActor&&(e=tft.records.actors.get(tft.records.prevActor))&&(e.nextActor=t),tft.records.currentBox&&tft.records.currentBox.actorKeys.push(t),tft.records.prevActor=t},"addActor"),nft=Ae(t=>{let e,r=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a;return tft.records.messages.push({from:t,to:e,message:r?.text??"",wrap:r?.wrap??bft(),type:n,activate:i}),!0},"addSignal"),sft=Ae(function(){return 0t.name)},"hasAtLeastOneBoxWithTitle"),lft=Ae(function(){return tft.records.messages},"getMessages"),cft=Ae(function(){return tft.records.boxes},"getBoxes"),hft=Ae(function(){return tft.records.actors},"getActors"),uft=Ae(function(){return tft.records.createdActors},"getCreatedActors"),dft=Ae(function(){return tft.records.destroyedActors},"getDestroyedActors"),pft=Ae(function(t){return tft.records.actors.get(t)},"getActor"),gft=Ae(function(){return[...tft.records.actors.keys()]},"getActorKeys"),fft=Ae(function(){tft.records.sequenceNumbersEnabled=!0},"enableSequenceNumbers"),mft=Ae(function(){tft.records.sequenceNumbersEnabled=!1},"disableSequenceNumbers"),yft=Ae(()=>tft.records.sequenceNumbersEnabled,"showSequenceNumbers"),vft=Ae(function(t){tft.records.wrapEnabled=t},"setWrap"),xft=Ae(t=>{if(void 0===t)return{};t=t.trim();var e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}},"extractWrap"),bft=Ae(()=>void 0!==tft.records.wrapEnabled?tft.records.wrapEnabled:D().sequence?.wrap??!1,"autoWrap"),wft=Ae(function(){tft.reset(),pl()},"clear"),kft=Ae(function(t){var t=t.trim(),{wrap:t,cleanedText:e}=xft(t),e={text:e,wrap:t};return R.debug("parseMessage: "+JSON.stringify(e)),e},"parseMessage"),Tft=Ae(function(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),r=e?.[1]?e[1].trim():"transparent",n=e?.[2]?e[2].trim():void 0;window?.CSS?window.CSS.supports("color",r)||(r="transparent",n=t.trim()):((i=(new Option).style).color=r,i.color!==r&&(r="transparent",n=t.trim()));var{wrap:i,cleanedText:t}=xft(n);return{text:t?Mo(t,D()):void 0,color:r,wrap:i}},"parseBoxData"),_ft={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34},Eft={FILLED:0,OPEN:1},Sft={LEFTOF:0,RIGHTOF:1,OVER:2},Cft=Ae(function(t,e,r){var n={actor:t,placement:e,message:r.text,wrap:r.wrap??bft()},t=[].concat(t,t);tft.records.notes.push(n),tft.records.messages.push({from:t[0],to:t[1],message:r.text,wrap:r.wrap??bft(),type:_ft.NOTE,placement:e})},"addNote"),Aft=Ae(function(e,r){e=pft(e);try{let t=Mo(r.text,D());t=(t=t.replace(/&/g,"&")).replace(/=/g,"="),Zgt(e,JSON.parse(t))}catch(t){R.error("error while parsing actor link text",t)}},"addLinks"),Lft=Ae(function(n,i){n=pft(n);try{let t={},e=Mo(i.text,D()),r=e.indexOf("@");var a=(e=(e=e.replace(/&/g,"&")).replace(/=/g,"=")).slice(0,r-1).trim(),s=e.slice(r+1).trim();t[a]=s,Zgt(n,t)}catch(t){R.error("error while parsing actor link text",t)}},"addALink"),Ae(Zgt,"insertLinks"),Nft=Ae(function(t,e){t=pft(t);try{var r=Mo(e.text,D());Qgt(t,JSON.parse(r))}catch(t){R.error("error while parsing actor properties text",t)}},"addProperties"),Ae(Qgt,"insertProperties"),Ae(Jgt,"boxEnd"),Ift=Ae(function(t,e){t=pft(t),e=document.getElementById(e.text);try{var r=e.innerHTML,n=JSON.parse(r);n.properties&&Qgt(t,n.properties),n.links&&Zgt(t,n.links)}catch(t){R.error("error while parsing actor details text",t)}},"addDetails"),Mft=Ae(function(t,e){if(void 0!==t?.properties)return t.properties[e]},"getActorProperty"),Rft=Ae(function(t){if(Array.isArray(t))t.forEach(function(t){Rft(t)});else switch(t.type){case"sequenceIndex":tft.records.messages.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":rft(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(tft.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");tft.records.lastCreated=t.actor,rft(t.actor,t.actor,t.description,t.draw),tft.records.createdActors.set(t.actor,tft.records.messages.length);break;case"destroyParticipant":tft.records.lastDestroyed=t.actor,tft.records.destroyedActors.set(t.actor,tft.records.messages.length);break;case"activeStart":case"activeEnd":aft(t.actor,void 0,void 0,t.signalType);break;case"addNote":Cft(t.actor,t.placement,t.text);break;case"addLinks":Aft(t.actor,t.text);break;case"addALink":Lft(t.actor,t.text);break;case"addProperties":Nft(t.actor,t.text);break;case"addDetails":Ift(t.actor,t.text);break;case"addMessage":if(tft.records.lastCreated){if(t.to!==tft.records.lastCreated)throw new Error("The created participant "+tft.records.lastCreated.name+" does not have an associated creating message after its declaration. Please check the sequence diagram.");tft.records.lastCreated=void 0}else if(tft.records.lastDestroyed){if(t.to!==tft.records.lastDestroyed&&t.from!==tft.records.lastDestroyed)throw new Error("The destroyed participant "+tft.records.lastDestroyed.name+" does not have an associated destroying message after its declaration. Please check the sequence diagram.");tft.records.lastDestroyed=void 0}aft(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":eft(t.boxData);break;case"boxEnd":Jgt();break;case"loopStart":aft(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":aft(void 0,void 0,void 0,t.signalType);break;case"rectStart":aft(void 0,void 0,t.color,t.signalType);break;case"rectEnd":aft(void 0,void 0,void 0,t.signalType);break;case"optStart":aft(void 0,void 0,t.optText,t.signalType);break;case"optEnd":aft(void 0,void 0,void 0,t.signalType);break;case"altStart":case"else":aft(void 0,void 0,t.altText,t.signalType);break;case"altEnd":aft(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":gl(t.text);break;case"parStart":case"and":aft(void 0,void 0,t.parText,t.signalType);break;case"parEnd":aft(void 0,void 0,void 0,t.signalType);break;case"criticalStart":aft(void 0,void 0,t.criticalText,t.signalType);break;case"option":aft(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":aft(void 0,void 0,void 0,t.signalType);break;case"breakStart":aft(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":aft(void 0,void 0,void 0,t.signalType)}},"apply"),Dft={addActor:rft,addMessage:ift,addSignal:aft,addLinks:Aft,addDetails:Ift,addProperties:Nft,autoWrap:bft,setWrap:vft,enableSequenceNumbers:fft,disableSequenceNumbers:mft,showSequenceNumbers:yft,getMessages:lft,getActors:hft,getCreatedActors:uft,getDestroyedActors:dft,getActor:pft,getActorKeys:gft,getActorProperty:Mft,getAccTitle:fl,getBoxes:cft,getDiagramTitle:xl,setDiagramTitle:vl,getConfig:Ae(()=>D().sequence,"getConfig"),clear:wft,parseMessage:kft,parseBoxData:Tft,LINETYPE:_ft,ARROWTYPE:Eft,PLACEMENT:Sft,addNote:Cft,setAccTitle:gl,apply:Rft,setAccDescription:ml,getAccDescription:yl,hasAtLeastOneBox:sft,hasAtLeastOneBoxWithTitle:oft}}),fmt=i(()=>{Oft=Ae(t=>`.actor { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + } + + text.actor > tspan { + fill: ${t.actorTextColor}; + stroke: none; + } + + .actor-line { + stroke: ${t.actorLineColor}; + } + + .messageLine0 { + stroke-width: 1.5; + stroke-dasharray: none; + stroke: ${t.signalColor}; + } + + .messageLine1 { + stroke-width: 1.5; + stroke-dasharray: 2, 2; + stroke: ${t.signalColor}; + } + + #arrowhead path { + fill: ${t.signalColor}; + stroke: ${t.signalColor}; + } + + .sequenceNumber { + fill: ${t.sequenceNumberColor}; + } + + #sequencenumber { + fill: ${t.signalColor}; + } + + #crosshead path { + fill: ${t.signalColor}; + stroke: ${t.signalColor}; + } + + .messageText { + fill: ${t.signalTextColor}; + stroke: none; + } + + .labelBox { + stroke: ${t.labelBoxBorderColor}; + fill: ${t.labelBoxBkgColor}; + } + + .labelText, .labelText > tspan { + fill: ${t.labelTextColor}; + stroke: none; + } + + .loopText, .loopText > tspan { + fill: ${t.loopTextColor}; + stroke: none; + } + + .loopLine { + stroke-width: 2px; + stroke-dasharray: 2, 2; + stroke: ${t.labelBoxBorderColor}; + fill: ${t.labelBoxBorderColor}; + } + + .note { + //stroke: #decc93; + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + } + + .noteText, .noteText > tspan { + fill: ${t.noteTextColor}; + stroke: none; + } + + .activation0 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .activation1 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .activation2 { + fill: ${t.activationBkgColor}; + stroke: ${t.activationBorderColor}; + } + + .actorPopupMenu { + position: absolute; + } + + .actorPopupMenuPanel { + position: absolute; + fill: ${t.actorBkg}; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4)); +} + .actor-man line { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + } + .actor-man circle, line { + stroke: ${t.actorBorder}; + fill: ${t.actorBkg}; + stroke-width: 2px; + } +`,"getStyles"),Pft=Oft}),mmt=i(()=>{function e(t,e,r,n,i,a,s){g(e.append("text").attr("x",r).attr("y",n).style("text-anchor","start").text(t),s)}function l(t,e,r,n,i,a,s,o){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;tr?o.width:r);if((t=l.append("rect")).attr("class","actorPopupMenuPanel"+i),t.attr("x",o.x),t.attr("y",o.height),t.attr("fill",o.fill),t.attr("stroke",o.stroke),t.attr("width",c),t.attr("height",o.height),t.attr("rx",o.rx),t.attr("ry",o.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,Bft.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),dmt(n)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},n),u+=30}}return t.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),Uft=Ae(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),jft=Ae(async function(n,i,a=null){var s=n.append("foreignObject"),o=await Ko(i.text,Be()),o=s.append("xhtml:div").attr("style","width: fit-content;").attr("xmlns","http://www.w3.org/1999/xhtml").html(o).node().getBoundingClientRect();if(s.attr("height",Math.round(o.height)).attr("width",Math.round(o.width)),"noteText"===i.class)(n=n.node().firstChild).setAttribute("height",o.height+2*i.textMargin),n=n.getBBox(),s.attr("x",Math.round(n.x+n.width/2-o.width/2)).attr("y",Math.round(n.y+n.height/2-o.height/2));else if(a){let{startx:t,stopx:e,starty:r}=a;t>e&&(n=t,t=e,e=n),s.attr("x",Math.round(t+Math.abs(t-e)/2-o.width/2)),"loopText"===i.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),Gft=Ae(function(t,e){let r=0,n=0,i=e.text.split(L.lineBreakRegex),[a,s]=Z8(e.fontSize),o=[],l=0,c=Ae(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&0Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":c=Ae(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":c=Ae(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(var[h,u]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==a&&(l=h*a),(h=t.append("text")).attr("x",e.x),h.attr("y",c()),void 0!==e.anchor&&h.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&h.style("font-family",e.fontFamily),void 0!==s&&h.style("font-size",s),void 0!==e.fontWeight&&h.style("font-weight",e.fontWeight),void 0!==e.fill&&h.attr("fill",e.fill),void 0!==e.class&&h.attr("class",e.class),void 0!==e.dy?h.attr("dy",e.dy):0!==l&&h.attr("dy",l);var d,u=u||A8;(e.tspan?((d=h.append("tspan")).attr("x",e.x),void 0!==e.fill&&d.attr("fill",e.fill),d):h).text(u),void 0!==e.valign&&void 0!==e.textMargin&&0{r.select&&t.forEach(t=>{var t=n.get(t),e=r.select("#actor"+t.actorCnt);!i.mirrorActors&&t.stopy?e.attr("y2",t.stopy+t.height/2):i.mirrorActors&&e.attr("y2",t.stopy)})},"fixLifeLineHeights"),Vft=Ae(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+5,o=t=t.append("g").lower(),s=(n||(Yft++,Object.keys(e.links||{}).length&&!r.forceMenus&&o.attr("onclick",Uft(`actor${Yft}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+Yft).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),o=t.append("g"),e.actorCnt=Yft,null!=e.links&&o.attr("id","root-"+Yft)),Lb()),a="actor",t=(e.properties?.class?a=e.properties.class:s.fill="#eaeaea",a+=n?" "+$ft:" actor-top",s.x=e.x,s.y=i,s.width=e.width,s.height=e.height,s.class=a,s.rx=3,s.ry=3,s.name=e.name,zft(o,s));e.rectData=s,e.properties?.icon&&("@"===(n=e.properties.icon.trim()).charAt(0)?Ab(o,s.x+s.width-20,s.y+10,n.substr(1)):Cb(o,s.x+s.width-20,s.y+10,n)),umt(r,Vo(e.description))(e.description,o,s.x,s.y,s.width,s.height,{class:"actor actor-box"},r);let l=e.height;return t.node&&(i=t.node().getBBox(),e.height=i.height,l=i.height),l},"drawActorTypeParticipant"),Xft=Ae(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,o=t.append("g").lower(),l=(n||(Yft++,o.append("line").attr("id","actor"+Yft).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=Yft),t.append("g")),c="actor-man";return l.attr("class",c+=n?" "+$ft:" actor-top"),l.attr("name",e.name),(o=Lb()).x=e.x,o.y=i,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,l.append("line").attr("id","actor-man-torso"+Yft).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+Yft).attr("x1",a-Fft/2).attr("y1",i+33).attr("x2",a+Fft/2).attr("y2",i+33),l.append("line").attr("x1",a-Fft/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),l.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+Fft/2-2).attr("y2",i+60),(s=l.append("circle")).attr("cx",e.x+e.width/2),s.attr("cy",i+10),s.attr("r",15),s.attr("width",e.width),s.attr("height",e.height),t=l.node().getBBox(),e.height=t.height,umt(r,Vo(e.description))(e.description,l,o.x,o.y+35,o.width,o.height,{class:"actor actor-man"},r),e.height},"drawActorTypeActor"),Kft=Ae(async function(t,e,r,n){switch(e.type){case"actor":return Xft(t,e,r,n);case"participant":return Vft(t,e,r,n)}},"drawActor"),Zft=Ae(function(t,e,r){t=t.append("g"),emt(t,e),e.name&&umt(r)(e.name,t,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),t.lower()},"drawBox"),Qft=Ae(function(t){return t.append("g")},"anchorElement"),Jft=Ae(function(t,e,r,n,i){var a=Lb(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=r-e.starty,zft(s,a)},"drawActivation"),tmt=Ae(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:c,messageFontWeight:h}=n,u=t.append("g"),d=Ae(function(t,e,r,n){return u.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",n).attr("class","loopLine")},"drawLoopLine"),p=(d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){d(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}),Nb());p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",Wft(u,p),(p=cmt()).text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+i+a,p.anchor="middle",p.valign="middle",p.textMargin=a,p.class="loopText",p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=!0;var g=Vo(p.text)?await jft(u,p,e):Gft(u,p);if(void 0!==e.sectionTitles)for(var[f,m]of Object.entries(e.sectionTitles))m.message&&(p.text=m.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[f].y+i+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=e.wrap,Vo(p.text)?(e.starty=e.sections[f].y,await jft(u,p,e)):Gft(u,p),m=Math.round(g.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e)),e.sections[f].height+=m-(i+a));return e.height=Math.round(e.stopy-e.starty),u},"drawLoop"),emt=Ae(function(t,e){Eb(t,e)},"drawBackgroundRect"),rmt=Ae(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),nmt=Ae(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),imt=Ae(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),amt=Ae(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),smt=Ae(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),omt=Ae(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),lmt=Ae(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),cmt=Ae(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},"getTextObj"),hmt=Ae(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Ae(n,"byText"),Ae(c,"byTspan"),Ae(i,"byFo"),Ae(a,"byKatex"),Ae(f,"_setTextAttrs"),umt=function(t,e=!1){return e?a:"fo"===t.textPlacement?i:"old"===t.textPlacement?n:c},Ae(e,"byText"),Ae(l,"byTspan"),Ae(r,"byFo"),Ae(g,"_setTextAttrs"),dmt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},pmt={drawRect:zft,drawText:Gft,drawLabel:Wft,drawActor:Kft,drawBox:Zft,drawPopup:qft,anchorElement:Qft,drawActivation:Jft,drawLoop:tmt,drawBackgroundRect:emt,insertArrowHead:amt,insertArrowFilledHead:smt,insertSequenceNumber:omt,insertArrowCrossHead:lmt,insertDatabaseIcon:rmt,insertComputerIcon:nmt,insertClockIcon:imt,getTextObj:cmt,getNoteRect:hmt,fixLifeLineHeights:Hft,sanitizeUrl:Bft.sanitizeUrl}});async function ymt(t,e){B.bumpVerticalPos(10);var{startx:r,stopx:n,message:i}=e,a=L.splitBreaks(i).length,s=Vo(i),i=s?await Xo(i,D()):Q8.calculateTextDimensions(i,Tmt(P));s||(s=i.height/a,e.height+=s,B.bumpVerticalPos(s));let o,l=i.height-10,c=i.width;return r===n?(o=B.getVerticalPos()+l,P.rightAngles||(l+=P.boxMargin,o=B.getVerticalPos()+l),l+=30,a=L.getMax(c/2,P.width/2),B.insert(r-a,B.getVerticalPos()-10+l,n+a,B.getVerticalPos()+30+l)):(l+=P.boxMargin,o=B.getVerticalPos()+l,B.insert(r,o-10,n,o)),B.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,B.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),o}function vmt(t,e,r,n,i){B.bumpVerticalPos(r);let a=n;e.id&&e.message&&t[e.id]&&(r=t[e.id].width,t=Tmt(P),e.message=Q8.wrapLabel(`[${e.message}]`,r-2*P.wrapPadding,t),e.width=r,e.wrap=!0,r=Q8.calculateTextDimensions(e.message,t),t=L.getMax(r.height,P.labelBoxHeight),a=n+t,R.debug(t+" - "+e.message)),i(e),B.bumpVerticalPos(a)}function xmt(r,n,t,e,i,a,s){function o(t,e){t.x{var e=Tmt(P),r=t.actorKeys.reduce((t,e)=>t+(n.get(e).width+(n.get(e).margin||0)),0),e=(r-=2*P.boxTextMargin,t.wrap&&(t.name=Q8.wrapLabel(t.name,r-2*P.wrapPadding,e)),Q8.calculateTextDimensions(t.name,e)),e=(c=L.getMax(e.height,c),L.getMax(r,e.width+2*P.wrapPadding));t.margin=P.boxTextMargin,rt.textMaxHeight=c),L.getMax(r,P.height)}var P,B,kmt,Tmt,_mt,Emt,Smt,Cmt,Amt,Lmt,Nmt,Imt,Mmt,Rmt,Dmt,Omt,Pmt,Bmt,Fmt,$mt=i(()=>{i3(),mmt(),t(),al(),o3(),wc(),Ze(),rT(),sl(),P={},B={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:Ae(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(t=>t.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:Ae(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:Ae(function(t){this.boxes.push(t)},"addBox"),addActor:Ae(function(t){this.actors.push(t)},"addActor"),addLoop:Ae(function(t){this.loops.push(t)},"addLoop"),addMessage:Ae(function(t){this.messages.push(t)},"addMessage"),addNote:Ae(function(t){this.notes.push(t)},"addNote"),lastActor:Ae(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:Ae(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:Ae(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:Ae(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:Ae(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Nmt(D())},"init"),updateVal:Ae(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:Ae(function(n,i,a,s){let o=this,l=0;function t(r){return Ae(function(t){l++;var e=o.sequenceItems.length-l+1;o.updateVal(t,"starty",i-e*P.boxMargin,Math.min),o.updateVal(t,"stopy",s+e*P.boxMargin,Math.max),o.updateVal(B.data,"startx",n-e*P.boxMargin,Math.min),o.updateVal(B.data,"stopx",a+e*P.boxMargin,Math.max),"activation"!==r&&(o.updateVal(t,"startx",n-e*P.boxMargin,Math.min),o.updateVal(t,"stopx",a+e*P.boxMargin,Math.max),o.updateVal(B.data,"starty",i-e*P.boxMargin,Math.min),o.updateVal(B.data,"stopy",s+e*P.boxMargin,Math.max))},"updateItemBounds")}Ae(t,"updateFn"),this.sequenceItems.forEach(t()),this.activations.forEach(t("activation"))},"updateBounds"),insert:Ae(function(t,e,r,n){var i=L.getMin(t,r),t=L.getMax(t,r),r=L.getMin(e,n),e=L.getMax(e,n);this.updateVal(B.data,"startx",i,Math.min),this.updateVal(B.data,"starty",r,Math.min),this.updateVal(B.data,"stopx",t,Math.max),this.updateVal(B.data,"stopy",e,Math.max),this.updateBounds(i,r,t,e)},"insert"),newActivation:Ae(function(t,e,r){var r=r.get(t.from),n=Imt(t.from).length||0,r=r.x+r.width/2+(n-1)*P.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+P.activationWidth,stopy:void 0,actor:t.from,anchored:pmt.anchorElement(e)})},"newActivation"),endActivation:Ae(function(t){return t=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from),this.activations.splice(t,1)[0]},"endActivation"),createLoop:Ae(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:Ae(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:Ae(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:Ae(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:Ae(function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:B.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:Ae(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:Ae(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:Ae(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=L.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:Ae(function(){return this.verticalPos},"getVerticalPos"),getBounds:Ae(function(){return{bounds:this.data,models:this.models}},"getBounds")},kmt=Ae(async function(t,e){B.bumpVerticalPos(P.boxMargin),e.height=P.boxMargin,e.starty=B.getVerticalPos();var r=Lb(),t=(r.x=e.startx,r.y=e.starty,r.width=e.width||P.width,r.class="note",t.append("g")),n=pmt.drawRect(t,r),t=((i=Nb()).x=e.startx,i.y=e.starty,i.width=r.width,i.dy="1em",i.text=e.message,i.class="noteText",i.fontFamily=P.noteFontFamily,i.fontSize=P.noteFontSize,i.fontWeight=P.noteFontWeight,i.anchor=P.noteAlign,i.textMargin=P.noteMargin,i.valign="center",Vo(i.text)?await jft(t,i):Gft(t,i)),i=Math.round(t.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));n.attr("height",i+2*P.noteMargin),e.height+=i+2*P.noteMargin,B.bumpVerticalPos(i+2*P.noteMargin),e.stopy=e.starty+i+2*P.noteMargin,e.stopx=e.startx+r.width,B.insert(e.startx,e.starty,e.stopx,e.stopy),B.models.addNote(e)},"drawNote"),Tmt=Ae(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),_mt=Ae(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),Emt=Ae(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont"),Ae(ymt,"boundMessage"),Smt=Ae(async function(t,e,r,n){var{startx:e,stopx:i,starty:a,message:s,type:o,sequenceIndex:l,sequenceVisible:c}=e,h=Q8.calculateTextDimensions(s,Tmt(P)),u=Nb();u.x=e,u.y=a+10,u.width=i-e,u.class="messageText",u.dy="1em",u.text=s,u.fontFamily=P.messageFontFamily,u.fontSize=P.messageFontSize,u.fontWeight=P.messageFontWeight,u.anchor=P.messageAlign,u.valign="center",u.textMargin=P.wrapPadding,u.tspan=!1,Vo(u.text)?await jft(t,u,{startx:e,stopx:i,starty:r}):Gft(t,u);let d=h.width,p,g=(e===i?p=P.rightAngles?t.append("path").attr("d",`M ${e},${r} H ${e+L.getMax(P.width/2,d/2)} V ${r+25} H `+e):t.append("path").attr("d","M "+e+","+r+" C "+(e+60)+","+(r-10)+" "+(e+60)+","+(r+30)+" "+e+","+(r+20)):((p=t.append("line")).attr("x1",e),p.attr("y1",r),p.attr("x2",i),p.attr("y2",r)),o===n.db.LINETYPE.DOTTED||o===n.db.LINETYPE.DOTTED_CROSS||o===n.db.LINETYPE.DOTTED_POINT||o===n.db.LINETYPE.DOTTED_OPEN||o===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(p.style("stroke-dasharray","3, 3"),p.attr("class","messageLine1")):p.attr("class","messageLine0"),"");P.arrowMarkerAbsolute&&(g=(g=(g=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),p.attr("stroke-width",2),p.attr("stroke","none"),p.style("fill","none"),o!==n.db.LINETYPE.SOLID&&o!==n.db.LINETYPE.DOTTED||p.attr("marker-end","url("+g+"#arrowhead)"),o!==n.db.LINETYPE.BIDIRECTIONAL_SOLID&&o!==n.db.LINETYPE.BIDIRECTIONAL_DOTTED||(p.attr("marker-start","url("+g+"#arrowhead)"),p.attr("marker-end","url("+g+"#arrowhead)")),o!==n.db.LINETYPE.SOLID_POINT&&o!==n.db.LINETYPE.DOTTED_POINT||p.attr("marker-end","url("+g+"#filled-head)"),o!==n.db.LINETYPE.SOLID_CROSS&&o!==n.db.LINETYPE.DOTTED_CROSS||p.attr("marker-end","url("+g+"#crosshead)"),(c||P.showSequenceNumbers)&&(p.attr("marker-start","url("+g+"#sequencenumber)"),t.append("text").attr("x",e).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))},"drawMessage"),Cmt=Ae(function(t,e,r,n,i,a,s){let o=0,l=0,c,h=0;for(var u of n){var d=(u=e.get(u)).box;c&&c!=d&&(s||B.models.addBox(c),l+=P.boxMargin+c.margin),d&&d!=c&&(s||(d.x=o+l,d.y=i),l+=d.margin),u.width=u.width||P.width,u.height=L.getMax(u.height||P.height,P.height),u.margin=u.margin||P.actorMargin,h=L.getMax(h,u.height),r.get(u.name)&&(l+=u.width/2),u.x=o+l,u.starty=B.getVerticalPos(),B.insert(u.x,i,u.x+u.width,u.height),o+=u.width+l,u.box&&(u.box.width=o+d.margin-u.box.x),l=u.margin,c=u.box,B.models.addActor(u)}c&&!s&&B.models.addBox(c),B.bumpVerticalPos(h)},"addActorRenderingData"),Amt=Ae(async function(e,r,n,t){if(t){let t=0;B.bumpVerticalPos(2*P.boxMargin);for(var i of n)(i=r.get(i)).stopy||(i.stopy=B.getVerticalPos()),i=await pmt.drawActor(e,i,P,!0),t=L.getMax(t,i);B.bumpVerticalPos(t+P.boxMargin)}else for(var a of n)a=r.get(a),await pmt.drawActor(e,a,P,!1)},"drawActors"),Lmt=Ae(function(t,e,r,n){let i=0,a=0;for(var s of r){var s=e.get(s),o=Dmt(s);(o=pmt.drawPopup(t,s,o,P,P.forceMenus,n)).height>i&&(i=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),Nmt=Ae(function(t){ct(P,t),t.fontFamily&&(P.actorFontFamily=P.noteFontFamily=P.messageFontFamily=t.fontFamily),t.fontSize&&(P.actorFontSize=P.noteFontSize=P.messageFontSize=t.fontSize),t.fontWeight&&(P.actorFontWeight=P.noteFontWeight=P.messageFontWeight=t.fontWeight)},"setConf"),Imt=Ae(function(e){return B.activations.filter(function(t){return t.actor===e})},"actorActivations"),Mmt=Ae(function(t,e){return e=e.get(t),[(t=Imt(t)).reduce(function(t,e){return L.getMin(t,e.startx)},e.x+e.width/2-1),t.reduce(function(t,e){return L.getMax(t,e.stopx)},e.x+e.width/2+1)]},"activationBounds"),Ae(vmt,"adjustLoopHeightForWrap"),Ae(xmt,"adjustCreatedDestroyedData"),Rmt=Ae(async function(n,t,e,i){var{securityLevel:r,sequence:a}=D();P=a;let s;"sandbox"===r&&(s=O("#i"+t));var a=O("sandbox"===r?s.nodes()[0].contentDocument.body:"body"),o="sandbox"===r?s.nodes()[0].contentDocument:document;B.init(),R.debug(i.db);let l="sandbox"===r?a.select(`[id="${t}"]`):O(`[id="${t}"]`),c=i.db.getActors(),h=i.db.getCreatedActors(),u=i.db.getDestroyedActors(),d=i.db.getBoxes(),p=i.db.getActorKeys(),g=i.db.getMessages(),f=i.db.getDiagramTitle(),m=i.db.hasAtLeastOneBox(),y=i.db.hasAtLeastOneBoxWithTitle(),v=await bmt(c,g,i);if(P.height=await wmt(c,v,d),pmt.insertComputerIcon(l),pmt.insertDatabaseIcon(l),pmt.insertClockIcon(l),m&&(B.bumpVerticalPos(P.boxMargin),y)&&B.bumpVerticalPos(d[0].textMaxHeight),!0===P.hideUnusedParticipants){let e=new Set;g.forEach(t=>{e.add(t.from),e.add(t.to)}),p=p.filter(t=>e.has(t))}Cmt(l,c,h,p,0,g,!1);var x,b,w,k=await Bmt(g,c,v,i);function T(t,e){var r=B.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),pmt.drawActivation(l,r,e,P,Imt(t.from).length),B.insert(r.startx,e-10,r.stopx,e)}pmt.insertArrowHead(l),pmt.insertArrowCrossHead(l),pmt.insertArrowFilledHead(l),pmt.insertSequenceNumber(l),Ae(T,"activeEnd");let _=1,E=1,S=[],C=[],A=0;for(x of g){let t,e,r;switch(x.type){case i.db.LINETYPE.NOTE:B.resetVerticalPos(),e=x.noteModel,await kmt(l,e);break;case i.db.LINETYPE.ACTIVE_START:B.newActivation(x,l,c);break;case i.db.LINETYPE.ACTIVE_END:T(x,B.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:vmt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.LOOP_END:t=B.endLoop(),await pmt.drawLoop(l,t,"loop",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.RECT_START:vmt(k,x,P.boxMargin,P.boxMargin,t=>B.newLoop(void 0,t.message));break;case i.db.LINETYPE.RECT_END:t=B.endLoop(),C.push(t),B.models.addLoop(t),B.bumpVerticalPos(t.stopy-B.getVerticalPos());break;case i.db.LINETYPE.OPT_START:vmt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.OPT_END:t=B.endLoop(),await pmt.drawLoop(l,t,"opt",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.ALT_START:vmt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.ALT_ELSE:vmt(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.ALT_END:t=B.endLoop(),await pmt.drawLoop(l,t,"alt",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:vmt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t)),B.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:vmt(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.PAR_END:t=B.endLoop(),await pmt.drawLoop(l,t,"par",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.AUTONUMBER:_=x.message.start||_,E=x.message.step||E,x.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:vmt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.CRITICAL_OPTION:vmt(k,x,P.boxMargin+P.boxTextMargin,P.boxMargin,t=>B.addSectionToLoop(t));break;case i.db.LINETYPE.CRITICAL_END:t=B.endLoop(),await pmt.drawLoop(l,t,"critical",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;case i.db.LINETYPE.BREAK_START:vmt(k,x,P.boxMargin,P.boxMargin+P.boxTextMargin,t=>B.newLoop(t));break;case i.db.LINETYPE.BREAK_END:t=B.endLoop(),await pmt.drawLoop(l,t,"break",P),B.bumpVerticalPos(t.stopy-B.getVerticalPos()),B.models.addLoop(t);break;default:try{(r=x.msgModel).starty=B.getVerticalPos(),r.sequenceIndex=_,r.sequenceVisible=i.db.showSequenceNumbers();var L=await ymt(l,r);xmt(x,r,L,A,c,h,u),S.push({messageModel:r,lineStartY:L}),B.models.addMessage(r)}catch(n){R.error("error while drawing message",n)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT,i.db.LINETYPE.BIDIRECTIONAL_SOLID,i.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(x.type)&&(_+=E),A++}R.debug("createdActors",h),R.debug("destroyedActors",u),await Amt(l,c,p,!1);for(b of S)await Smt(l,b.messageModel,b.lineStartY,i);P.mirrorActors&&await Amt(l,c,p,!0),C.forEach(t=>pmt.drawBackgroundRect(l,t)),Hft(l,c,p,P);for(w of B.models.boxes)w.height=B.getVerticalPos()-w.y,B.insert(w.x,w.y,w.x+w.width,w.height),w.startx=w.x,w.starty=w.y,w.stopx=w.startx+w.width,w.stopy=w.starty+w.height,w.stroke="rgb(0,0,0, 0.5)",pmt.drawBox(l,w,P);m&&B.bumpVerticalPos(P.boxMargin),r=Lmt(l,c,p,o),void 0===(a=B.getBounds().bounds).startx&&(a.startx=0),void 0===a.starty&&(a.starty=0),void 0===a.stopx&&(a.stopx=0),void 0===a.stopy&&(a.stopy=0);let N=a.stopy-a.starty,I=(No?-t:t,"adjustValue");t.from===t.to?c=l:(t.activate&&!h&&(c+=u(P.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(c+=u(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=u(3)));var e=[n,i,a,s],r=Math.abs(l-c),d=(t.wrap&&t.message&&(t.message=Q8.wrapLabel(t.message,L.getMax(r+2*P.wrapPadding,P.width),Tmt(P))),Q8.calculateTextDimensions(t.message,Tmt(P)));return{width:L.getMax(t.wrap?0:d.width+2*P.wrapPadding,r+2*P.wrapPadding,P.width),height:0,startx:l,stopx:c,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,e),toBounds:Math.max.apply(null,e)}},"buildMessageModel"),Bmt=Ae(async function(t,n,e,i){let a={},s=[],o,l,c;for(let r of t){switch(r.id=Q8.random({length:10}),r.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.db.LINETYPE.BREAK_START:s.push({id:r.id,msg:r.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:r.message&&(o=s.pop(),a[o.id]=o,a[r.id]=o,s.push(o));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:o=s.pop(),a[o.id]=o;break;case i.db.LINETYPE.ACTIVE_START:var h=n.get(r.from||r.to.actor),u=Imt(r.from||r.to.actor).length,u={startx:h=h.x+h.width/2+(u-1)*P.activationWidth/2,stopx:h+P.activationWidth,actor:r.from,enabled:!0};B.activations.push(u);break;case i.db.LINETYPE.ACTIVE_END:h=B.activations.map(t=>t.actor).lastIndexOf(r.from),B.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await Omt(r,n,i),r.noteModel=l,s.forEach(t=>{(o=t).from=L.getMin(o.from,l.startx),o.to=L.getMax(o.to,l.startx+l.width),o.width=L.getMax(o.width,Math.abs(o.from-o.to))-P.labelBoxWidth})):(c=Pmt(r,n,i),(r.msgModel=c).startx&&c.stopx&&0{var e;o=t,c.startx===c.stopx?(t=n.get(r.from),e=n.get(r.to),o.from=L.getMin(t.x-c.width/2,t.x-t.width/2,o.from),o.to=L.getMax(e.x+c.width/2,e.x+t.width/2,o.to),o.width=L.getMax(o.width,Math.abs(o.to-o.from))-P.labelBoxWidth):(o.from=L.getMin(c.startx,o.from),o.to=L.getMax(c.stopx,o.to),o.width=L.getMax(o.width,c.width)-P.labelBoxWidth)}))}return B.activations=[],R.debug("Loop type widths:",a),a},"calculateLoopBounds"),Fmt={bounds:B,drawActors:Amt,drawActorsPopup:Lmt,setConf:Nmt,draw:Rmt}}),zmt={};A(zmt,{diagram:()=>qmt});var qmt,Umt,jmt,Gmt,Wmt,Ymt,Hmt,Vmt,Xmt,Kmt,Zmt,Qmt,Jmt,tyt,eyt,ryt,nyt,iyt,ayt,syt,oyt,lyt,cyt,hyt,uyt,dyt,pyt,gyt,fyt,myt,yyt,vyt,xyt,byt,wyt,kyt,Tyt,_yt,Eyt,Syt,Cyt,Ayt,Lyt,Nyt,Iyt,Myt,Ryt,Dyt,Oyt,Pyt,Byt,Fyt,$yt,zyt,qyt,Uyt,jyt,Gyt,Wyt,Yyt,Hyt,Vyt,Xyt=i(()=>{Kgt(),gmt(),fmt(),$mt(),qmt={parser:Vgt,db:Dft,renderer:Fmt,styles:Pft,init:Ae(({wrap:t})=>{Dft.setWrap(t)},"init")}}),Kyt=i(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,17],n=[1,18],i=[1,19],a=[1,39],s=[1,40],o=[1,25],l=[1,23],P=[1,24],B=[1,31],F=[1,32],$=[1,33],z=[1,34],q=[1,35],U=[1,36],j=[1,26],G=[1,27],W=[1,28],Y=[1,29],c=[1,43],H=[1,30],h=[1,42],u=[1,44],d=[1,41],p=[1,45],V=[1,9],g=[1,8,9],f=[1,56],m=[1,57],y=[1,58],v=[1,59],x=[1,60],X=[1,61],K=[1,62],b=[1,8,9,39],Z=[1,74],w=[1,8,9,12,13,21,37,39,42,59,60,61,62,63,64,65,70,72],k=[1,8,9,12,13,19,21,37,39,42,46,59,60,61,62,63,64,65,70,72,74,80,95,97,98],T=[13,74,80,95,97,98],_=[13,64,65,74,80,95,97,98],Q=[13,59,60,61,62,63,74,80,95,97,98],J=[1,93],E=[1,110],S=[1,108],C=[1,102],A=[1,103],L=[1,104],N=[1,105],I=[1,106],M=[1,107],R=[1,109],tt=[1,8,9,37,39,42],D=[1,8,9,21],et=[1,8,9,78],O=[1,8,9,21,73,74,78,80,81,82,83,84,85],k={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statements:5,graphConfig:6,CLASS_DIAGRAM:7,NEWLINE:8,EOF:9,statement:10,classLabel:11,SQS:12,STR:13,SQE:14,namespaceName:15,alphaNumToken:16,className:17,classLiteralName:18,GENERICTYPE:19,relationStatement:20,LABEL:21,namespaceStatement:22,classStatement:23,memberStatement:24,annotationStatement:25,clickStatement:26,styleStatement:27,cssClassStatement:28,noteStatement:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,namespaceIdentifier:36,STRUCT_START:37,classStatements:38,STRUCT_STOP:39,NAMESPACE:40,classIdentifier:41,STYLE_SEPARATOR:42,members:43,CLASS:44,ANNOTATION_START:45,ANNOTATION_END:46,MEMBER:47,SEPARATOR:48,relation:49,NOTE_FOR:50,noteText:51,NOTE:52,direction_tb:53,direction_bt:54,direction_rl:55,direction_lr:56,relationType:57,lineType:58,AGGREGATION:59,EXTENSION:60,COMPOSITION:61,DEPENDENCY:62,LOLLIPOP:63,LINE:64,DOTTED_LINE:65,CALLBACK:66,LINK:67,LINK_TARGET:68,CLICK:69,CALLBACK_NAME:70,CALLBACK_ARGS:71,HREF:72,STYLE:73,ALPHA:74,stylesOpt:75,CSSCLASS:76,style:77,COMMA:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,commentToken:86,textToken:87,graphCodeTokens:88,textNoTagsToken:89,TAGSTART:90,TAGEND:91,"==":92,"--":93,DEFAULT:94,MINUS:95,keywords:96,UNICODE_TEXT:97,BQUOTE_STR:98,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",19:"GENERICTYPE",21:"LABEL",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",37:"STRUCT_START",39:"STRUCT_STOP",40:"NAMESPACE",42:"STYLE_SEPARATOR",44:"CLASS",45:"ANNOTATION_START",46:"ANNOTATION_END",47:"MEMBER",48:"SEPARATOR",50:"NOTE_FOR",52:"NOTE",53:"direction_tb",54:"direction_bt",55:"direction_rl",56:"direction_lr",59:"AGGREGATION",60:"EXTENSION",61:"COMPOSITION",62:"DEPENDENCY",63:"LOLLIPOP",64:"LINE",65:"DOTTED_LINE",66:"CALLBACK",67:"LINK",68:"LINK_TARGET",69:"CLICK",70:"CALLBACK_NAME",71:"CALLBACK_ARGS",72:"HREF",73:"STYLE",74:"ALPHA",76:"CSSCLASS",78:"COMMA",80:"NUM",81:"COLON",82:"UNIT",83:"SPACE",84:"BRKT",85:"PCT",88:"graphCodeTokens",90:"TAGSTART",91:"TAGEND",92:"==",93:"--",94:"DEFAULT",95:"MINUS",96:"keywords",97:"UNICODE_TEXT",98:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,2],[17,1],[17,1],[17,2],[17,2],[17,2],[10,1],[10,2],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[22,4],[22,5],[36,2],[38,1],[38,2],[38,3],[23,1],[23,3],[23,4],[23,6],[41,2],[41,3],[25,4],[43,1],[43,2],[24,1],[24,2],[24,1],[24,1],[20,3],[20,4],[20,4],[20,5],[29,3],[29,2],[30,1],[30,1],[30,1],[30,1],[49,3],[49,2],[49,2],[49,1],[57,1],[57,1],[57,1],[57,1],[57,1],[58,1],[58,1],[26,3],[26,4],[26,3],[26,4],[26,4],[26,5],[26,3],[26,4],[26,4],[26,5],[26,4],[26,5],[26,5],[26,6],[27,3],[28,3],[75,1],[75,3],[77,1],[77,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[86,1],[86,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[89,1],[89,1],[89,1],[89,1],[16,1],[16,1],[16,1],[16,1],[18,1],[51,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 8:this.$=a[o-1];break;case 9:case 11:case 12:this.$=a[o];break;case 10:case 13:this.$=a[o-1]+a[o];break;case 14:case 15:this.$=a[o-1]+"~"+a[o]+"~";break;case 16:n.addRelation(a[o]);break;case 17:a[o-1].title=n.cleanupLabel(a[o]),n.addRelation(a[o-1]);break;case 27:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 28:case 29:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 30:n.addClassesToNamespace(a[o-3],a[o-1]);break;case 31:n.addClassesToNamespace(a[o-4],a[o-1]);break;case 32:this.$=a[o],n.addNamespace(a[o]);break;case 33:this.$=[a[o]];break;case 34:this.$=[a[o-1]];break;case 35:a[o].unshift(a[o-2]),this.$=a[o];break;case 37:n.setCssClass(a[o-2],a[o]);break;case 38:n.addMembers(a[o-3],a[o-1]);break;case 39:n.setCssClass(a[o-5],a[o-3]),n.addMembers(a[o-5],a[o-1]);break;case 40:this.$=a[o],n.addClass(a[o]);break;case 41:this.$=a[o-1],n.addClass(a[o-1]),n.setClassLabel(a[o-1],a[o]);break;case 42:n.addAnnotation(a[o],a[o-2]);break;case 43:this.$=[a[o]];break;case 44:a[o].push(a[o-1]),this.$=a[o];break;case 45:break;case 46:n.addMember(a[o-1],n.cleanupLabel(a[o]));break;case 47:case 48:break;case 49:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 51:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 52:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 53:n.addNote(a[o],a[o-1]);break;case 54:n.addNote(a[o]);break;case 55:n.setDirection("TB");break;case 56:n.setDirection("BT");break;case 57:n.setDirection("RL");break;case 58:n.setDirection("LR");break;case 59:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 60:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 61:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 62:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 63:this.$=n.relationType.AGGREGATION;break;case 64:this.$=n.relationType.EXTENSION;break;case 65:this.$=n.relationType.COMPOSITION;break;case 66:this.$=n.relationType.DEPENDENCY;break;case 67:this.$=n.relationType.LOLLIPOP;break;case 68:this.$=n.lineType.LINE;break;case 69:this.$=n.lineType.DOTTED_LINE;break;case 70:case 76:this.$=a[o-2],n.setClickEvent(a[o-1],a[o]);break;case 71:case 77:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 72:this.$=a[o-2],n.setLink(a[o-1],a[o]);break;case 73:this.$=a[o-3],n.setLink(a[o-2],a[o-1],a[o]);break;case 74:this.$=a[o-3],n.setLink(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 75:this.$=a[o-4],n.setLink(a[o-3],a[o-2],a[o]),n.setTooltip(a[o-3],a[o-1]);break;case 78:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 79:this.$=a[o-4],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 80:this.$=a[o-3],n.setLink(a[o-2],a[o]);break;case 81:this.$=a[o-4],n.setLink(a[o-3],a[o-1],a[o]);break;case 82:this.$=a[o-4],n.setLink(a[o-3],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 83:this.$=a[o-5],n.setLink(a[o-4],a[o-2],a[o]),n.setTooltip(a[o-4],a[o-1]);break;case 84:this.$=a[o-2],n.setCssStyle(a[o-1],a[o]);break;case 85:n.setCssClass(a[o-1],a[o]);break;case 86:this.$=[a[o]];break;case 87:a[o-2].push(a[o]),this.$=a[o-2];break;case 89:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:r,33:n,35:i,36:21,40:a,41:22,44:s,45:o,47:l,48:P,50:B,52:F,53:$,54:z,55:q,56:U,66:j,67:G,69:W,73:Y,74:c,76:H,80:h,95:u,97:d,98:p},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(V,[2,5],{8:[1,46]}),{8:[1,47]},e(g,[2,16],{21:[1,48]}),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),{32:[1,49]},{34:[1,50]},e(g,[2,29]),e(g,[2,45],{49:51,57:54,58:55,13:[1,52],21:[1,53],59:f,60:m,61:y,62:v,63:x,64:X,65:K}),{37:[1,63]},e(b,[2,36],{37:[1,65],42:[1,64]}),e(g,[2,47]),e(g,[2,48]),{16:66,74:c,80:h,95:u,97:d},{16:37,17:67,18:38,74:c,80:h,95:u,97:d,98:p},{16:37,17:68,18:38,74:c,80:h,95:u,97:d,98:p},{16:37,17:69,18:38,74:c,80:h,95:u,97:d,98:p},{74:[1,70]},{13:[1,71]},{16:37,17:72,18:38,74:c,80:h,95:u,97:d,98:p},{13:Z,51:73},e(g,[2,55]),e(g,[2,56]),e(g,[2,57]),e(g,[2,58]),e(w,[2,11],{16:37,18:38,17:75,19:[1,76],74:c,80:h,95:u,97:d,98:p}),e(w,[2,12],{19:[1,77]}),{15:78,16:79,74:c,80:h,95:u,97:d},{16:37,17:80,18:38,74:c,80:h,95:u,97:d,98:p},e(k,[2,112]),e(k,[2,113]),e(k,[2,114]),e(k,[2,115]),e([1,8,9,12,13,19,21,37,39,42,59,60,61,62,63,64,65,70,72],[2,116]),e(V,[2,6],{10:5,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,17:20,36:21,41:22,16:37,18:38,5:81,31:r,33:n,35:i,40:a,44:s,45:o,47:l,48:P,50:B,52:F,53:$,54:z,55:q,56:U,66:j,67:G,69:W,73:Y,74:c,76:H,80:h,95:u,97:d,98:p}),{5:82,10:5,16:37,17:20,18:38,20:7,22:8,23:9,24:10,25:11,26:12,27:13,28:14,29:15,30:16,31:r,33:n,35:i,36:21,40:a,41:22,44:s,45:o,47:l,48:P,50:B,52:F,53:$,54:z,55:q,56:U,66:j,67:G,69:W,73:Y,74:c,76:H,80:h,95:u,97:d,98:p},e(g,[2,17]),e(g,[2,27]),e(g,[2,28]),{13:[1,84],16:37,17:83,18:38,74:c,80:h,95:u,97:d,98:p},{49:85,57:54,58:55,59:f,60:m,61:y,62:v,63:x,64:X,65:K},e(g,[2,46]),{58:86,64:X,65:K},e(T,[2,62],{57:87,59:f,60:m,61:y,62:v,63:x}),e(_,[2,63]),e(_,[2,64]),e(_,[2,65]),e(_,[2,66]),e(_,[2,67]),e(Q,[2,68]),e(Q,[2,69]),{8:[1,89],23:90,38:88,41:22,44:s},{16:91,74:c,80:h,95:u,97:d},{43:92,47:J},{46:[1,94]},{13:[1,95]},{13:[1,96]},{70:[1,97],72:[1,98]},{21:E,73:S,74:C,75:99,77:100,79:101,80:A,81:L,82:N,83:I,84:M,85:R},{74:[1,111]},{13:Z,51:112},e(g,[2,54]),e(g,[2,117]),e(w,[2,13]),e(w,[2,14]),e(w,[2,15]),{37:[2,32]},{15:113,16:79,37:[2,9],74:c,80:h,95:u,97:d},e(tt,[2,40],{11:114,12:[1,115]}),e(V,[2,7]),{9:[1,116]},e(D,[2,49]),{16:37,17:117,18:38,74:c,80:h,95:u,97:d,98:p},{13:[1,119],16:37,17:118,18:38,74:c,80:h,95:u,97:d,98:p},e(T,[2,61],{57:120,59:f,60:m,61:y,62:v,63:x}),e(T,[2,60]),{39:[1,121]},{23:90,38:122,41:22,44:s},{8:[1,123],39:[2,33]},e(b,[2,37],{37:[1,124]}),{39:[1,125]},{39:[2,43],43:126,47:J},{16:37,17:127,18:38,74:c,80:h,95:u,97:d,98:p},e(g,[2,70],{13:[1,128]}),e(g,[2,72],{13:[1,130],68:[1,129]}),e(g,[2,76],{13:[1,131],71:[1,132]}),{13:[1,133]},e(g,[2,84],{78:[1,134]}),e(et,[2,86],{79:135,21:E,73:S,74:C,80:A,81:L,82:N,83:I,84:M,85:R}),e(O,[2,88]),e(O,[2,90]),e(O,[2,91]),e(O,[2,92]),e(O,[2,93]),e(O,[2,94]),e(O,[2,95]),e(O,[2,96]),e(O,[2,97]),e(O,[2,98]),e(g,[2,85]),e(g,[2,53]),{37:[2,10]},e(tt,[2,41]),{13:[1,136]},{1:[2,4]},e(D,[2,51]),e(D,[2,50]),{16:37,17:137,18:38,74:c,80:h,95:u,97:d,98:p},e(T,[2,59]),e(g,[2,30]),{39:[1,138]},{23:90,38:139,39:[2,34],41:22,44:s},{43:140,47:J},e(b,[2,38]),{39:[2,44]},e(g,[2,42]),e(g,[2,71]),e(g,[2,73]),e(g,[2,74],{68:[1,141]}),e(g,[2,77]),e(g,[2,78],{13:[1,142]}),e(g,[2,80],{13:[1,144],68:[1,143]}),{21:E,73:S,74:C,77:145,79:101,80:A,81:L,82:N,83:I,84:M,85:R},e(O,[2,89]),{14:[1,146]},e(D,[2,52]),e(g,[2,31]),{39:[2,35]},{39:[1,147]},e(g,[2,75]),e(g,[2,79]),e(g,[2,81]),e(g,[2,82],{68:[1,148]}),e(et,[2,87],{79:135,21:E,73:S,74:C,80:A,81:L,82:N,83:I,84:M,85:R}),e(tt,[2,8]),e(b,[2,39]),e(g,[2,83])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],78:[2,32],113:[2,10],116:[2,4],126:[2,44],139:[2,35]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,32,33,34,35,36,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},namespace:{rules:[26,28,29,30,31,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},"class-body":{rules:[26,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},class:{rules:[26,38,39,40,41,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_descr:{rules:[9,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},acc_title:{rules:[7,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_args:{rules:[22,23,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},callback_name:{rules:[19,20,21,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},href:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},struct:{rules:[26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},generic:{rules:[26,48,49,50,51,52,53,54,55,56,57,58,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},bqstring:{rules:[26,48,49,50,51,52,53,54,55,56,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},string:{rules:[24,25,26,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,85,86,87,88,89,90,91,92,93,94,96],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,37,48,49,50,51,52,53,54,55,56,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96],inclusive:!0}}};k.lexer=r,Ae(t,"Parser"),(Umt=new((t.prototype=k).Parser=t)).parser=Umt,jmt=Umt}),Zyt=i(()=>{wc(),al(),Gmt=["#","+","~","-",""],Wmt=class{static{Ae(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",e=Mo(t,D()),this.parseMember(e)}getDisplayDetails(){let t=this.visibility+Uo(this.id);"method"===this.memberType&&(t+=`(${Uo(this.parameters.trim())})`,this.returnType)&&(t+=" : "+Uo(this.returnType)),t=t.trim();var e=this.parseClassifier();return{displayText:t,cssStyle:e}}parseMember(t){let e="";var r,n,i;"method"===this.memberType?(r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t))&&(n=r[1]?r[1].trim():"",Gmt.includes(n)&&(this.visibility=n),this.id=r[2].trim(),this.parameters=r[3]?r[3].trim():"",e=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===e)&&(n=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(n))&&(e=n,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=t.length,n=t.substring(0,1),i=t.substring(r-1),Gmt.includes(n)&&(this.visibility=n),/[$*]/.exec(i)&&(e=i),this.id=t.substring(""===this.visibility?0:1,""===e?r:r-1)),this.classifier=e}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}}}),Qyt=i(()=>{i3(),t(),wc(),al(),rT(),bc(),Zyt(),Ymt="classId-",Hmt=[],Vmt=new Map,Xmt=[],Kmt=0,Zmt=new Map,Qmt=0,Jmt=[],tyt=Ae(t=>L.sanitizeText(t,D()),"sanitizeText"),eyt=Ae(function(t){let e=L.sanitizeText(t,D()),r="",n=e;return 0>")?t.annotations.push(tyt(e.substring(2,e.length-2))):0dyt(e,t)))},"addMembers"),gyt=Ae(function(t,e){e={id:"note"+Xmt.length,class:e,text:t},Xmt.push(e)},"addNote"),fyt=Ae(function(t){return t.startsWith(":")&&(t=t.substring(1)),tyt(t.trim())},"cleanupLabel"),myt=Ae(function(t,r){t.split(",").forEach(function(t){let e=t;/\d/.exec(t[0])&&(e=Ymt+e),(t=Vmt.get(e))&&t.cssClasses.push(r)})},"setCssClass"),yyt=Ae(function(t,e){t.split(",").forEach(function(t){void 0!==e&&(Vmt.get(t).tooltip=tyt(e))})},"setTooltip"),vyt=Ae(function(t,e){return(e&&Zmt.has(e)?Zmt.get(e).classes:Vmt).get(t).tooltip},"getTooltip"),xyt=Ae(function(t,r,n){let i=D();t.split(",").forEach(function(t){let e=t;/\d/.exec(t[0])&&(e=Ymt+e),(t=Vmt.get(e))&&(t.link=Q8.formatUrl(r,i),"sandbox"===i.securityLevel?t.linkTarget="_top":t.linkTarget="string"==typeof n?tyt(n):"_blank")}),myt(t,"clickable")},"setLink"),byt=Ae(function(t,e,r){t.split(",").forEach(function(t){wyt(t,e,r),Vmt.get(t).haveCallback=!0}),myt(t,"clickable")},"setClickEvent"),wyt=Ae(function(t,n,i){if(t=L.sanitizeText(t,D()),"loose"===D().securityLevel&&void 0!==n&&Vmt.has(t)){let e=iyt(t),r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e")),e.classed("hover",!0))}).on("mouseout",function(){r.transition().duration(500).style("opacity",0),O(this).classed("hover",!1)})},"setupToolTips"),Jmt.push(Eyt),Syt="TB",Cyt=Ae(()=>Syt,"getDirection"),Ayt=Ae(t=>{Syt=t},"setDirection"),Lyt=Ae(function(t){Zmt.has(t)||(Zmt.set(t,{id:t,classes:new Map,children:{},domId:Ymt+t+"-"+Qmt}),Qmt++)},"addNamespace"),Nyt=Ae(function(t){return Zmt.get(t)},"getNamespace"),Iyt=Ae(function(){return Zmt},"getNamespaces"),Myt=Ae(function(t,e){if(Zmt.has(t))for(var r of e)r=eyt(r).className,Vmt.get(r).parent=t,Zmt.get(t).classes.set(r,Vmt.get(r))},"addClassesToNamespace"),Ryt=Ae(function(t,e){var r=Vmt.get(t);if(e&&r)for(var n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)},"setCssStyle"),Dyt={setAccTitle:gl,getAccTitle:fl,getAccDescription:yl,setAccDescription:ml,getConfig:Ae(()=>D().class,"getConfig"),addClass:nyt,bindFunctions:kyt,clear:ayt,getClass:syt,getClasses:oyt,getNotes:cyt,addAnnotation:uyt,addNote:gyt,getRelations:lyt,addRelation:hyt,getDirection:Cyt,setDirection:Ayt,addMember:dyt,addMembers:pyt,cleanupLabel:fyt,lineType:Tyt,relationType:_yt,setClickEvent:byt,setCssClass:myt,setLink:xyt,getTooltip:vyt,setTooltip:yyt,lookUpDomId:iyt,setDiagramTitle:vl,getDiagramTitle:xl,setClassLabel:ryt,addNamespace:Lyt,addClassesToNamespace:Myt,getNamespace:Nyt,getNamespaces:Iyt,setCssStyle:Ryt}}),Jyt=i(()=>{Oyt=Ae(t=>`g.classGroup text { + fill: ${t.nodeBorder||t.classText}; + stroke: none; + font-family: ${t.fontFamily}; + font-size: 10px; + + .title { + font-weight: bolder; + } + +} + +.nodeLabel, .edgeLabel { + color: ${t.classText}; +} +.edgeLabel .label rect { + fill: ${t.mainBkg}; +} +.label text { + fill: ${t.classText}; +} +.edgeLabel .label span { + background: ${t.mainBkg}; +} + +.classTitle { + font-weight: bolder; +} +.node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + +.divider { + stroke: ${t.nodeBorder}; + stroke-width: 1; +} + +g.clickable { + cursor: pointer; +} + +g.classGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.classGroup line { + stroke: ${t.nodeBorder}; + stroke-width: 1; +} + +.classLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.classLabel .label { + fill: ${t.nodeBorder}; + font-size: 10px; +} + +.relation { + stroke: ${t.lineColor}; + stroke-width: 1; + fill: none; +} + +.dashed-line{ + stroke-dasharray: 3; +} + +.dotted-line{ + stroke-dasharray: 1 2; +} + +#compositionStart, .composition { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#compositionEnd, .composition { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#dependencyStart, .dependency { + fill: ${t.lineColor} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#extensionStart, .extension { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#extensionEnd, .extension { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#aggregationStart, .aggregation { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#aggregationEnd, .aggregation { + fill: transparent !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#lollipopStart, .lollipop { + fill: ${t.mainBkg} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +#lollipopEnd, .lollipop { + fill: ${t.mainBkg} !important; + stroke: ${t.lineColor} !important; + stroke-width: 1; +} + +.edgeTerminals { + font-size: 11px; + line-height: initial; +} + +.classTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} +`,"getStyles"),Pyt=Oyt}),t2t=i(()=>{i3(),rT(),t(),al(),Byt=0,Fyt=Ae(function(t,e,r,n,i){var a=Ae(function(t){switch(t){case i.db.relationType.AGGREGATION:return"aggregation";case i.db.relationType.EXTENSION:return"extension";case i.db.relationType.COMPOSITION:return"composition";case i.db.relationType.DEPENDENCY:return"dependency";case i.db.relationType.LOLLIPOP:return"lollipop"}},"getRelationType");e.points=e.points.filter(t=>!Number.isNaN(t.y));let s=e.points,o=rx().x(function(t){return t.x}).y(function(t){return t.y}).curve(vx),l=t.append("path").attr("d",o(s)).attr("id","edge"+Byt).attr("class","relation"),c="";n.arrowMarkerAbsolute&&(c=(c=(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==r.relation.lineType&&l.attr("class","relation dashed-line"),10==r.relation.lineType&&l.attr("class","relation dotted-line"),"none"!==r.relation.type1&&l.attr("marker-start","url("+c+"#"+a(r.relation.type1)+"Start)"),"none"!==r.relation.type2&&l.attr("marker-end","url("+c+"#"+a(r.relation.type2)+"End)");var h,a=e.points.length,u=(d=Q8.calcLabelPosition(e.points)).x,d=d.y;let p,g,f,m;a%2!=0&&1"),e},"getClassTitleString"),qyt=Ae(function(t,e,r,n){R.debug("Rendering note ",e,r);let i=e.id,a={id:i,text:e.text,width:0,height:0},s=t.append("g").attr("id",i).attr("class","classGroup"),o=s.append("text").attr("y",r.textHeight+r.padding).attr("x",0),l=JSON.parse(`"${e.text}"`).split(` +`),c=(l.forEach(function(t){R.debug("Adding line: "+t),o.append("tspan").text(t).attr("class","title").attr("dy",r.textHeight)}),s.node().getBBox()),h=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",c.width+2*r.padding).attr("height",c.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach(function(t){t.setAttribute("x",(h-t.getBBox().width)/2)}),a.width=h,a.height=c.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin,a},"drawNote"),Uyt=Ae(function(t,e,r,n){var{displayText:i,cssStyle:a}=e.getDisplayDetails(),t=t.append("tspan").attr("x",n.padding).text(i);""!==a&&t.attr("style",e.cssStyle),r||t.attr("dy",n.textHeight)},"addTspan"),jyt={getClassTitleString:zyt,drawClass:$yt,drawEdge:Fyt,drawNote:qyt}}),e2t=i(()=>{i3(),kG(),cq(),t(),t2t(),sl(),wc(),Gyt={},Wyt=Ae(function(e){var t=Object.entries(Gyt).find(t=>t[1].label===e);if(t)return t[0]},"getGraphId"),Yyt=Ae(function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),Hyt=Ae(function(t,e,r,n){let i=D().class,a=(Gyt={},R.info("Rendering diagram "+t),D().securityLevel),s,o=("sandbox"===a&&(s=O("#i"+e)),O("sandbox"===a?s.nodes()[0].contentDocument.body:"body")),l=o.select(`[id='${e}']`),c=(Yyt(l),new oq({multigraph:!0})),h=(c.setGraph({isMultiGraph:!0}),c.setDefaultEdgeLabel(function(){return{}}),n.db.getClasses()),u=[...h.keys()];for(var d of u)d=h.get(d),d=jyt.drawClass(l,d,i,n),Gyt[d.id]=d,c.setNode(d.id,d),R.info("Org height: "+d.height);n.db.getRelations().forEach(function(t){R.info("tjoho"+Wyt(t.id1)+Wyt(t.id2)+JSON.stringify(t)),c.setEdge(Wyt(t.id1),Wyt(t.id2),{relation:t},t.title||"DEFAULT")}),n.db.getNotes().forEach(function(t){R.debug("Adding note: "+JSON.stringify(t));var e=jyt.drawNote(l,t,i,n);Gyt[e.id]=e,c.setNode(e.id,e),t.class&&h.has(t.class)&&c.setEdge(t.id,Wyt(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),Xj(c),c.nodes().forEach(function(t){void 0!==t&&void 0!==c.node(t)&&(R.debug("Node "+t+": "+JSON.stringify(c.node(t))),o.select("#"+(n.db.lookUpDomId(t)||t)).attr("transform","translate("+(c.node(t).x-c.node(t).width/2)+","+(c.node(t).y-c.node(t).height/2)+" )"))}),c.edges().forEach(function(t){void 0!==t&&void 0!==c.edge(t)&&(R.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(c.edge(t))),jyt.drawEdge(l,c.edge(t),c.edge(t).relation,i,n))});var e=(t=l.node().getBBox()).width+40,p=t.height+40,t=(Jo(l,p,e,i.useMaxWidth),`${t.x-20} ${t.y-20} ${e} `+p);R.debug("viewBox "+t),l.attr("viewBox",t)},"draw"),Vyt={draw:Hyt}}),r2t={};A(r2t,{diagram:()=>n2t});var n2t,i2t,a2t,s2t,o2t,l2t,c2t,h2t,u2t,d2t,p2t,g2t,f2t,m2t,y2t,v2t,x2t,b2t,w2t,k2t,T2t,_2t,E2t,S2t,C2t,A2t,L2t,N2t,I2t,M2t,R2t,D2t,O2t,P2t,B2t,F2t,$2t,z2t,q2t=i(()=>{Kyt(),Qyt(),Jyt(),e2t(),n2t={parser:jmt,db:Dyt,renderer:Vyt,styles:Pyt,init:Ae(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Dyt.clear()},"init")}}),U2t=i(()=>{t(),i2t=Ae((e,t,r,n)=>{t.forEach(t=>{g2t[t](e,r,n)})},"insertMarkers"),a2t=Ae((t,e,r)=>{R.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),s2t=Ae((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),o2t=Ae((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),l2t=Ae((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),c2t=Ae((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),h2t=Ae((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),u2t=Ae((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),d2t=Ae((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),p2t=Ae((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),g2t={extension:a2t,composition:s2t,aggregation:o2t,dependency:l2t,lollipop:c2t,point:h2t,circle:u2t,cross:d2t,barb:p2t},f2t=i2t}),j2t=i(()=>{t(),qG(),cq(),m2t={},y2t={},v2t={},x2t=Ae(()=>{y2t={},v2t={},m2t={}},"clear"),b2t=Ae((t,e)=>(R.trace("In isDescendant",e," ",t," = ",y2t[e].includes(t)),!!y2t[e].includes(t)),"isDescendant"),w2t=Ae((t,e)=>(R.info("Descendants of ",e," is ",y2t[e]),R.info("Edge is ",t),t.v!==e&&t.w!==e&&(y2t[e]?y2t[e].includes(t.v)||b2t(t.v,e)||b2t(t.w,e)||y2t[e].includes(t.w):(R.debug("Tilt, ",e,",not in descendants"),!1))),"edgeInCluster"),k2t=Ae((r,n,i,a)=>{R.warn("Copying children of ",r,"root",a,"data",n.node(r),a);var t=n.children(r)||[];r!==a&&t.push(r),R.warn("Copying (nodes) clusterId",r,"nodes",t),t.forEach(t=>{var e;0{R.info("Edge",t);var e=n.edge(t.v,t.w,t.name);R.info("Edge data",e,a);try{w2t(t,a)?(R.info("Copying as ",t.v,t.w,e,t.name),i.setEdge(t.v,t.w,e,t.name),R.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):R.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",r)}catch(t){R.error(t)}})),R.debug("Removing node",t),n.removeNode(t)})},"copy"),T2t=Ae((t,e)=>{let r=e.children(t),n=[...r];for(var i of r)v2t[i]=t,n=[...n,...T2t(i,e)];return n},"extractDescendants"),_2t=Ae((t,e)=>{R.trace("Searching",t);var r,n=e.children(t);if(R.trace("Searching children of id ",t,n),n.length<1)return R.trace("This is a valid node",t),t;for(r of n){var i=_2t(r,e);if(i)return R.trace("Found replacement for",t," => ",i),i}},"findNonClusterChild"),E2t=Ae(t=>m2t[t]&&m2t[t].externalConnections&&m2t[t]?m2t[t].id:t,"getAnchorId"),S2t=Ae((o,t)=>{if(!o||10{t.v!==e&&t.w!==e&&b2t(t.v,e)^b2t(t.w,e)&&(R.warn("Edge: ",t," leaves cluster ",e),R.warn("Descendants of XXX ",e,": ",y2t[e]),m2t[e].externalConnections=!0)})):R.debug("Not a cluster ",e,y2t)});for(var e of Object.keys(m2t)){var r=m2t[e].id;(r=o.parent(r))!==e&&m2t[r]&&!m2t[r].externalConnections&&(m2t[e].id=r)}o.edges().forEach(function(t){var e,r,n,i=o.edge(t);R.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),R.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t)));let a=t.v,s=t.w;R.warn("Fix XXX",m2t,"ids:",t.v,t.w,"Translating: ",m2t[t.v]," --- ",m2t[t.w]),m2t[t.v]&&m2t[t.w]&&m2t[t.v]===m2t[t.w]?(R.warn("Fixing and trixing link to self - removing XXX",t.v,t.w,t.name),R.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),a=E2t(t.v),s=E2t(t.w),o.removeEdge(t.v,t.w,t.name),n=t.w+"---"+t.v,o.setNode(n,{domId:n,id:n,labelStyle:"",labelText:i.label,padding:0,shape:"labelRect",style:""}),r=structuredClone(i),e=structuredClone(i),r.label="",r.arrowTypeEnd="none",e.label="",r.fromCluster=t.v,e.toCluster=t.v,o.setEdge(a,n,r,t.name+"-cyclic-special"),o.setEdge(n,s,e,t.name+"-cyclic-special")):(m2t[t.v]||m2t[t.w])&&(R.warn("Fixing and trixing - removing XXX",t.v,t.w,t.name),a=E2t(t.v),s=E2t(t.w),o.removeEdge(t.v,t.w,t.name),a!==t.v&&(r=o.parent(a),m2t[r].externalConnections=!0,i.fromCluster=t.v),s!==t.w&&(n=o.parent(s),m2t[n].externalConnections=!0,i.toCluster=t.w),R.warn("Fix Replacing with XXX",a,s,t.name),o.setEdge(a,s,i,t.name))}),R.warn("Adjusted Graph",TG(o)),C2t(o,0),R.trace(m2t)}},"adjustClustersAndEdges"),C2t=Ae((r,n)=>{if(R.warn("extractor - ",n,TG(r),r.children("D")),10{if(0===t.length)return[];let r=Object.assign(t);return t.forEach(t=>{t=e.children(t),t=A2t(e,t),r=[...r,...t]}),r},"sorter"),L2t=Ae(t=>A2t(t,t.children()),"sortNodesByHierarchy")}),G2t=i(()=>{SS(),t(),sS(),eS(),i3(),wc(),al(),yC(),N2t=Ae((t,e)=>{R.info("Creating subgraph rect for ",e.id,e);let r=D(),n=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),i=n.insert("rect",":first-child"),a=$o(r.flowchart.htmlLabels),s=n.insert("g").attr("class","cluster-label"),o="markdown"===e.labelType?tS(s,e.labelText,{style:e.labelStyle,useHtmlLabels:a},r):s.node().appendChild(aS(e.labelText,e.labelStyle,void 0,!0)),l=o.getBBox();$o(r.flowchart.htmlLabels)&&(t=o.children[0],c=O(o),l=t.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height));var c=(t=0*e.padding)/2,h=e.width<=l.width+t?l.width+t:e.width,c=(e.width<=l.width+t?e.diff=(l.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,R.trace("Data ",e,JSON.stringify(e)),i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-h/2).attr("y",e.y-e.height/2-c).attr("width",h).attr("height",e.height+t),gC(r).subGraphTitleTopMargin),h=(a?s.attr("transform",`translate(${e.x-l.width/2}, ${e.y-e.height/2+c})`):s.attr("transform",`translate(${e.x}, ${e.y-e.height/2+c})`),i.node().getBBox());return e.width=h.width,e.height=h.height,e.intersect=function(t){return TS(e,t)},n},"rect"),I2t=Ae((t,e)=>{var r=(t=t.insert("g").attr("class","note-cluster").attr("id",e.id)).insert("rect",":first-child"),n=0*e.padding,i=n/2,i=(r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none"),r.node().getBBox());return e.width=i.width,e.height=i.height,e.intersect=function(t){return TS(e,t)},t},"noteGroup"),M2t=Ae((t,e)=>{let r=D(),n=t.insert("g").attr("class",e.classes).attr("id",e.id),i=n.insert("rect",":first-child"),a=n.insert("g").attr("class","cluster-label"),s=n.append("rect"),o=a.node().appendChild(aS(e.labelText,e.labelStyle,void 0,!0)),l=o.getBBox();$o(r.flowchart.htmlLabels)&&(t=o.children[0],c=O(o),l=t.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)),l=o.getBBox();var c=(t=0*e.padding)/2,h=e.width<=l.width+e.padding?l.width+e.padding:e.width,c=(e.width<=l.width+e.padding?e.diff=(l.width+0*e.padding-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-h/2-c).attr("y",e.y-e.height/2-c).attr("width",h+t).attr("height",e.height+t),s.attr("class","inner").attr("x",e.x-h/2-c).attr("y",e.y-e.height/2-c+l.height-1).attr("width",h+t).attr("height",e.height+t-l.height-3),gC(r).subGraphTitleTopMargin),h=(a.attr("transform",`translate(${e.x-l.width/2}, ${e.y-e.height/2-e.padding/3+($o(r.flowchart.htmlLabels)?5:3)+c})`),i.node().getBBox());return e.height=h.height,e.intersect=function(t){return TS(e,t)},n},"roundedWithTitle"),R2t=Ae((t,e)=>{var r=(t=t.insert("g").attr("class",e.classes).attr("id",e.id)).insert("rect",":first-child"),n=0*e.padding,i=n/2,i=(r.attr("class","divider").attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2).attr("width",e.width+n).attr("height",e.height+n),r.node().getBBox());return e.width=i.width,e.height=i.height,e.diff=-e.padding/2,e.intersect=function(t){return TS(e,t)},t},"divider"),D2t={rect:N2t,roundedWithTitle:M2t,noteGroup:I2t,divider:R2t},O2t={},P2t=Ae((t,e)=>{R.trace("Inserting cluster");var r=e.shape||"rect";O2t[e.id]=D2t[r](t,e)},"insertCluster"),B2t=Ae(()=>{O2t={}},"clear")}),W2t=i(()=>{t(),F2t=Ae((t,e,r,n,i)=>{e.arrowTypeStart&&z2t(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&z2t(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),$2t={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},z2t=Ae((t,e,r,n,i,a)=>{var s=$2t[r];s?t.attr("marker-"+e,`url(${n}#${i}_${a}-${s}${"start"===e?"Start":"End"})`):R.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function Y2t(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}var H2t,V2t,X2t,K2t,Z2t,Q2t,J2t,tvt,evt,rvt,nvt,ivt=i(()=>{t(),sS(),eS(),i3(),wc(),rT(),al(),nA(),yC(),W2t(),H2t={},V2t={},X2t=Ae(()=>{H2t={},V2t={}},"clear"),K2t=Ae((t,e)=>{var r,n=D(),i=$o(n.flowchart.htmlLabels),n="markdown"===e.labelType?tS(t,e.label,{style:e.labelStyle,useHtmlLabels:i,addSvgBackground:!0},n):aS(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(n);let o=n.getBBox();i&&(i=n.children[0],r=O(n),o=i.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),H2t[e.id]=a,e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(i=aS(e.startLabelLeft,e.labelStyle),s=(r=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a=i.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),V2t[e.id]||(V2t[e.id]={}),V2t[e.id].startLeft=r,Y2t(l,e.startLabelLeft)),e.startLabelRight&&(i=aS(e.startLabelRight,e.labelStyle),a=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a.node().appendChild(i),r=i.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),V2t[e.id]||(V2t[e.id]={}),V2t[e.id].startRight=s,Y2t(l,e.startLabelRight)),e.endLabelLeft&&(i=aS(e.endLabelLeft,e.labelStyle),r=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(i),s=i.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(i),V2t[e.id]||(V2t[e.id]={}),V2t[e.id].endLeft=a,Y2t(l,e.endLabelLeft)),e.endLabelRight&&(r=aS(e.endLabelRight,e.labelStyle),i=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=i.node().appendChild(r),a=r.getBBox(),i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),V2t[e.id]||(V2t[e.id]={}),V2t[e.id].endRight=s,Y2t(l,e.endLabelRight)),n},"insertEdgeLabel"),Ae(Y2t,"setTerminalWidth"),Z2t=Ae((n,i)=>{R.debug("Moving label abc88 ",n.id,n.label,H2t[n.id],i);var a,s=i.updatedPath||i.originalPath,o=D(),o=gC(o).subGraphTitleTotalMargin;if(n.label){let t=H2t[n.id],e=n.x,r=n.y;s&&(a=Q8.calcLabelPosition(s),R.debug("Moving label "+n.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+o/2})`)}if(n.startLabelLeft){let t=V2t[n.id].startLeft,e=n.x,r=n.y;s&&(i=Q8.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.startLabelRight){let t=V2t[n.id].startRight,e=n.x,r=n.y;s&&(a=Q8.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelLeft){let t=V2t[n.id].endLeft,e=n.x,r=n.y;s&&(o=Q8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelRight){let t=V2t[n.id].endRight,e=n.x,r=n.y;s&&(i=Q8.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),Q2t=Ae((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n),n=t.width/2,t=t.height/2;return n<=r||t<=e},"outsideNode"),J2t=Ae((t,n,i)=>{R.debug(`intersection calc abc89: + outsidePoint: ${JSON.stringify(n)} + insidePoint : ${JSON.stringify(i)} + node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-i.x),s=t.width/2,o=i.xMath.abs(a-n.x)*l)return t=i.y{R.debug("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],s=!1;return t.forEach(t=>{if(Q2t(n,t)||s)a=t,s||i.push(t);else{let e=J2t(n,a,t),r=!1;i.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),i.some(t=>t.x===e.x&&t.y===e.y)||i.push(e),s=!0}}),i},"cutPathAtIntersect"),evt=Ae(function(t,e,r,n,i,a,s){let o=r.points,l=(R.debug("abc88 InsertEdge: edge=",r,"e=",e),!1),c=a.node(e.v),h=((a=a.node(e.w))?.intersect&&c?.intersect&&((o=o.slice(1,r.points.length-1)).unshift(c.intersect(o[0])),o.push(a.intersect(o[o.length-1]))),r.toCluster&&(R.debug("to cluster abc88",n[r.toCluster]),o=tvt(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(R.debug("from cluster abc88",n[r.fromCluster]),o=tvt(o.reverse(),n[r.fromCluster].node).reverse(),l=!0),o.filter(t=>!Number.isNaN(t.y))),u=vx,{x:d,y:p}=(!r.curve||"graph"!==i&&"flowchart"!==i||(u=r.curve),J9(r)),g=rx().x(d).y(p).curve(u),f;switch(r.thickness){case"normal":f="edge-thickness-normal";break;case"thick":case"invisible":f="edge-thickness-thick";break;default:f=""}switch(r.pattern){case"solid":f+=" edge-pattern-solid";break;case"dotted":f+=" edge-pattern-dotted";break;case"dashed":f+=" edge-pattern-dashed"}let m=t.append("path").attr("d",g(h)).attr("id",r.id).attr("class"," "+f+(r.classes?" "+r.classes:"")).attr("style",r.style),y="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(y=(y=(y=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),F2t(m,r,y,s,i),e={},l&&(e.updatedPath=o),e.originalPath=r.points,e},"insertEdge")}),avt=i(()=>{kG(),qG(),U2t(),RS(),j2t(),fC(),G2t(),ivt(),t(),yC(),wc(),rvt=Ae(async(t,i,a,s,o,l)=>{R.info("Graph in recursive render: XXX",TG(i),o);let c=i.graph().rankdir,r=(R.trace("Dir in recursive render - dir:",c),t=t.insert("g").attr("class","root"),i.nodes()?R.info("Recursive render XXX",i.nodes()):R.info("No nodes found for",i),0 "+t.w+": "+JSON.stringify(t)),R.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(i.edge(t))),R.info("Fix",m2t,"ids:",t.v,t.w,"Translating: ",m2t[t.v],m2t[t.w]),await K2t(h,e)}),i.edges().forEach(function(t){R.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))}),R.info("Graph before layout:",JSON.stringify(TG(i))),R.info("#############################################"),R.info("### Layout ###"),R.info("#############################################"),R.info(i),Xj(i),R.info("Graph after layout:",JSON.stringify(TG(i))),0),p=gC(l).subGraphTitleTotalMargin;return L2t(i).forEach(function(t){var e=i.node(t);R.info("Position "+t+": "+JSON.stringify(i.node(t))),R.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e?.clusterNode?(e.y+=p,dC(e)):0 "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),evt(n,t,e,m2t,a,i,s));Z2t(e,t)}),i.nodes().forEach(function(t){var e=i.node(t);R.info(t,e.type,e.diff),"group"===e.type&&(d=e.diff)}),{elem:t,diff:d}},"recursiveRender"),nvt=Ae(async(t,e,r,n,i)=>{f2t(t,r,n,i),uC(),X2t(),B2t(),x2t(),R.warn("Graph at first:",JSON.stringify(TG(e))),S2t(e),R.warn("Graph after:",JSON.stringify(TG(e))),r=D(),await rvt(t,e,n,i,void 0,r)},"render")});function svt(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}var ovt,lvt,cvt,hvt,uvt,dvt,pvt,gvt,fvt,mvt=i(()=>{i3(),cq(),t(),wc(),avt(),rT(),rT(),sl(),al(),ovt=Ae(t=>L.sanitizeText(t,D()),"sanitizeText"),lvt={dividerMargin:10,padding:5,textHeight:10,curve:void 0},cvt=Ae(function(t,r,n,i){R.info("keys:",[...t.keys()]),R.info(t),t.forEach(function(t){var e={shape:"rect",id:t.id,domId:t.domId,labelText:ovt(t.id),labelStyle:"",style:"fill: none; stroke: black",padding:D().flowchart?.padding??D().class?.padding};r.setNode(t.id,e),hvt(t.classes,r,n,i,t.id),R.info("setNode",e)})},"addNamespaces"),hvt=Ae(function(t,i,e,a,s){R.info("keys:",[...t.keys()]),R.info(t),[...t.values()].filter(t=>t.parent===s).forEach(function(t){var e=t.cssClasses.join(" "),r=w8(t.styles),n=t.label??t.id,n={labelStyle:r.labelStyle,shape:"class_box",labelText:ovt(n),classData:t,rx:0,ry:0,class:e,style:r.style,id:t.id,domId:t.domId,tooltip:a.db.getTooltip(t.id,s)||"",haveCallback:t.haveCallback,link:t.link,width:"group"===t.type?500:void 0,type:t.type,padding:D().flowchart?.padding??D().class?.padding};i.setNode(t.id,n),s&&i.setParent(t.id,s),R.info("setNode",n)})},"addClasses"),uvt=Ae(function(t,i,a,s){R.info(t),t.forEach(function(t,e){var r=t,n=r.text,n={labelStyle:"",shape:"note",labelText:ovt(n),noteData:r,rx:0,ry:0,class:"",style:"",id:r.id,domId:r.id,tooltip:"",type:"note",padding:D().flowchart?.padding??D().class?.padding};i.setNode(r.id,n),R.info("setNode",n),r.class&&s.has(r.class)&&(e={id:"edgeNote"+(t=a+e),classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:f8(lvt.curve,Z4)},i.setEdge(r.id,r.class,e,t))})},"addNotes"),dvt=Ae(function(t,n){let i=D().flowchart,a=0;t.forEach(function(t){a++;var e,r={classes:"relation",pattern:1==t.relation.lineType?"dashed":"solid",id:eT(t.id1,t.id2,{prefix:"id",counter:a}),arrowhead:"arrow_open"===t.type?"none":"normal",startLabelRight:"none"===t.relationTitle1?"":t.relationTitle1,endLabelLeft:"none"===t.relationTitle2?"":t.relationTitle2,arrowTypeStart:svt(t.relation.type1),arrowTypeEnd:svt(t.relation.type2),style:"fill:none",labelStyle:"",curve:f8(i?.curve,Z4)};R.info(r,t),void 0!==t.style&&(e=w8(t.style),r.style=e.style,r.labelStyle=e.labelStyle),t.text=t.title,void 0===t.text?void 0!==t.style&&(r.arrowheadStyle="fill: #333"):(r.arrowheadStyle="fill: #333",r.labelpos="c",D().flowchart?.htmlLabels??D().htmlLabels?(r.labelType="html",r.label=''+t.text+""):(r.labelType="text",r.label=t.text.replace(L.lineBreakRegex,` +`),void 0===t.style&&(r.style=r.style||"stroke: #333; stroke-width: 1.5px;fill:none"),r.labelStyle=r.labelStyle.replace("color:","fill:"))),n.setEdge(t.id1,t.id2,r,a)})},"addRelations"),pvt=Ae(function(t){lvt={...lvt,...t}},"setConf"),gvt=Ae(async function(t,e,r,n){R.info("Drawing class - ",e);var i=D().flowchart??D().class,a=D().securityLevel,s=(R.info("config:",i),i?.nodeSpacing??50),o=i?.rankSpacing??50,s=new oq({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:s,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=n.db.getNamespaces(),l=n.db.getClasses(),c=n.db.getRelations(),h=n.db.getNotes();R.info(c),cvt(o,s,e,n),hvt(l,s,e,n),dvt(c,s),uvt(h,s,c.length+1,l);let u;if("sandbox"===a&&(u=O("#i"+e)),h=(o=O("sandbox"===a?u.nodes()[0].contentDocument.body:"body")).select(`[id="${e}"]`),c=o.select("#"+e+" g"),await nvt(c,s,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),Q8.insertTitle(h,"classTitleText",i?.titleTopMargin??5,n.db.getDiagramTitle()),tl(s,h,i?.diagramPadding,i?.useMaxWidth),!i?.htmlLabels){var d,p="sandbox"===a?u.nodes()[0].contentDocument:document;for(d of p.querySelectorAll('[id="'+e+'"] .edgeLabel .label')){var g=d.getBBox(),f=p.createElementNS("http://www.w3.org/2000/svg","rect");f.setAttribute("rx",0),f.setAttribute("ry",0),f.setAttribute("width",g.width),f.setAttribute("height",g.height),d.insertBefore(f,d.firstChild)}}},"draw"),Ae(svt,"getArrowMarker"),fvt={setConf:pvt,draw:gvt}}),yvt={};A(yvt,{diagram:()=>vvt});var vvt,xvt,bvt,wvt,kvt,Tvt,_vt,Evt,Svt,Cvt,Avt,Lvt,Nvt,Ivt,Mvt,Rvt,Dvt,Ovt,Pvt,Bvt,Fvt,$vt,zvt,qvt,Uvt,jvt,Gvt,Wvt,Yvt,Hvt,Vvt,Xvt,Kvt,Zvt,Qvt,Jvt,t4t,e4t,r4t=i(()=>{Kyt(),Qyt(),Jyt(),mvt(),vvt={parser:jmt,db:Dyt,renderer:fvt,styles:Pyt,init:Ae(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Dyt.clear()},"init")}}),n4t=i(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,2],n=[1,3],i=[1,4],a=[2,4],s=[1,9],o=[1,11],l=[1,16],c=[1,17],h=[1,18],u=[1,19],d=[1,32],p=[1,20],g=[1,21],f=[1,22],m=[1,23],y=[1,24],v=[1,26],x=[1,27],b=[1,28],w=[1,29],k=[1,30],T=[1,31],_=[1,34],E=[1,35],S=[1,36],C=[1,37],A=[1,33],L=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],N=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],I=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"--\x3e":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,style:42,STYLE_IDS:43,STYLEDEF_STYLEOPTS:44,class:45,CLASSENTITY_IDS:46,STYLECLASS:47,direction_tb:48,direction_bt:49,direction_rl:50,direction_lr:51,eol:52,";":53,EDGE_STATE:54,STYLE_SEPARATOR:55,left_of:56,right_of:57,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"--\x3e",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"style",43:"STYLE_IDS",44:"STYLEDEF_STYLEOPTS",45:"class",46:"CLASSENTITY_IDS",47:"STYLECLASS",48:"direction_tb",49:"direction_bt",50:"direction_rl",51:"direction_lr",53:";",54:"EDGE_STATE",55:"STYLE_SEPARATOR",56:"left_of",57:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[52,1],[52,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.setRootDoc(a[o]),a[o];case 4:this.$=[];break;case 5:"nl"!=a[o]&&(a[o-1].push(a[o]),this.$=a[o-1]);break;case 6:case 7:this.$=a[o];break;case 8:this.$="nl";break;case 12:this.$=a[o];break;case 13:(c=a[o-1]).description=n.trimColon(a[o]),this.$=c;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:c=n.trimColon(a[o]),this.$={stmt:"relation",state1:a[o-3],state2:a[o-1],description:c};break;case 19:this.$={stmt:"state",id:a[o-3],type:"default",description:"",doc:a[o-1]};break;case 20:var l,c=a[o],h=a[o-2].trim();a[o].match(":")&&(c=(l=a[o].split(":"))[0],h=[h,l[1]]),this.$={stmt:"state",id:c,type:"default",description:h};break;case 21:this.$={stmt:"state",id:a[o-3],type:"default",description:a[o-5],doc:a[o-1]};break;case 22:this.$={stmt:"state",id:a[o],type:"fork"};break;case 23:this.$={stmt:"state",id:a[o],type:"join"};break;case 24:this.$={stmt:"state",id:a[o],type:"choice"};break;case 25:this.$={stmt:"state",id:n.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:a[o-1].trim(),note:{position:a[o-2].trim(),text:a[o].trim()}};break;case 29:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 32:case 33:this.$={stmt:"classDef",id:a[o-1].trim(),classes:a[o].trim()};break;case 34:this.$={stmt:"style",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 35:this.$={stmt:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 36:n.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 37:n.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 38:n.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 39:n.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 42:case 43:this.$={stmt:"state",id:a[o].trim(),type:"default",description:""};break;case 44:case 45:this.$={stmt:"state",id:a[o-2].trim(),classes:[a[o].trim()],type:"default",description:""}}},"anonymous"),table:[{3:1,4:r,5:n,6:i},{1:[3]},{3:5,4:r,5:n,6:i},{3:6,4:r,5:n,6:i},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,45,48,49,50,51,54],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:_,49:E,50:S,51:C,54:A},e(L,[2,5]),{9:38,10:12,11:13,12:14,13:15,16:l,17:c,19:h,22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:_,49:E,50:S,51:C,54:A},e(L,[2,7]),e(L,[2,8]),e(L,[2,9]),e(L,[2,10]),e(L,[2,11]),e(L,[2,12],{14:[1,39],15:[1,40]}),e(L,[2,16]),{18:[1,41]},e(L,[2,18],{20:[1,42]}),{23:[1,43]},e(L,[2,22]),e(L,[2,23]),e(L,[2,24]),e(L,[2,25]),{30:44,31:[1,45],56:[1,46],57:[1,47]},e(L,[2,28]),{34:[1,48]},{36:[1,49]},e(L,[2,31]),{39:[1,50],41:[1,51]},{43:[1,52]},{46:[1,53]},e(N,[2,42],{55:[1,54]}),e(N,[2,43],{55:[1,55]}),e(L,[2,36]),e(L,[2,37]),e(L,[2,38]),e(L,[2,39]),e(L,[2,6]),e(L,[2,13]),{13:56,24:d,54:A},e(L,[2,17]),e(I,a,{7:57}),{24:[1,58]},{24:[1,59]},{23:[1,60]},{24:[2,46]},{24:[2,47]},e(L,[2,29]),e(L,[2,30]),{40:[1,61]},{40:[1,62]},{44:[1,63]},{47:[1,64]},{24:[1,65]},{24:[1,66]},e(L,[2,14],{14:[1,67]}),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,68],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:_,49:E,50:S,51:C,54:A},e(L,[2,20],{20:[1,69]}),{31:[1,70]},{24:[1,71]},e(L,[2,32]),e(L,[2,33]),e(L,[2,34]),e(L,[2,35]),e(N,[2,44]),e(N,[2,45]),e(L,[2,15]),e(L,[2,19]),e(I,a,{7:72}),e(L,[2,26]),e(L,[2,27]),{4:s,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:l,17:c,19:h,21:[1,73],22:u,24:d,25:p,26:g,27:f,28:m,29:y,32:25,33:v,35:x,37:b,38:w,42:k,45:T,48:_,49:E,50:S,51:C,54:A},e(L,[2,21])],defaultActions:{5:[2,1],6:[2,2],46:[2,46],47:[2,47]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},struct:{rules:[9,10,22,26,29,35,42,43,44,45,54,55,56,57,71,72,73,74,75],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[31],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[30],inclusive:!1},CLASS_STYLE:{rules:[28],inclusive:!1},CLASS:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[25],inclusive:!1},CLASSDEF:{rules:[23,24],inclusive:!1},acc_descr_multiline:{rules:[20,21],inclusive:!1},acc_descr:{rules:[18],inclusive:!1},acc_title:{rules:[16],inclusive:!1},SCALE:{rules:[13,14,33,34],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[48],inclusive:!1},STATE_STRING:{rules:[49,50],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,36,37,38,39,40,41,46,47,51,52,53],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,10,11,12,15,17,19,22,26,29,32,35,53,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};r.lexer=n,Ae(t,"Parser"),(xvt=new((t.prototype=r).Parser=t)).parser=xvt,bvt=xvt}),i4t=i(()=>{wvt="LR",kvt="TB",_vt="relation",Evt="classDef",Svt="style",Cvt="applyClass",Avt="default",Nvt="fill:none",Ivt="fill: #333",Mvt="c",Rvt="text",Dvt="normal",Ovt="rect",Pvt="rectWithTitle",Bvt="stateStart",Fvt="stateEnd",$vt=Lvt="divider",zvt="roundedWithTitle",Uvt="noteGroup",Gvt=(jvt="statediagram")+"-state",Yvt=(Wvt="transition")+" note-edge",Hvt=jvt+"-note",Vvt=jvt+"-cluster",Xvt=jvt+"-cluster-alt",Qvt=Tvt="state",t4t=(Jvt="----")+(Zvt=qvt="note"),e4t=""+Jvt+(Kvt="parent")});function a4t(t="",e=0,r="",n=Jvt){return n=null!==r&&0"!==e.id&&""!==e.id&&(e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{r.get(t)&&(t=r.get(t),e.cssCompiledStyles=[...e.cssCompiledStyles,...t.styles])})),(n=t.find(t=>t.id===e.id))?Object.assign(n,e):t.push(e))}function o4t(t){return t?.classes?.join(" ")??""}function l4t(t){return t?.styles??[]}var c4t,h4t,u4t,d4t,p4t,g4t,f4t,m4t,y4t,v4t,x4t=i(()=>{wc(),t(),al(),i4t(),c4t=new Map,h4t=0,Ae(a4t,"stateDomId"),u4t=Ae((r,t,n,i,a,s,o,l)=>{R.trace("items",t),t.forEach(t=>{switch(t.stmt){case Tvt:case Avt:p4t(r,t,n,i,a,s,o,l);break;case _vt:p4t(r,t.state1,n,i,a,s,o,l),p4t(r,t.state2,n,i,a,s,o,l);var e={id:"edge"+h4t,start:t.state1.id,end:t.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:Nvt,labelStyle:"",label:L.sanitizeText(t.description,D()),arrowheadStyle:Ivt,labelpos:Mvt,labelType:Rvt,thickness:Dvt,classes:Wvt,look:o};a.push(e),h4t++}})},"setupDoc"),d4t=Ae((t,e=kvt)=>{let r=e;if(t.doc)for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),Ae(s4t,"insertOrUpdateNode"),Ae(o4t,"getClassesFromDbInfo"),Ae(l4t,"getStylesFromDbInfo"),p4t=Ae((r,n,t,i,a,e,s,o)=>{var l=n.id,c=t.get(l),h=o4t(c),u=l4t(c);if(R.info("dataFetcher parsedItem",n,c,u),"root"!==l){let t=Ovt;if(!0===n.start?t=Bvt:!1===n.start&&(t=Fvt),n.type!==Avt&&(t=n.type),c4t.get(l)||c4t.set(l,{id:l,shape:t,description:L.sanitizeText(l,D()),cssClasses:h+" "+Gvt,cssStyles:u}),c=c4t.get(l),n.description&&(Array.isArray(c.description)?(c.shape=Pvt,c.description.push(n.description)):0{c4t.clear(),h4t=0},"reset")}),b4t=i(()=>{wc(),t(),mC(),lW(),cW(),rT(),i4t(),f4t=Ae((t,e=kvt)=>{if(!t.doc)return e;let r=e;for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),m4t=Ae(function(t,e){return e.db.extract(e.db.getRootDocV2()),e.db.getClasses()},"getClasses"),y4t=Ae(async function(t,e,r,n){R.info("REF0:"),R.info("Drawing state diagram (v2)",e);var{securityLevel:i,state:a,layout:s}=D(),o=(n.db.extract(n.db.getRootDocV2()),n.db.getData()),i=pC(e,i);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=e,await VG(o,i),Q8.insertTitle(i,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),KG(i,8,jvt,a?.useMaxWidth??!0)},"draw"),v4t={getClasses:m4t,draw:y4t,getDir:f4t}});function w4t(){return new Map}function k4t(t=""){let e=t;return"[*]"===t&&(O4t++,e="start"+O4t),e}function T4t(t="",e=Avt){return"[*]"===t?"start":e}function _4t(t=""){let e=t;return"[*]"===t&&(O4t++,e="end"+O4t),e}function E4t(t="",e=Avt){return"[*]"===t?"end":e}function S4t(t,e,r){var n=k4t(t.id.trim()),i=T4t(t.id.trim(),t.type),a=k4t(e.id.trim()),s=T4t(e.id.trim(),e.type);W4t(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),W4t(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),D4t.relations.push({id1:n,id2:a,relationTitle:L.sanitizeText(r,D())})}var C4t,A4t,L4t,N4t,I4t,M4t,R4t,D4t,O4t,P4t,B4t,F4t,$4t,z4t,q4t,U4t,j4t,G4t,W4t,Y4t,H4t,V4t,X4t,K4t,Z4t,Q4t,J4t,txt,ext,rxt,nxt,ixt,axt,sxt,oxt,lxt,cxt,hxt,uxt,dxt,pxt,gxt,fxt,mxt,yxt,vxt,xxt,bxt,wxt,kxt,Txt,_xt,Ext,Sxt,Cxt,Axt,Lxt,Nxt,Ixt,Mxt,Rxt,Dxt,Oxt,Pxt,Bxt,Fxt,$xt=i(()=>{t(),rT(),al(),wc(),bc(),x4t(),b4t(),i4t(),Ae(w4t,"newClassesList"),C4t=[],A4t=[],L4t=wvt,N4t=[],I4t=w4t(),M4t=Ae(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),R4t={root:M4t()},D4t=R4t.root,B4t={LINE:P4t=O4t=0,DOTTED_LINE:1},F4t={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},$4t=Ae(t=>JSON.parse(JSON.stringify(t)),"clone"),z4t=Ae(t=>{R.info("Setting root doc",t),N4t=t},"setRootDoc"),q4t=Ae(()=>N4t,"getRootDoc"),U4t=Ae((n,i,t)=>{if(i.stmt===_vt)U4t(n,i.state1,!0),U4t(n,i.state2,!1);else if(i.stmt===Tvt&&("[*]"===i.id?(i.id=t?n.id+"_start":n.id+"_end",i.start=t):i.id=i.id.trim()),i.doc){let t=[],e=[],r;for(r=0;rU4t(i,t,!0))}},"docTranslator"),j4t=Ae(()=>(U4t({id:"root"},{id:"root",doc:N4t},!0),{id:"root",doc:N4t}),"getRootDocV2"),G4t=Ae(t=>{var e=t.doc||t,t=(R.info(e),Y4t(!0),R.info("Extract initial document:",e),e.forEach(e=>{switch(R.warn("Statement",e.stmt),e.stmt){case Tvt:W4t(e.id.trim(),e.type,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles);break;case _vt:Z4t(e.state1,e.state2,e.description);break;case Evt:ext(e.id.trim(),e.classes);break;case Svt:{let t=e.id.trim().split(","),r=e.styleClass.split(",");t.forEach(t=>{let e=H4t(t);void 0===e&&(t=t.trim(),W4t(t),e=H4t(t)),e.styles=r.map(t=>t.replace(/;/g,"")?.trim())})}break;case Cvt:nxt(e.id.trim(),e.styleClass)}}),V4t()),e=D().look;g4t(),p4t(void 0,j4t(),t,C4t,A4t,!0,e,I4t),C4t.forEach(t=>{if(Array.isArray(t.label)){if(t.description=t.label.slice(1),t.isGroup&&0Q4t(l,t.trim())),i&&((t=D4t.states.get(l)).note=i,t.note.text=L.sanitizeText(t.note.text,D())),a&&(R.info("Setting state classes",l,a),("string"==typeof a?[a]:a).forEach(t=>nxt(l,t.trim()))),s&&(R.info("Setting state styles",l,s),("string"==typeof s?[s]:s).forEach(t=>ixt(l,t.trim()))),o&&(R.info("Setting state styles",l,s),("string"==typeof o?[o]:o).forEach(t=>axt(l,t.trim())))},"addState"),Y4t=Ae(function(t){C4t=[],A4t=[],R4t={root:M4t()},D4t=R4t.root,O4t=0,I4t=w4t(),t||pl()},"clear"),H4t=Ae(function(t){return D4t.states.get(t)},"getState"),V4t=Ae(function(){return D4t.states},"getStates"),X4t=Ae(function(){R.info("Documents = ",R4t)},"logDocuments"),K4t=Ae(function(){return D4t.relations},"getRelations"),Ae(k4t,"startIdIfNeeded"),Ae(T4t,"startTypeIfNeeded"),Ae(_4t,"endIdIfNeeded"),Ae(E4t,"endTypeIfNeeded"),Ae(S4t,"addRelationObjs"),Z4t=Ae(function(t,e,r){var n,i;"object"==typeof t?S4t(t,e,r):(n=k4t(t.trim()),t=T4t(t),i=_4t(e.trim()),e=E4t(e),W4t(n,t),W4t(i,e),D4t.relations.push({id1:n,id2:i,title:L.sanitizeText(r,D())}))},"addRelation"),Q4t=Ae(function(t,e){t=D4t.states.get(t),e=e.startsWith(":")?e.replace(":","").trim():e,t.descriptions.push(L.sanitizeText(e,D()))},"addDescription"),J4t=Ae(function(t){return(":"===t.substring(0,1)?t.substr(2):t).trim()},"cleanupLabel"),txt=Ae(()=>"divider-id-"+ ++P4t,"getDividerId"),ext=Ae(function(t,e=""){I4t.has(t)||I4t.set(t,{id:t,styles:[],textStyles:[]});let r=I4t.get(t);e?.split(",").forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(t)&&(t=e.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(t)),r.styles.push(e)})},"addStyleClass"),rxt=Ae(function(){return I4t},"getClasses"),nxt=Ae(function(t,r){t.split(",").forEach(function(t){let e=H4t(t);void 0===e&&(t=t.trim(),W4t(t),e=H4t(t)),e.classes.push(r)})},"setCssClass"),ixt=Ae(function(t,e){void 0!==(t=H4t(t))&&t.styles.push(e)},"setStyle"),axt=Ae(function(t,e){void 0!==(t=H4t(t))&&t.textStyles.push(e)},"setTextStyle"),sxt=Ae(()=>L4t,"getDirection"),oxt=Ae(t=>{L4t=t},"setDirection"),lxt=Ae(t=>(t&&":"===t[0]?t.substr(1):t).trim(),"trimColon"),cxt=Ae(()=>{var t=D();return{nodes:C4t,edges:A4t,other:{},config:t,direction:f4t(j4t())}},"getData"),hxt={getConfig:Ae(()=>D().state,"getConfig"),getData:cxt,addState:W4t,clear:Y4t,getState:H4t,getStates:V4t,getRelations:K4t,getClasses:rxt,getDirection:sxt,addRelation:Z4t,getDividerId:txt,setDirection:oxt,cleanupLabel:J4t,lineType:B4t,relationType:F4t,logDocuments:X4t,getRootDoc:q4t,setRootDoc:z4t,getRootDocV2:j4t,extract:G4t,trimColon:lxt,getAccTitle:fl,setAccTitle:gl,getAccDescription:yl,setAccDescription:ml,addStyleClass:ext,setCssClass:nxt,addDescription:Q4t,setDiagramTitle:vl,getDiagramTitle:xl}}),zxt=i(()=>{uxt=Ae(t=>` +defs #statediagram-barbEnd { + fill: ${t.transitionColor}; + stroke: ${t.transitionColor}; + } +g.stateGroup text { + fill: ${t.nodeBorder}; + stroke: none; + font-size: 10px; +} +g.stateGroup text { + fill: ${t.textColor}; + stroke: none; + font-size: 10px; + +} +g.stateGroup .state-title { + font-weight: bolder; + fill: ${t.stateLabelColor}; +} + +g.stateGroup rect { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; +} + +g.stateGroup line { + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.transition { + stroke: ${t.transitionColor}; + stroke-width: 1; + fill: none; +} + +.stateGroup .composit { + fill: ${t.background}; + border-bottom: 1px +} + +.stateGroup .alt-composit { + fill: #e0e0e0; + border-bottom: 1px +} + +.state-note { + stroke: ${t.noteBorderColor}; + fill: ${t.noteBkgColor}; + + text { + fill: ${t.noteTextColor}; + stroke: none; + font-size: 10px; + } +} + +.stateLabel .box { + stroke: none; + stroke-width: 0; + fill: ${t.mainBkg}; + opacity: 0.5; +} + +.edgeLabel .label rect { + fill: ${t.labelBackgroundColor}; + opacity: 0.5; +} +.edgeLabel { + background-color: ${t.edgeLabelBackground}; + p { + background-color: ${t.edgeLabelBackground}; + } + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; +} +.edgeLabel .label text { + fill: ${t.transitionLabelColor||t.tertiaryTextColor}; +} +.label div .edgeLabel { + color: ${t.transitionLabelColor||t.tertiaryTextColor}; +} + +.stateLabel text { + fill: ${t.stateLabelColor}; + font-size: 10px; + font-weight: bold; +} + +.node circle.state-start { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node .fork-join { + fill: ${t.specialStateColor}; + stroke: ${t.specialStateColor}; +} + +.node circle.state-end { + fill: ${t.innerEndBackground}; + stroke: ${t.background}; + stroke-width: 1.5 +} +.end-state-inner { + fill: ${t.compositeBackground||t.background}; + // stroke: ${t.background}; + stroke-width: 1.5 +} + +.node rect { + fill: ${t.stateBkg||t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: 1px; +} +.node polygon { + fill: ${t.mainBkg}; + stroke: ${t.stateBorder||t.nodeBorder};; + stroke-width: 1px; +} +#statediagram-barbEnd { + fill: ${t.lineColor}; +} + +.statediagram-cluster rect { + fill: ${t.compositeTitleBackground}; + stroke: ${t.stateBorder||t.nodeBorder}; + stroke-width: 1px; +} + +.cluster-label, .nodeLabel { + color: ${t.stateLabelColor}; + // line-height: 1; +} + +.statediagram-cluster rect.outer { + rx: 5px; + ry: 5px; +} +.statediagram-state .divider { + stroke: ${t.stateBorder||t.nodeBorder}; +} + +.statediagram-state .title-state { + rx: 5px; + ry: 5px; +} +.statediagram-cluster.statediagram-cluster .inner { + fill: ${t.compositeBackground||t.background}; +} +.statediagram-cluster.statediagram-cluster-alt .inner { + fill: ${t.altBackground||"#efefef"}; +} + +.statediagram-cluster .inner { + rx:0; + ry:0; +} + +.statediagram-state rect.basic { + rx: 5px; + ry: 5px; +} +.statediagram-state rect.divider { + stroke-dasharray: 10,10; + fill: ${t.altBackground||"#efefef"}; +} + +.note-edge { + stroke-dasharray: 5; +} + +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} +.statediagram-note rect { + fill: ${t.noteBkgColor}; + stroke: ${t.noteBorderColor}; + stroke-width: 1px; + rx: 0; + ry: 0; +} + +.statediagram-note text { + fill: ${t.noteTextColor}; +} + +.statediagram-note .nodeLabel { + color: ${t.noteTextColor}; +} +.statediagram .edgeLabel { + color: red; // ${t.noteTextColor}; +} + +#dependencyStart, #dependencyEnd { + fill: ${t.lineColor}; + stroke: ${t.lineColor}; + stroke-width: 1; +} + +.statediagramTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; +} +`,"getStyles"),dxt=uxt}),qxt=i(()=>{pxt={},gxt=Ae((t,e)=>{pxt[t]=e},"set"),fxt=Ae(t=>pxt[t],"get"),mxt=Ae(()=>Object.keys(pxt),"keys"),yxt=Ae(()=>mxt().length,"size"),vxt={get:fxt,set:gxt,keys:mxt,size:yxt}}),Uxt=i(()=>{i3(),qxt(),$xt(),rT(),al(),wc(),t(),xxt=Ae(t=>t.append("circle").attr("class","start-state").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit).attr("cy",D().state.padding+D().state.sizeUnit),"drawStartState"),bxt=Ae(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",D().state.textHeight).attr("class","divider").attr("x2",2*D().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),wxt=Ae((t,e)=>{var r=(e=t.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+2*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id)).node().getBBox();return t.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",r.width+2*D().state.padding).attr("height",r.height+2*D().state.padding).attr("rx",D().state.radius),e},"drawSimpleState"),kxt=Ae((t,e)=>{let r=Ae(function(t,e,r){t=t.append("tspan").attr("x",2*D().state.padding).text(e),r||t.attr("dy",D().state.textHeight)},"addTspan"),n=t.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+1.3*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=n.height,a=t.append("text").attr("x",D().state.padding).attr("y",i+.4*D().state.padding+D().state.dividerMargin+D().state.textHeight).attr("class","state-description"),s=!0,o=!0;e.descriptions.forEach(function(t){s||(r(a,t,o),o=!1),s=!1});var e=t.append("line").attr("x1",D().state.padding).attr("y1",D().state.padding+i+D().state.dividerMargin/2).attr("y2",D().state.padding+i+D().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,n.width);return e.attr("x2",c+3*D().state.padding),t.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",c+2*D().state.padding).attr("height",l.height+i+2*D().state.padding).attr("rx",D().state.radius),t},"drawDescrState"),Txt=Ae((t,e,r)=>{let n=D().state.padding,i=2*D().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",D().state.titleShift).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id),c=l.node().getBBox().width+i,h=Math.max(c,s);h===s&&(h+=i);let u,d=t.node().getBBox();return e.doc,u=o-n,s(t.append("circle").attr("class","end-state-outer").attr("r",D().state.sizeUnit+D().state.miniPadding).attr("cx",D().state.padding+D().state.sizeUnit+D().state.miniPadding).attr("cy",D().state.padding+D().state.sizeUnit+D().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit+2).attr("cy",D().state.padding+D().state.sizeUnit+2)),"drawEndState"),Ext=Ae((t,e)=>{let r=D().state.forkWidth,n=D().state.forkHeight;return e.parentId&&(e=r,r=n,n=e),t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",D().state.padding).attr("y",D().state.padding)},"drawForkJoinState"),Sxt=Ae((t,e,r,n)=>{let i=0,a=n.append("text"),s=(a.style("text-anchor","start"),a.attr("class","noteText"),t.replace(/\r\n/g,"
")),o=(s=s.replace(/\n/g,"
")).split(L.lineBreakRegex),l=1.25*D().state.noteMargin;for(var c of o){var h;0<(c=c.trim()).length&&((h=a.append("tspan")).text(c),0===l&&(c=h.node().getBBox(),l+=c.height),i+=l,h.attr("x",e+D().state.noteMargin),h.attr("y",r+i+1.25*D().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),Cxt=Ae((t,e)=>{e.attr("class","state-note");var r=e.append("rect").attr("x",0).attr("y",D().state.padding),e=e.append("g"),{textWidth:t,textHeight:e}=Sxt(t,0,0,e);return r.attr("height",e+2*D().state.noteMargin),r.attr("width",t+2*D().state.noteMargin),r},"drawNote"),Axt=Ae(function(t,e){var r=e.id,n={id:r,label:e.id,width:0,height:0},t=t.append("g").attr("id",r).attr("class","stateGroup"),e=("start"===e.type&&xxt(t),"end"===e.type&&_xt(t),"fork"!==e.type&&"join"!==e.type||Ext(t,e),"note"===e.type&&Cxt(e.note.text,t),"divider"===e.type&&bxt(t),"default"===e.type&&0===e.descriptions.length&&wxt(t,e),"default"===e.type&&0!Number.isNaN(t.y));let t=h.points,e=rx().x(function(t){return t.x}).y(function(t){return t.y}).curve(vx),r=c.append("path").attr("d",e(t)).attr("id","edge"+Lxt).attr("class","transition"),n="";if(D().state.arrowMarkerAbsolute&&(n=(n=(n=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),r.attr("marker-end","url("+n+"#"+d(hxt.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let e=c.append("g").attr("class","stateLabel"),{x:r,y:n}=Q8.calcLabelPosition(h.points),i=L.getRows(u.title),a=0,s=[],o=0,l=0;for(let t=0;t<=i.length;t++){var p=e.append("text").attr("text-anchor","middle").text(i[t]).attr("x",r).attr("y",n+a),g=p.node().getBBox();o=Math.max(o,g.width),l=Math.min(l,g.x),R.info(g.x,r,n+a),0===a&&(a=p.node().getBBox().height,R.info("Title height",a,n)),s.push(p)}let t=a*i.length;if(1t.attr("y",n+e*a-r)),t=a*i.length}d=e.node().getBBox(),e.insert("rect",":first-child").attr("class","box").attr("x",r-o/2-D().state.padding/2).attr("y",n-t/2-D().state.padding/2-3.5).attr("width",o+D().state.padding).attr("height",t+D().state.padding),R.info(d)}Lxt++},"drawEdge")}),jxt=i(()=>{i3(),kG(),cq(),t(),al(),Uxt(),wc(),sl(),Mxt={},Rxt=Ae(function(){},"setConf"),Dxt=Ae(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),Oxt=Ae(function(t,e,r,n){Ixt=D().state;let i=D().securityLevel,a;"sandbox"===i&&(a=O("#i"+e));var s=O("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===i?a.nodes()[0].contentDocument:document,t=(R.debug("Rendering diagram "+t),s.select(`[id='${e}']`)),e=(Dxt(t),n.db.getRootDoc()),e=(Bxt(e,t,void 0,!1,s,o,n),Ixt.padding),o=(s=t.node().getBBox()).width+2*e,n=s.height+2*e;Jo(t,n,1.75*o,Ixt.useMaxWidth),t.attr("viewBox",`${s.x-Ixt.padding} ${s.y-Ixt.padding} `+o+" "+n)},"draw"),Pxt=Ae(t=>t?t.length*Ixt.fontSizeFactor:1,"getLabelWidth"),Bxt=Ae((t,e,r,n,i,a,s)=>{let o=new oq({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l{let e=t.parentElement,r=0,n=0;e&&(e.parentElement&&(r=e.parentElement.getBBox().width),n=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(n))&&(n=0),t.setAttribute("x1",0-n+8),t.setAttribute("x2",r-n-8)})):R.debug("No Node "+t+": "+JSON.stringify(o.node(t)))}),y.getBBox(),o.edges().forEach(function(t){void 0!==t&&void 0!==o.edge(t)&&(R.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),Nxt(e,o.edge(t),o.edge(t).relation))});var d=y.getBBox(),v={id:r||"root",label:r||"root",width:0,height:0};return v.width=d.width+2*Ixt.padding,v.height=d.height+2*Ixt.padding,R.debug("Doc rendered",v,o),v},"renderDoc"),Fxt={setConf:Rxt,draw:Oxt}}),Gxt={};A(Gxt,{diagram:()=>Wxt});var Wxt,Yxt=i(()=>{n4t(),$xt(),zxt(),jxt(),Wxt={parser:bvt,db:hxt,renderer:Fxt,styles:dxt,init:Ae(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,hxt.clear()},"init")}}),Hxt={};A(Hxt,{diagram:()=>Vxt});var Vxt,Xxt,Kxt,Zxt,Qxt,Jxt,tbt,ebt,rbt,nbt,ibt,abt,sbt,obt,lbt,cbt,hbt,ubt,dbt,pbt,gbt,fbt,mbt,ybt,vbt,xbt,bbt,wbt,kbt,Tbt,_bt,Ebt=i(()=>{n4t(),$xt(),zxt(),b4t(),Vxt={parser:bvt,db:hxt,renderer:v4t,styles:dxt,init:Ae(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,hxt.clear()},"init")}}),Sbt=i(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,14],n={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:n.addTask(a[o-1],a[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:a,16:s,17:o,18:l},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:15,11:n,12:i,14:a,16:s,17:o,18:l},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,16]},{15:[1,17]},e(r,[2,11]),e(r,[2,12]),{19:[1,18]},e(r,[2,4]),e(r,[2,9]),e(r,[2,10]),e(r,[2,13])],defaultActions:{},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0{wc(),bc(),Zxt="",Qxt=[],Jxt=[],tbt=[],ebt=Ae(function(){Qxt.length=0,Jxt.length=0,Zxt="",tbt.length=0,pl()},"clear"),rbt=Ae(function(t){Zxt=t,Qxt.push(t)},"addSection"),nbt=Ae(function(){return Qxt},"getSections"),ibt=Ae(function(){let t=lbt(),e=0;for(;!t&&e<100;)t=lbt(),e++;return Jxt.push(...tbt),Jxt},"getTasks"),abt=Ae(function(){let e=[];return Jxt.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},"updateActors"),sbt=Ae(function(t,e){let r=e.substr(1).split(":"),n=0;e=(1===r.length?(n=Number(r[0]),[]):(n=Number(r[0]),r[1].split(","))).map(t=>t.trim()),e={section:Zxt,type:Zxt,people:e,task:t,score:n},tbt.push(e)},"addTask"),obt=Ae(function(t){t={section:Zxt,type:Zxt,description:t,task:t,classes:[]},Jxt.push(t)},"addTaskOrg"),lbt=Ae(function(){let t=Ae(function(t){return tbt[t].processed},"compileTask"),e=!0;for(var[r,n]of tbt.entries())t(r),e=e&&n.processed;return e},"compileTasks"),cbt=Ae(function(){return abt()},"getActors"),hbt={getConfig:Ae(()=>D().journey,"getConfig"),clear:ebt,setDiagramTitle:vl,getDiagramTitle:xl,setAccTitle:gl,getAccTitle:fl,setAccDescription:ml,getAccDescription:yl,addSection:rbt,getSections:nbt,getTasks:ibt,addTask:sbt,addTaskOrg:obt,getActors:cbt}}),Abt=i(()=>{ubt=Ae(t=>`.label { + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + color: ${t.textColor}; + } + .mouth { + stroke: #666; + } + + line { + stroke: ${t.textColor} + } + + .legend { + fill: ${t.textColor}; + } + + .label text { + fill: #333; + } + .label { + color: ${t.textColor} + } + + .face { + ${t.faceColor?"fill: "+t.faceColor:"fill: #FFF8DC"}; + stroke: #999; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 1.5px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + } + text-align: center; + } + + .cluster rect { + } + + .cluster text { + fill: ${t.titleColor}; + } + + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: 'trebuchet ms', verdana, arial, sans-serif; + font-family: var(--mermaid-font-family); + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .task-type-0, .section-type-0 { + ${t.fillType0?"fill: "+t.fillType0:""}; + } + .task-type-1, .section-type-1 { + ${t.fillType0?"fill: "+t.fillType1:""}; + } + .task-type-2, .section-type-2 { + ${t.fillType0?"fill: "+t.fillType2:""}; + } + .task-type-3, .section-type-3 { + ${t.fillType0?"fill: "+t.fillType3:""}; + } + .task-type-4, .section-type-4 { + ${t.fillType0?"fill: "+t.fillType4:""}; + } + .task-type-5, .section-type-5 { + ${t.fillType0?"fill: "+t.fillType5:""}; + } + .task-type-6, .section-type-6 { + ${t.fillType0?"fill: "+t.fillType6:""}; + } + .task-type-7, .section-type-7 { + ${t.fillType0?"fill: "+t.fillType7:""}; + } + + .actor-0 { + ${t.actor0?"fill: "+t.actor0:""}; + } + .actor-1 { + ${t.actor1?"fill: "+t.actor1:""}; + } + .actor-2 { + ${t.actor2?"fill: "+t.actor2:""}; + } + .actor-3 { + ${t.actor3?"fill: "+t.actor3:""}; + } + .actor-4 { + ${t.actor4?"fill: "+t.actor4:""}; + } + .actor-5 { + ${t.actor5?"fill: "+t.actor5:""}; + } +`,"getStyles"),dbt=ubt}),Lbt=i(()=>{function e(t,e,r,n,i,a,s,o){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(//gi);for(let t=0;t{var e=r.actors[t].color,e={cx:a,cy:r.y,r:7,fill:e,stroke:"#000",title:t,pos:r.actors[t].position};fbt(i,e),a+=10}),kbt(e)(r.task,i,t.x,t.y,t.width,t.height,{class:"task"},e,r.colour)},"drawTask"),wbt=Ae(function(t,e){Eb(t,e)},"drawBackgroundRect"),Ae(e,"byText"),Ae(c,"byTspan"),Ae(r,"byFo"),Ae(g,"_setTextAttrs"),kbt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},Tbt=Ae(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),_bt={drawRect:pbt,drawCircle:fbt,drawSection:vbt,drawText:mbt,drawLabel:ybt,drawTask:bbt,drawBackgroundRect:wbt,initGraphics:Tbt}});function Nbt(r){let n=D().journey,i=60;Object.keys(Mbt).forEach(t=>{var e=Mbt[t].color,e={cx:20,cy:i,r:7,fill:e,stroke:"#000",pos:Mbt[t].position},e=(_bt.drawCircle(r,e),{x:40,y:i+7,fill:"#666",text:t,textMargin:5|n.boxTextMargin});_bt.drawText(r,e),i+=20})}var Ibt,Mbt,Rbt,Dbt,Obt,Pbt,Bbt,Fbt,$bt,zbt,qbt=i(()=>{i3(),Lbt(),wc(),sl(),Ibt=Ae(function(e){Object.keys(e).forEach(function(t){Rbt[t]=e[t]})},"setConf"),Mbt={},Ae(Nbt,"drawActorLegend"),Rbt=D().journey,Dbt=Rbt.leftMargin,Obt=Ae(function(t,e,r,n){let i=D().journey,a=D().securityLevel,s;"sandbox"===a&&(s=O("#i"+e));var o,l=O("sandbox"===a?s.nodes()[0].contentDocument.body:"body"),l=(Pbt.init(),l.select("#"+e)),e=(_bt.initGraphics(l),n.db.getTasks()),c=n.db.getDiagramTitle(),n=n.db.getActors();for(o in Mbt)delete Mbt[o];let h=0;n.forEach(t=>{Mbt[t]={color:i.actorColours[h%i.actorColours.length],position:h},h++}),Nbt(l),Pbt.insert(0,0,Dbt,50*Object.keys(Mbt).length),$bt(l,e,0);var n=Pbt.getBounds(),e=(c&&l.append("text").text(c).attr("x",Dbt).attr("font-size","4ex").attr("font-weight","bold").attr("y",25),n.stopy-n.starty+2*i.diagramMarginY),u=Dbt+n.stopx+2*i.diagramMarginX,c=(Jo(l,e,u,i.useMaxWidth),l.append("line").attr("x1",Dbt).attr("y1",4*i.height).attr("x2",u-Dbt-4).attr("y2",4*i.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),c?70:0);l.attr("viewBox",n.startx+` -25 ${u} `+(e+c)),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",e+c+25)},"draw"),Pbt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:Ae(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:Ae(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:Ae(function(n,i,a,s){let o=D().journey,l=this,c=0;function t(r){return Ae(function(t){c++;var e=l.sequenceItems.length-c+1;l.updateVal(t,"starty",i-e*o.boxMargin,Math.min),l.updateVal(t,"stopy",s+e*o.boxMargin,Math.max),l.updateVal(Pbt.data,"startx",n-e*o.boxMargin,Math.min),l.updateVal(Pbt.data,"stopx",a+e*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(t,"startx",n-e*o.boxMargin,Math.min),l.updateVal(t,"stopx",a+e*o.boxMargin,Math.max),l.updateVal(Pbt.data,"starty",i-e*o.boxMargin,Math.min),l.updateVal(Pbt.data,"stopy",s+e*o.boxMargin,Math.max))},"updateItemBounds")}Ae(t,"updateFn"),this.sequenceItems.forEach(t())},"updateBounds"),insert:Ae(function(t,e,r,n){var i=Math.min(t,r),t=Math.max(t,r),r=Math.min(e,n),e=Math.max(e,n);this.updateVal(Pbt.data,"startx",i,Math.min),this.updateVal(Pbt.data,"starty",r,Math.min),this.updateVal(Pbt.data,"stopx",t,Math.max),this.updateVal(Pbt.data,"stopy",e,Math.max),this.updateBounds(i,r,t,e)},"insert"),bumpVerticalPos:Ae(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:Ae(function(){return this.verticalPos},"getVerticalPos"),getBounds:Ae(function(){return this.data},"getBounds")},Bbt=Rbt.sectionFills,Fbt=Rbt.sectionColours,$bt=Ae(function(t,n,e){let i=D().journey,a="",r=2*i.height+i.diagramMarginY,s=e+r,o=0,l="#CCC",c="black",h=0;for(var[u,d]of n.entries()){if(a!==d.section){l=Bbt[o%Bbt.length],h=o%Bbt.length,c=Fbt[o%Fbt.length];let e=0,r=d.section;for(let t=u;t(Mbt[e]&&(t[e]=Mbt[e]),t),{}),d.x=u*i.taskMargin+u*i.width+Dbt,d.y=s,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,_bt.drawTask(t,d,i),Pbt.insert(d.x,d.y,d.x+d.width+i.taskMargin,450)}},"drawTasks"),zbt={setConf:Ibt,draw:Obt}}),Ubt={};A(Ubt,{diagram:()=>jbt});var jbt,Gbt,Wbt,Ybt=i(()=>{Sbt(),Cbt(),Abt(),qbt(),jbt={parser:Kxt,db:hbt,renderer:zbt,styles:dbt,init:Ae(t=>{zbt.setConf(t.journey),hbt.clear()},"init")}}),Hbt=i(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,11,12,14,16,17,20,21],n=[1,9],i=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17],n={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 1:return a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:n.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.getCommonDb().setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:n.addTask(a[o],0,""),this.$=a[o];break;case 16:n.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:18,11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,19]},{15:[1,20]},e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),e(r,[2,4]),e(r,[2,9]),e(r,[2,10])],defaultActions:{},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0s3t,addSection:()=>r3t,addTask:()=>a3t,addTaskOrg:()=>o3t,clear:()=>e3t,default:()=>c3t,getCommonDb:()=>t3t,getSections:()=>n3t,getTasks:()=>i3t});var Xbt,Kbt,Zbt,Qbt,Jbt,t3t,e3t,r3t,n3t,i3t,a3t,s3t,o3t,l3t,c3t,h3t=i(()=>{bc(),Xbt="",Kbt=0,Zbt=[],Qbt=[],Jbt=[],t3t=Ae(()=>ll,"getCommonDb"),e3t=Ae(function(){Zbt.length=0,Qbt.length=0,Xbt="",Jbt.length=0,pl()},"clear"),r3t=Ae(function(t){Xbt=t,Zbt.push(t)},"addSection"),n3t=Ae(function(){return Zbt},"getSections"),i3t=Ae(function(){let t=l3t(),e=0;for(;!t&&e<100;)t=l3t(),e++;return Qbt.push(...Jbt),Qbt},"getTasks"),a3t=Ae(function(t,e,r){t={id:Kbt++,section:Xbt,type:Xbt,task:t,score:e||0,events:r?[r]:[]},Jbt.push(t)},"addTask"),s3t=Ae(function(t){Jbt.find(t=>t.id===Kbt-1).events.push(t)},"addEvent"),o3t=Ae(function(t){t={section:Xbt,type:Xbt,description:t,task:t,classes:[]},Qbt.push(t)},"addTaskOrg"),l3t=Ae(function(){let t=Ae(function(t){return Jbt[t].processed},"compileTask"),e=!0;for(var[r,n]of Jbt.entries())t(r),e=e&&n.processed;return e},"compileTasks"),c3t={clear:e3t,getCommonDb:t3t,addSection:r3t,getSections:n3t,getTasks:i3t,addTask:a3t,addTaskOrg:o3t,addEvent:s3t}});function u3t(t,o){t.each(function(){var e,r=O(this),n=r.text().split(/(\s+|
)/).reverse(),i=[],a=r.attr("y"),t=parseFloat(r.attr("dy")),s=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",t+"em");for(let t=0;to||"
"===e)&&(i.pop(),s.text(i.join(" ").trim()),i="
"===e?[""]:[e],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(e))})}var d3t,p3t,g3t,f3t,m3t,y3t,v3t,x3t,b3t,w3t,k3t,T3t,_3t,E3t,S3t,C3t,A3t,L3t,N3t,I3t,M3t,R3t,D3t,O3t,P3t=i(()=>{function e(t,e,r,n,i,a,s,o){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(//gi);for(let t=0;t/gi," "),n=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),void 0!==e.class&&t.attr("class",e.class),t.append("tspan"));return n.attr("x",e.x+2*e.textMargin),n.text(r),t},"drawText"),m3t=Ae(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}Ae(r,"genPoints");var n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,f3t(t,e)},"drawLabel"),y3t=Ae(function(t,e,r){var t=t.append("g"),n=k3t();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,d3t(t,n),T3t(r)(e.text,t,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),v3t=-1,x3t=Ae(function(t,e,r){var n=e.x+r.width/2,t=t.append("g");v3t++,t.append("line").attr("id","task"+v3t).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),p3t(t,{cx:n,cy:300+30*(5-e.score),score:e.score}),(n=k3t()).x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="task task-type-"+e.num,n.rx=3,n.ry=3,d3t(t,n),T3t(r)(e.task,t,n.x,n.y,n.width,n.height,{class:"task"},r,e.colour)},"drawTask"),b3t=Ae(function(t,e){d3t(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),w3t=Ae(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),k3t=Ae(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),Ae(e,"byText"),Ae(c,"byTspan"),Ae(r,"byFo"),Ae(g,"_setTextAttrs"),T3t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},_3t=Ae(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),Ae(u3t,"wrap"),E3t=Ae(function(t,e,r,n){var r=r%12-1,t=t.append("g"),i=(e.section=r,t.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+r),t.append("g")),a=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(u3t,e.width).node().getBBox(),s=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return e.height=a.height+1.1*s*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,t.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),C3t(i,e,r,n),e},"drawNode"),S3t=Ae(function(t,e,r){var n=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(u3t,e.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return t.remove(),n.height+1.1*r*.5+e.padding},"getVirtualNodeHeight"),C3t=Ae(function(t,e,r){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),A3t={drawRect:d3t,drawCircle:g3t,drawSection:y3t,drawText:f3t,drawLabel:m3t,drawTask:x3t,drawBackgroundRect:b3t,getTextObj:w3t,getNoteRect:k3t,initGraphics:_3t,drawNode:E3t,getVirtualNodeHeight:S3t}}),B3t=i(()=>{i3(),P3t(),t(),wc(),sl(),L3t=Ae(function(t,e,r,n){let i=D(),a=i.leftMargin??50,s=(R.debug("timeline",n.db),i.securityLevel),o,l=("sandbox"===s&&(o=O("#i"+e)),O("sandbox"===s?o.nodes()[0].contentDocument.body:"body").select("#"+e)),c=(l.append("g"),n.db.getTasks()),h=n.db.getCommonDb().getDiagramTitle();R.debug("task",c),A3t.initGraphics(l);var u,d,e=n.db.getSections();R.debug("sections",e);let p=0,g=0,f,m=50+a,y=50,v=0,x=!0,b=(e.forEach(function(t){t={number:v,descr:t,section:v,width:150,padding:20,maxHeight:p},t=A3t.getVirtualNodeHeight(l,t,i),R.debug("sectionHeight before draw",t),p=Math.max(p,t+20)}),0),w=0;R.debug("tasks.length",c.length);for([u,d]of c.entries()){var k,T={number:u,descr:d,section:d.section,width:150,padding:20,maxHeight:g},T=A3t.getVirtualNodeHeight(l,T,i);R.debug("taskHeight before draw",T),g=Math.max(g,T+20),b=Math.max(b,d.events.length);let t=0;for(k of d.events){var _={descr:k,section:d.section,number:d.section,width:150,padding:20,maxHeight:50};t+=A3t.getVirtualNodeHeight(l,_,i)}w=Math.max(w,t)}R.debug("maxSectionHeight before draw",p),R.debug("maxTaskHeight before draw",g),e&&0{var t=c.filter(t=>t.section===e),r={number:v,descr:e,section:v,width:200*Math.max(t.length,1)-50,padding:20,maxHeight:p},n=(R.debug("sectionNode",r),l.append("g")),r=A3t.drawNode(n,r,v,i);R.debug("sectionNode output",r),n.attr("transform",`translate(${m}, 50)`),y+=p+50,0{},"setConf"),draw:L3t}}),F3t=i(()=>{_r(),R3t=Ae(e=>{let r="";for(let t=0;t` + .edge { + stroke-width: 3; + } + ${R3t(t)} + .section-root rect, .section-root path, .section-root circle { + fill: ${t.git0}; + } + .section-root text { + fill: ${t.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .eventWrapper { + filter: brightness(120%); + } +`,"getStyles"),O3t=D3t}),$3t={};A($3t,{diagram:()=>z3t});var z3t,q3t,U3t,j3t,G3t,W3t,Y3t,H3t,V3t,X3t,K3t,Z3t,Q3t,J3t,t5t,e5t,r5t,n5t,i5t=i(()=>{Hbt(),h3t(),B3t(),F3t(),z3t={db:Vbt,renderer:M3t,parser:Wbt,styles:O3t}}),a5t=i(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,4],n=[1,13],i=[1,12],a=[1,15],s=[1,16],o=[1,20],l=[1,19],c=[6,7,8],h=[1,26],u=[1,24],d=[1,25],p=[6,7,11],g=[1,6,13,15,16,19,22],f=[1,33],m=[1,34],y=[1,6,7,11,13,15,16,19,22],r={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 17:case 21:n.decorateNode({class:a[o]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:n.decorateNode({icon:a[o]});break;case 25:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.getType(a[o-2],a[o])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:r},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:r},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:n,9:22,12:11,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:h,7:u,10:23,11:d},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:n,12:21,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},e(g,[2,14],{7:f,11:m}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(g,[2,13],{7:f,11:m}),e(y,[2,11]),e(y,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0{wc(),al(),t(),Dr(),j3t=[],G3t=0,W3t={},Y3t=Ae(()=>{j3t=[],G3t=0,W3t={}},"clear"),H3t=Ae(function(e){for(let t=j3t.length-1;0<=t;t--)if(j3t[t].level0{R.info("addNode",t,e,r,n);let i=D(),a=i.mindmap?.padding??ke.mindmap.padding;switch(n){case K3t.ROUNDED_RECT:case K3t.RECT:case K3t.HEXAGON:a*=2}if(e={id:G3t++,nodeId:Mo(e,i),level:t,descr:Mo(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??ke.mindmap.maxNodeWidth,padding:a},r=H3t(t))r.children.push(e);else if(0!==j3t.length)throw new Error('There can be only one root. No parent could be found for ("'+e.descr+'")');j3t.push(e)},"addNode"),K3t={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Z3t=Ae((t,e)=>{switch(R.debug("In get type",t,e),t){case"[":return K3t.RECT;case"(":return")"===e?K3t.ROUNDED_RECT:K3t.CLOUD;case"((":return K3t.CIRCLE;case")":return K3t.CLOUD;case"))":return K3t.BANG;case"{{":return K3t.HEXAGON;default:return K3t.DEFAULT}},"getType"),Q3t=Ae((t,e)=>{W3t[t]=e},"setElementForId"),J3t=Ae(t=>{var e,r;t&&(e=D(),r=j3t[j3t.length-1],t.icon&&(r.icon=Mo(t.icon,e)),t.class)&&(r.class=Mo(t.class,e))},"decorateNode"),t5t=Ae(t=>{switch(t){case K3t.DEFAULT:return"no-border";case K3t.RECT:return"rect";case K3t.ROUNDED_RECT:return"rounded-rect";case K3t.CIRCLE:return"circle";case K3t.CLOUD:return"cloud";case K3t.BANG:return"bang";case K3t.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),e5t=Ae(()=>R,"getLogger"),r5t=Ae(t=>W3t[t],"getElementById"),n5t={clear:Y3t,addNode:X3t,getMindmap:V3t,nodeType:K3t,getType:Z3t,setElementForId:Q3t,decorateNode:J3t,type2Str:t5t,getLogger:e5t,getElementById:r5t}});function o5t(t){return(o5t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l5t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c5t(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[a++]}},"n"),e:Ae(function(t){throw t},"e"),f:e};throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x5t(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function b5t(t,e){return t(e={exports:{}},e.exports),e.exports}function w5t(t){for(var e=t.length;e--&&gwt.test(t.charAt(e)););return e}function k5t(t){return t&&t.slice(0,fwt(t)+1).replace(mwt,"")}function T5t(t){var e=vwt.call(t,bwt),r=t[bwt];try{var n=!(t[bwt]=void 0)}catch{}var i=xwt.call(t);return n&&(e?t[bwt]=r:delete t[bwt]),i}function _5t(t){return kwt.call(t)}function E5t(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(_wt&&_wt in Object(t)?wwt:Twt)(t)}function S5t(t){return null!=t&&"object"==typeof t}function C5t(t){return"symbol"==typeof t||Swt(t)&&"[object Symbol]"==Ewt(t)}function A5t(t){if("number"==typeof t)return t;if(Cwt(t))return Awt;if(hwt(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=hwt(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=ywt(t);var e=Nwt.test(t);return e||Iwt.test(t)?Mwt(t.slice(2),e?2:8):Lwt.test(t)?Awt:+t}function L5t(n,r,t){var i,a,s,o,l,c,h=0,e=!1,u=!1,d=!0;if("function"!=typeof n)throw new TypeError("Expected a function");function p(t){var e=i,r=a;return i=a=void 0,h=t,o=n.apply(r,e)}function g(t){return h=t,l=setTimeout(y,r),e?p(t):o}function f(t){var e=r-(t-c);return u?Owt(e,s-(t-h)):e}function m(t){var e=t-c;return void 0===c||r<=e||e<0||u&&s<=t-h}function y(){var t=pwt();if(m(t))return v(t);l=setTimeout(y,f(t))}function v(t){return l=void 0,d&&i?p(t):(i=a=void 0,o)}function x(){void 0!==l&&clearTimeout(l),i=c=a=l=void(h=0)}function b(){return void 0===l?o:v(pwt())}function w(){var t=pwt(),e=m(t);if(i=arguments,a=this,c=t,e){if(void 0===l)return g(c);if(u)return clearTimeout(l),l=setTimeout(y,r),p(c)}return void 0===l&&(l=setTimeout(y,r)),o}return r=Rwt(r)||0,hwt(t)&&(e=!!t.leading,u="maxWait"in t,s=u?Dwt(Rwt(t.maxWait)||0,r):s,d="trailing"in t?!!t.trailing:d),Ae(p,"invokeFunc"),Ae(g,"leadingEdge"),Ae(f,"remainingWait"),Ae(m,"shouldInvoke"),Ae(y,"timerExpired"),Ae(v,"trailingEdge"),Ae(x,"cancel"),Ae(b,"flush"),Ae(w,"debounced"),w.cancel=x,w.flush=b,w}function N5t(t,e,r,n,i,a){var s=N7t(t)?t:sTt[t]||sTt.euclidean;return 0===e&&N7t(t)?s(i,a):s(e,r,n,i,a)}function I5t(t,e){var r;return!YTt(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!Cwt(t))||VTt.test(t)||!HTt.test(t)||null!=e&&t in Object(e))}function M5t(t){return!!hwt(t)&&("[object Function]"==(t=Ewt(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function R5t(t){return!!ZTt&&ZTt in t}function D5t(t){if(null!=t){try{return JTt.call(t)}catch{}try{return t+""}catch{}}return""}function O5t(t){return!(!hwt(t)||QTt(t))&&(KTt(t)?r_t:e_t).test(t_t(t))}function P5t(t,e){return t?.[e]}function B5t(t,e){return t=i_t(t,e),n_t(t)?t:void 0}function F5t(){this.__data__=s_t?s_t(null):{},this.size=0}function $5t(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function z5t(t){var e,r=this.__data__;return s_t?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:o_t.call(r,t)?r[t]:void 0}function q5t(t){var e=this.__data__;return s_t?void 0!==e[t]:l_t.call(e,t)}function U5t(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=s_t&&void 0===e?"__lodash_hash_undefined__":e,this}function j5t(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{function n(t){if(l5t(this,n),this._obj=Object.create(null),this.size=0,null!=t)for(var e=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t,r=0;r>1])<0;)t[r]=a,r=s;return t[r]=i},"_siftdown"),u=Ae(function(t,e,r){var n,i,a,s,o;for(null==r&&(r=d),i=t.length,a=t[o=e],n=2*e+1;ny&&(u[v]=y,g[v]=w,f[v]=x),r||(v=w*o+b,!r&&u[v]>y&&(u[v]=y,g[v]=b,f[v]=x)))}for(var k=0;k=t.x1&&t.y2>=t.y1?{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1}:null!=t.w&&null!=t.h&&0<=t.w&&0<=t.h?{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}:void 0:void 0},"makeBoundingBox"),Zkt=Ae(function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},"copyBoundingBox"),Qkt=Ae(function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0},"clearBoundingBox"),Jkt=Ae(function(t,e,r){return{x1:t.x1+e,x2:t.x2+e,y1:t.y1+r,y2:t.y2+r,w:t.w,h:t.h}},"shiftBoundingBox"),t8t=Ae(function(t,e){t.x1=Math.min(t.x1,e.x1),t.x2=Math.max(t.x2,e.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,e.y1),t.y2=Math.max(t.y2,e.y2),t.h=t.y2-t.y1},"updateBoundingBox"),e8t=Ae(function(t,e,r){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r),t.y2=Math.max(t.y2,r),t.h=t.y2-t.y1},"expandBoundingBoxByPoint"),r8t=Ae(function(t){var e=1e.x2||e.x1>t.x2||t.x2e.y2||e.y1>t.y2)},"boundingBoxesIntersect"),s8t=Ae(function(t,e,r){return t.x1<=e&&e<=t.x2&&t.y1<=r&&r<=t.y2},"inBoundingBox"),o8t=Ae(function(t,e){return s8t(t,e.x,e.y)},"pointInBoundingBox"),l8t=Ae(function(t,e){return s8t(t,e.x1,e.y1)&&s8t(t,e.x2,e.y2)},"boundingBoxInBoundingBox"),c8t=Ae(function(t,e,r,n,i,a,s){var o,l="auto"===(l=7=u&&c[1]<=o||0<(c=T8t(t,e,r,n,h=r+i-l,u=n+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=T8t(t,e,r,n,o=r-i+l,h=n+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),h8t=Ae(function(t,e,r,n,i,a,s){var o=Math.min(r,i),r=Math.max(r,i),i=Math.min(n,a),n=Math.max(n,a);return o-s<=t&&t<=r+s&&i-s<=e&&e<=n+s},"inLineVicinity"),u8t=Ae(function(t,e,r,n,i,a,s,o,l){var c=Math.min(r,s,i)-l,r=Math.max(r,s,i)+l,s=Math.min(n,o,a)-l,i=Math.max(n,o,a)+l;return!(to&&(o=e[s][c],l=c);i[l].push(t[s])}for(var h=0;h=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var p=e[s],g=e[n[s]],f="dendrogram"===i.mode?{left:p,right:g,key:p.key}:{value:p.value.concat(g.value),key:p.key};t[p.index]=f,t.splice(g.index,1),e[p.key]=f;for(var m=0;mr[g.key][y.key]&&(a=r[g.key][y.key])):"max"===i.linkage?(a=r[p.key][y.key],r[p.key][y.key]s&&(s=e[i*t+(a=l)])}0=e.minIterations-1||v==e.maxIterations-1)){for(var j=0,M=0;M\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:Q7t,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+j_t.metaChar+"))+",j_t.className="(?:[\\w-]|(?:\\\\"+j_t.metaChar+"))+",j_t.value=j_t.string+"|"+j_t.number,j_t.id=j_t.variable;for(var e,r=j_t.comparatorOp.split("|"),i=0;i")+h(t.child,e);case j.ANCESTOR:case j.DESCENDANT:return h(t.ancestor,e)+" "+h(t.descendant,e);case j.COMPOUND_SPLIT:var a=h(t.left,e),i=h(t.subject,e),s=h(t.right,e);return a+(0":u=!0,n=r=":u=!0,n=r<=t;break;case"<":u=!0,n=tt.x2?n:t.x2,t.y1=rt.y2?i:t.y2,t.w=t.x2-t.x1,t.h=t.y2-t.y1)},"updateBounds"),uEt=Ae(function(t,e){return null==e?t:hEt(t,e.x1,e.y1,e.x2,e.y2)},"updateBoundsFromBox"),dEt=Ae(function(t,e,r){return vkt(t,e,r)},"prefixedProperty"),pEt=Ae(function(t,e,r){var n,i,a,s;e.cy().headless()||(n=(a=(s=e._private).rstyle).arrowWidth/2,"none"!==e.pstyle(r+"-arrow-shape").value&&(e="source"===r?(i=a.srcX,a.srcY):"target"===r?(i=a.tgtX,a.tgtY):(i=a.midX,a.midY),(s=(a=s.arrowBounds=s.arrowBounds||{})[r]=a[r]||{}).x1=i-n,s.y1=e-n,s.x2=i+n,s.y2=e+n,s.w=s.x2-s.x1,s.h=s.y2-s.y1,r8t(s,1),hEt(t,s.x1,s.y1,s.x2,s.y2)))},"updateBoundsFromArrow"),gEt=Ae(function(t,e,r){if(!e.cy().headless()){var n=e._private,i=n.rstyle;if(e.pstyle((p=r?r+"-":"")+"label").strValue){var a=e.pstyle("text-halign"),s=e.pstyle("text-valign"),o=dEt(i,"labelWidth",r),l=dEt(i,"labelHeight",r),c=dEt(i,"labelX",r),h=dEt(i,"labelY",r),i=e.pstyle(p+"text-margin-x").pfValue,u=e.pstyle(p+"text-margin-y").pfValue,d=e.isEdge(),p=e.pstyle(p+"text-rotation"),g=e.pstyle("text-outline-width").pfValue,f=e.pstyle("text-border-width").pfValue/2,e=e.pstyle("text-background-padding").pfValue,m=l,y=o,v=y/2,x=m/2;if(d)_=c-v,E=c+v,S=h-x,C=h+x;else{switch(a.value){case"left":_=c-y,E=c;break;case"center":_=c-v,E=c+v;break;case"right":E=(_=c)+y}switch(s.value){case"top":S=h-m,C=h;break;case"center":S=h-x,C=h+x;break;case"bottom":C=(S=h)+m}}if(_+=i-Math.max(g,f)-e-2,E+=i+Math.max(g,f)+e+2,S+=u-Math.max(g,f)-e-2,C+=u+Math.max(g,f)+e+2,(i=(o=n.labelBounds)[l=r||"main"]=o[l]||{}).x1=_,i.y1=S,i.x2=E,i.y2=C,i.w=E-_,i.h=C-S,u=d&&"autorotate"===p.strValue,g=null!=p.pfValue&&0!==p.pfValue,u||g){var f=u?dEt(n.rstyle,"labelAngle",r):p.pfValue,b=Math.cos(f),w=Math.sin(f),k=(_+E)/2,T=(S+C)/2;if(!d){switch(a.value){case"left":k=E;break;case"right":k=_}switch(s.value){case"top":T=C;break;case"bottom":T=S}}var i=(e=Ae(function(t,e){return{x:(t-=k)*b-(e-=T)*w+k,y:t*w+e*b+T}},"rotate"))(_,S),g=e(_,C),u=e(E,S),r=e(E,C),_=Math.min(i.x,g.x,u.x,r.x),E=Math.max(i.x,g.x,u.x,r.x),S=Math.min(i.y,g.y,u.y,r.y),C=Math.max(i.y,g.y,u.y,r.y)}(f=o[p=l+"Rot"]=o[p]||{}).x1=_,f.y1=S,f.x2=E,f.y2=C,f.w=E-_,f.h=C-S,hEt(t,_,S,E,C),hEt(n.labelBounds.all,_,S,E,C)}return t}},"updateBoundsFromLabel"),fEt=Ae(function(t,e){var r,n,i,a;e.cy().headless()||(r=e.pstyle("outline-opacity").value,i=e.pstyle("outline-width").value,0a.length?e.substr(a.length):""}function n(){c=c.length>u.length?c.substr(u.length):""}for(e=e.replace(/[/][*](\s|.)+?[*][/]/g,""),Ae(r,"removeSelAndBlockFromRemaining"),Ae(n,"removePropAndValFromRem");!e.match(/^\s*$/);){var i=e.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!i){lkt("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+e);break}var a=i[0],s=i[1];if("core"!==s&&new sEt(s).invalid)lkt("Skipping parsing of block: Invalid selector found in string stylesheet: "+s);else{for(var o=i[2],l=!1,c=o,h=[];!c.match(/^\s*$/);){if(!(p=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){lkt("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+o),l=!0;break}var u=p[0],d=p[1],p=p[2];this.properties[d]?this.parse(d,p)?h.push({name:d,val:p}):lkt("Skipping property: Invalid property definition in: "+u):lkt("Skipping property: Invalid property name in: "+u),n()}if(l){r();break}this.selector(s);for(var g=0;gl.max||l.strictMax&&r===l.max)?null:(s={name:e,value:r,strValue:""+r+(x||""),units:x,bypass:n},l.unitless||"px"!==x&&"em"!==x?s.pfValue=r:s.pfValue="px"!==x&&x?this.getEmSizeInPixels()*r:r,"ms"!==x&&"s"!==x||(s.pfValue="ms"===x?r:1e3*r),"deg"!==x&&"rad"!==x||(s.pfValue="rad"===x?r:$kt(r)),"%"===x&&(s.pfValue=r/100),s);if(l.propList){var w,k=[];if("none"!=(w=""+r)){for(var T=w.split(/\s*,\s*|\s+/),_=0;_this._private.maxZoom?this._private.maxZoom:e)=n.minZoom&&(n.maxZoom=e),this},"zoomRange"),minZoom:Ae(function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},"minZoom"),maxZoom:Ae(function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},"maxZoom"),getZoomedViewport:Ae(function(t){var e,r,n=this._private,i=n.pan,a=n.zoom,s=!1;return n.zoomingEnabled||(s=!0),it(t)?r=t:M7t(t)&&(r=t.level,null!=t.position?e=Mkt(t.position,a,i):null!=t.renderedPosition&&(e=t.renderedPosition),null!=e)&&!n.panningEnabled&&(s=!0),r=(r=r>n.maxZoom?n.maxZoom:r)e.maxZoom||!e.zoomingEnabled?a=!0:(e.zoom=r,i.push("zoom"))),!n||a&&t.cancelOnFailedZoom||!e.panningEnabled||(r=t.pan,it(r.x)&&(e.pan.x=r.x,s=!1),it(r.y)&&(e.pan.y=r.y,s=!1),s)||i.push("pan"),0=r.numIter||(mSt(i,r),i.temperature=i.temperature*r.coolingFactor,i.temperature=r.animationThreshold&&s(),zwt(t)):(ASt(i,r),l())},"frame")();else{for(;h;)h=o(c),c++;ASt(i,r),l()}return this},Q6t.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Q6t.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},hSt=Ae(function(t,e,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a=Kkt(r.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}),s={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:r.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},o=r.eles.components(),l={},c=0;cn.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(null==n.minX||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(null==n.minY||e.minY-n.padTop(e=f8t(y,v,h[u],h[u+1],h[u+2],h[u+3])))return _(t,e),!0}else if("bezier"===n.edgeType||"multibezier"===n.edgeType||"self"===n.edgeType||"compound"===n.edgeType)for(h=n.allpts,u=0;u+5(e=g8t(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return _(t,e),!0;for(var l=l||r.source,c=c||r.target,d=x.getArrowWidth(i,a),p=[{name:"source",x:n.arrowStartX,y:n.arrowStartY,angle:n.srcArrowAngle},{name:"target",x:n.arrowEndX,y:n.arrowEndY,angle:n.tgtArrowAngle},{name:"mid-source",x:n.midX,y:n.midY,angle:n.midsrcArrowAngle},{name:"mid-target",x:n.midX,y:n.midY,angle:n.midtgtArrowAngle}],u=0;uMath.abs(b)?i:n:"upward"===u||"downward"===u?(h=n,y=!0):"leftward"!==u&&"rightward"!==u||(h=i,y=!0),(i=h===n)?b:m),n=Ukt(h=i?x:v),b=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0=Math.abs(w)},"getIsTooClose"))(m),u=y(Math.abs(w)-Math.abs(m)),!g&&!u||b?i?(h=a.y1+m+(c?o/2*n:0),x=a.x1,e=a.x2,r.segpts=[x,h,e,h]):(p=a.x1+m+(c?s/2*n:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):i?(p=Math.abs(h)<=o/2,d=Math.abs(v)<=l/2,p?(y=(a.x1+a.x2)/2,g=a.y1,u=a.y2,r.segpts=[y,g,y,u]):d?(b=(a.y1+a.y2)/2,v=a.x1,l=a.x2,r.segpts=[v,b,l,b]):r.segpts=[a.x1,a.y2]):(p=Math.abs(h)<=s/2,g=Math.abs(x)<=e/2,p?(y=(a.y1+a.y2)/2,u=a.x1,d=a.x2,r.segpts=[u,y,d,y]):g?(v=(a.x1+a.x2)/2,l=a.y1,b=a.y2,r.segpts=[v,l,v,b]):r.segpts=[a.x2,a.y1]),r.isRound&&(y=t.pstyle("taxi-radius").value,g="arc-radius"===t.pstyle("radius-type").value[0],r.radii=new Array(r.segpts.length/2).fill(y),r.isArcRadius=new Array(r.segpts.length/2).fill(g))},tryToCorrectInvalidPoints:function(t,e){var r,n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k,T,_=t._private.rscratch;"bezier"===_.edgeType&&(m=e.srcPos,r=e.tgtPos,n=e.srcW,i=e.srcH,a=e.tgtW,s=e.tgtH,T=e.srcShape,o=e.tgtShape,v=e.srcCornerRadius,l=e.tgtCornerRadius,x=e.srcRs,e=e.tgtRs,y=!it(_.startX)||!it(_.startY),f=!it(_.arrowStartX)||!it(_.arrowStartY),c=!it(_.endX)||!it(_.endY),h=!it(_.arrowEndX)||!it(_.arrowEndY),u=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,b=(w=jkt({x:_.ctrlpts[0],y:_.ctrlpts[1]},{x:_.startX,y:_.startY}))i.poolIndex()&&(t=n,n=i,i=t),e.srcPos=n.position()),s=e.tgtPos=i.position(),o=e.srcW=n.outerWidth(),l=e.srcH=n.outerHeight(),c=e.tgtW=i.outerWidth(),h=e.tgtH=i.outerHeight(),u=e.srcShape=D.nodeShapes[R.getNodeShape(n)],d=e.tgtShape=D.nodeShapes[R.getNodeShape(i)],p=e.srcCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,g=e.tgtCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,f=e.tgtRs=i._private.rscratch,m=e.srcRs=n._private.rscratch;e.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var y=0;y=N.desktopTapThreshold2),v(t)),o=(e&&(N.hoverData.tapholdCancelled=!0),Ae(function(){var t=N.hoverData.dragDelta=N.hoverData.dragDelta||[];0===t.length?(t.push(f[0]),t.push(f[1])):(t[0]+=f[0],t[1]+=f[1])},"updateDragDelta")),y=(i=!0,I(d,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]}),Ae(function(){N.data.bgActivePosistion=void 0,N.hoverData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:l[0],y:l[1]}}),u[4]=1,N.hoverData.selecting=!0,N.redrawHint("select",!0),N.redraw()},"goIntoBoxMode"));if(3===N.hoverData.which?e&&(r={originalEvent:t,type:"cxtdrag",position:{x:l[0],y:l[1]}},(g||a).emit(r),N.hoverData.cxtDragged=!0,!N.hoverData.cxtOver||d!==N.hoverData.cxtOver)&&(N.hoverData.cxtOver&&N.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:l[0],y:l[1]}}),N.hoverData.cxtOver=d)&&d.emit({originalEvent:t,type:"cxtdragover",position:{x:l[0],y:l[1]}}):N.hoverData.dragging?(i=!0,a.panningEnabled()&&a.userPanningEnabled()&&(N.hoverData.justStartedPan?(r=N.hoverData.mdownPos,n={x:(l[0]-r[0])*s,y:(l[1]-r[1])*s},N.hoverData.justStartedPan=!1):n={x:f[0]*s,y:f[1]*s},a.panBy(n),a.emit("dragpan"),N.hoverData.dragged=!0),l=N.projectIntoViewport(t.clientX,t.clientY)):1!=u[4]||null!=g&&!g.pannable()?(g&&g.pannable()&&g.active()&&g.unactivate(),g&&g.grabbed()||d==p||(p&&I(p,["mouseout","tapdragout"],t,{x:l[0],y:l[1]}),d&&I(d,["mouseover","tapdragover"],t,{x:l[0],y:l[1]}),N.hoverData.last=d),g&&(e?a.boxSelectionEnabled()&&h?(g&&g.grabbed()&&(D(m),g.emit("freeon"),m.emit("free"),N.dragData.didDrag)&&(g.emit("dragfreeon"),m.emit("dragfree")),y()):g&&g.grabbed()&&N.nodeIsDraggable(g)&&((r=!N.dragData.didDrag)&&N.redrawHint("eles",!0),N.dragData.didDrag=!0,N.hoverData.draggingEles||R(m,{inDragLayer:!0}),s={x:0,y:0},it(f[0])&&it(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((n=N.hoverData.dragDelta)&&it(n[0])&&it(n[1])&&(s.x+=n[0],s.y+=n[1])),N.hoverData.draggingEles=!0,m.silentShift(s).emit("position drag"),N.redrawHint("drag",!0),N.redraw()):o()),i=!0):e&&(N.hoverData.dragging||!a.boxSelectionEnabled()||!h&&a.panningEnabled()&&a.userPanningEnabled()?!N.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&M(g,N.hoverData.downs)&&(N.hoverData.dragging=!0,N.hoverData.justStartedPan=!0,u[4]=0,N.data.bgActivePosistion=Dkt(c),N.redrawHint("select",!0),N.redraw()):y(),g)&&g.pannable()&&g.active()&&g.unactivate(),u[2]=l[0],u[3]=l[1],i)return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},"mousemoveHandler"),!1),N.registerBinding(t,"mouseup",Ae(function(t){var e,r,n,i,a,s,o,l;1===N.hoverData.which&&1!==t.which&&N.hoverData.capture||N.hoverData.capture&&(N.hoverData.capture=!1,e=N.cy,r=N.projectIntoViewport(t.clientX,t.clientY),n=N.selection,o=N.findNearestElement(r[0],r[1],!0,!1),i=N.dragData.possibleDragElements,a=N.hoverData.down,l=v(t),N.data.bgActivePosistion&&(N.redrawHint("select",!0),N.redraw()),N.hoverData.tapholdCancelled=!0,N.data.bgActivePosistion=void 0,a&&a.unactivate(),3===N.hoverData.which?(s={originalEvent:t,type:"cxttapend",position:{x:r[0],y:r[1]}},(a||e).emit(s),N.hoverData.cxtDragged||(s={originalEvent:t,type:"cxttap",position:{x:r[0],y:r[1]}},(a||e).emit(s)),N.hoverData.cxtDragged=!1,N.hoverData.which=null):1===N.hoverData.which&&(I(o,["mouseup","tapend","vmouseup"],t,{x:r[0],y:r[1]}),N.dragData.didDrag||N.hoverData.dragged||N.hoverData.selecting||N.hoverData.isOverThresholdDrag||(I(a,["click","tap","vclick"],t,{x:r[0],y:r[1]}),h=!1,t.timeStamp-u<=e.multiClickDebounceTime()?(c&&clearTimeout(c),h=!0,u=null,I(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(c=setTimeout(function(){h||I(a,["oneclick","onetap","voneclick"],t,{x:r[0],y:r[1]})},e.multiClickDebounceTime()),u=t.timeStamp)),null!=a||N.dragData.didDrag||N.hoverData.selecting||N.hoverData.dragged||v(t)||(e.$(d).unselect(["tapunselect"]),0=N.touchTapThreshold2}if(e&&N.touchData.cxt&&(t.preventDefault(),x=t.touches[0].clientX-j,b=t.touches[0].clientY-G,w=t.touches[1].clientX-j,k=t.touches[1].clientY-G,2.25<=(o=nt(x,b,w,k))/q||22500<=o)&&(N.touchData.cxt=!1,N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),p={originalEvent:t,type:"cxttapend",position:{x:i[0],y:i[1]}},N.touchData.start?(N.touchData.start.unactivate().emit(p),N.touchData.start=null):n.emit(p)),e&&N.touchData.cxt){var p={originalEvent:t,type:"cxtdrag",position:{x:i[0],y:i[1]}},g=(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),(N.touchData.start||n).emit(p),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxtDragged=!0,N.findNearestElement(i[0],i[1],!0,!0));(!N.touchData.cxtOver||g!==N.touchData.cxtOver)&&(N.touchData.cxtOver&&N.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:i[0],y:i[1]}}),N.touchData.cxtOver=g)&&g.emit({originalEvent:t,type:"cxtdragover",position:{x:i[0],y:i[1]}})}else if(e&&t.touches[2]&&n.boxSelectionEnabled())t.preventDefault(),N.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,N.touchData.selecting||n.emit({originalEvent:t,type:"boxstart",position:{x:i[0],y:i[1]}}),N.touchData.selecting=!0,N.touchData.didSelect=!0,r[4]=1,r&&0!==r.length&&void 0!==r[0]?(r[2]=(i[0]+i[2]+i[4])/3,r[3]=(i[1]+i[3]+i[5])/3):(r[0]=(i[0]+i[2]+i[4])/3,r[1]=(i[1]+i[3]+i[5])/3,r[2]=(i[0]+i[2]+i[4])/3+1,r[3]=(i[1]+i[3]+i[5])/3+1),N.redrawHint("select",!0),N.redraw();else if(e&&t.touches[1]&&!N.touchData.didSelect&&n.zoomingEnabled()&&n.panningEnabled()&&n.userZoomingEnabled()&&n.userPanningEnabled()){if(t.preventDefault(),N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),T=N.dragData.touchDragEles){N.redrawHint("drag",!0);for(var f=0;f=f.deqFastCost*(1e3/60-(t?n:0)))break}else if(t){if(l>=f.deqCost*i||l>=f.deqAvgCost*n)break}else if(c>=f.deqNoDrawCost*(1e3/60))break;var h=f.deq(p,o,s);if(!(0=.2*t.width&&this.retireTexture(t)},Y.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);.8=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,mkt(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),fkt(n,a),r.push(a),a}},Y.queueElement=function(t,e){var r=this.getElementQueue(),n=this.getElementKeyToQueue(),i=this.getKey(t),a=n[i];a?(a.level=Math.max(a.level,e),a.eles.merge(t),a.reqs++,r.updateItem(a)):(a={eles:t.spawn().merge(t),level:e,reqs:1,key:i},r.push(a),n[i]=a)},Y.dequeue=function(t){for(var e=this.getElementQueue(),r=this.getElementKeyToQueue(),n=[],i=this.lookup,a=0;a<1&&0=f||!l8t(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;o||m?s.queueLayer(g,v):s.drawEleInLayer(g,v,a,t),g.eles.push(v),x[a]=g}}return o||(m?null:h)},G.getEleLevelForLayerLevel=function(t,e){return t},G.drawEleInLayer=function(t,e,r,n){var i=this.renderer,t=t.context,a=e.boundingBox();0!==a.w&&0!==a.h&&e.visible()&&(r=this.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(t,!1),i.drawCachedElement(t,e,null,null,r,!0),i.setImgSmoothing(t,!0))},G.levelIsComplete=function(t,e){var r=this.layersByLevel[t];if(!r||0===r.length)return!1;for(var n=0,i=0;ih.minMbLowQualFrames)&&(h.motionBlurPxRatio=h.mbPxRBlurry),h.clearingMotionBlur&&(h.motionBlurPxRatio=1),h.textureDrawLastFrame&&!a&&(i[h.NODE]=!0,i[h.SELECT_BOX]=!0),n.style()),y=n.zoom(),v=void 0!==l?l:y,x=n.pan(),b={x:x.x,y:x.y},w={zoom:y,pan:{x:x.x,y:x.y}},k=(void 0===(k=h.prevViewport)||w.zoom!==k.zoom||w.pan.x!==k.pan.x||w.pan.y!==k.pan.y||g&&!p||(h.motionBlurPxRatio=1),v*=r,(b=c||b).x*=r,b.y*=r,h.getCachedZSortedEles());function T(t,e,r,n,i){var a=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",h.colorFillStyle(t,255,255,255,h.motionBlurTransparency),t.fillRect(e,r,n,i),t.globalCompositeOperation=a}function _(t,e){var r,n,i,a=h.clearingMotionBlur||t!==u.bufferContexts[h.MOTIONBLUR_BUFFER_NODE]&&t!==u.bufferContexts[h.MOTIONBLUR_BUFFER_DRAG]?(r=b,n=v,i=h.canvasWidth,h.canvasHeight):(r={x:x.x*d,y:x.y*d},n=y*d,i=h.canvasWidth*d,h.canvasHeight*d);t.setTransform(1,0,0,1,0,0),"motionBlur"===e?T(t,0,0,i,a):s||void 0!==e&&!e||t.clearRect(0,0,i,a),o||(t.translate(r.x,r.y),t.scale(n,n)),c&&t.translate(c.x,c.y),l&&t.scale(l,l)}Ae(T,"mbclear"),Ae(_,"setContextTransform"),a||(h.textureDrawLastFrame=!1),a?(h.textureDrawLastFrame=!0,h.textureCache||(h.textureCache={},h.textureCache.bb=n.mutableElements().boundingBox(),h.textureCache.texture=h.data.bufferCanvases[h.TEXTURE_BUFFER],(g=h.data.bufferContexts[h.TEXTURE_BUFFER]).setTransform(1,0,0,1,0,0),g.clearRect(0,0,h.canvasWidth*h.textureMult,h.canvasHeight*h.textureMult),h.render({forcedContext:g,drawOnlyNodeLayer:!0,forcedPxRatio:r*h.textureMult}),(w=h.textureCache.viewport={zoom:n.zoom(),pan:n.pan(),width:h.canvasWidth,height:h.canvasHeight}).mpan={x:(0-w.pan.x)/w.zoom,y:(0-w.pan.y)/w.zoom}),i[h.DRAG]=!1,i[h.NODE]=!1,E=u.contexts[h.NODE],p=h.textureCache.texture,w=h.textureCache.viewport,E.setTransform(1,0,0,1,0,0),t?T(E,0,0,w.width,w.height):E.clearRect(0,0,w.width,w.height),g=f.core("outside-texture-bg-color").value,C=f.core("outside-texture-bg-opacity").value,h.colorFillStyle(E,g[0],g[1],g[2],C),E.fillRect(0,0,w.width,w.height),y=n.zoom(),_(E,!1),E.clearRect(w.mpan.x,w.mpan.y,w.width/w.zoom/r,w.height/w.zoom/r),E.drawImage(p,w.mpan.x,w.mpan.y,w.width/w.zoom/r,w.height/w.zoom/r)):h.textureOnViewport&&!s&&(h.textureCache=null);var E,S,g=n.extent(),C=h.pinching||h.hoverData.dragging||h.swipePanning||h.data.wheelZooming||h.hoverData.draggingEles||h.cy.animated(),p=h.hideEdgesOnViewport&&C;(C=[])[h.NODE]=!i[h.NODE]&&t&&!h.clearedForMotionBlur[h.NODE]||h.clearingMotionBlur,C[h.NODE]&&(h.clearedForMotionBlur[h.NODE]=!0),C[h.DRAG]=!i[h.DRAG]&&t&&!h.clearedForMotionBlur[h.DRAG]||h.clearingMotionBlur,C[h.DRAG]&&(h.clearedForMotionBlur[h.DRAG]=!0),(i[h.NODE]||o||e||C[h.NODE])&&(S=t&&!C[h.NODE]&&1!==d,_(E=s||(S?h.data.bufferContexts[h.MOTIONBLUR_BUFFER_NODE]:u.contexts[h.NODE]),t&&!S?"motionBlur":void 0),p?h.drawCachedNodes(E,k.nondrag,r,g):h.drawLayeredElements(E,k.nondrag,r,g),h.debug&&h.drawDebugPoints(E,k.nondrag),o||t||(i[h.NODE]=!1)),!e&&(i[h.DRAG]||o||C[h.DRAG])&&(S=t&&!C[h.DRAG]&&1!==d,_(E=s||(S?h.data.bufferContexts[h.MOTIONBLUR_BUFFER_DRAG]:u.contexts[h.DRAG]),t&&!S?"motionBlur":void 0),p?h.drawCachedNodes(E,k.drag,r,g):h.drawCachedElements(E,k.drag,r,g),h.debug&&h.drawDebugPoints(E,k.drag),o||t||(i[h.DRAG]=!1)),(h.showFps||!e&&i[h.SELECT_BOX]&&!o)&&(_(E=s||u.contexts[h.SELECT_BOX]),1==h.selection[4]&&(h.hoverData.selecting||h.touchData.selecting)&&(y=h.cy.zoom(),S=f.core("selection-box-border-width").value/y,E.lineWidth=S,E.fillStyle="rgba("+f.core("selection-box-color").value[0]+","+f.core("selection-box-color").value[1]+","+f.core("selection-box-color").value[2]+","+f.core("selection-box-opacity").value+")",E.fillRect(h.selection[0],h.selection[1],h.selection[2]-h.selection[0],h.selection[3]-h.selection[1]),0{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function n(){}Ae(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){var n,i=r(2),a=r(8),s=r(9);function o(t,e,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(n in Ae(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[3],Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=s.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=s.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},t.exports=o},function(t,e,r){function n(t){this.vGraphObject=t}Ae(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(4);function h(t,e,r,n){i.call(this,n=null==r&&null==n?e:n),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new s(e.x,e.y,r.width,r.height):new s}for(n in Ae(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];h.prototype.getEdges=function(){return this.edges},h.prototype.getChild=function(){return this.child},h.prototype.getOwner=function(){return this.owner},h.prototype.getWidth=function(){return this.rect.width},h.prototype.setWidth=function(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},h.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},h.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},h.prototype.getCenter=function(){return new c(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},h.prototype.getLocation=function(){return new c(this.rect.x,this.rect.y)},h.prototype.getRect=function(){return this.rect},h.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},h.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},h.prototype.setRect=function(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.target==e){if(t.source!=n)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.source!=n&&t.target!=n)throw"Incorrect edge source and/or target";t.target!=e&&t.source!=e||r.push(t)}),r},h.prototype.getNeighborsList=function(){var e=new Set,r=this;return r.edges.forEach(function(t){if(t.source==r)e.add(t.target);else{if(t.target!=r)throw"Incorrect incidency!";e.add(t.source)}}),e},h.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),r=0;rt&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>e)&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-e)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-e),this.setHeight(this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);this.setLocation(r.x,r.y)},h.prototype.getLeft=function(){return this.rect.x},h.prototype.getRight=function(){return this.rect.x+this.rect.width},h.prototype.getTop=function(){return this.rect.y},h.prototype.getBottom=function(){return this.rect.y+this.rect.height},h.prototype.getParent=function(){return null==this.owner?null:this.owner.getParent()},t.exports=h},function(t,e,r){function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}Ae(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,r){var n,i=r(2),d=r(10),a=r(0),s=r(6),o=r(3),l=r(1),p=r(13),c=r(12),h=r(11);function u(t,e,r){i.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(n in Ae(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];u.prototype.getNodes=function(){return this.nodes},u.prototype.getEdges=function(){return this.edges},u.prototype.getGraphManager=function(){return this.graphManager},u.prototype.getParent=function(){return this.parent},u.prototype.getLeft=function(){return this.left},u.prototype.getRight=function(){return this.right},u.prototype.getTop=function(){return this.top},u.prototype.getBottom=function(){return this.bottom},u.prototype.isConnected=function(){return this.isConnected},u.prototype.add=function(t,e,r){if(null==e&&null==r){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,i.forEach(function(t){t.owner==e&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,r){var c,h=r(1);function n(t){c=r(5),this.layout=t,this.graphs=[],this.edges=[]}Ae(n,"LGraphManager"),n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},n.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()))),e=(a=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:a)*r[0],t=r[1]/a;r[0]p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-p.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(t-p.ADAPTATION_LOWER_NODE_LIMIT)/(p.ADAPTATION_UPPER_NODE_LIMIT-p.ADAPTATION_LOWER_NODE_LIMIT)*(1-p.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=p.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(5*this.getAllNodes().length,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},a.prototype.calcSpringForces=function(){for(var t,e=this.getAllEdges(),r=0;rthis.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(XCt()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(XCt()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(t,e){t.exports=r},function(t,e,r){var n,i=r(0).FDLayoutConstants;function a(){}for(n in Ae(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.DEFAULT_EDGE_LENGTH,a.DEFAULT_COMPONENT_SEPERATION=60,a.TILE=!0,a.TILING_PADDING_VERTICAL=10,a.TILING_PADDING_HORIZONTAL=10,a.TREE_REDUCTION_ON_INCREMENTAL=!1,t.exports=a},function(t,e,r){var n,i=r(0).FDLayoutEdge;function a(t,e,r){i.call(this,t,e,r)}for(n in Ae(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).LGraph;function a(t,e,r){i.call(this,t,e,r)}for(n in Ae(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).LGraphManager;function a(t){i.call(this,t)}for(n in Ae(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).FDLayoutNode,a=r(0).IMath;function s(t,e,r,n){i.call(this,t,e,r,n)}for(n in Ae(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementY)),null==this.child||0==this.child.getNodes().length?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),t.totalDisplacement+=Math.abs(this.displacementX)+Math.abs(this.displacementY),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0},s.prototype.propogateDisplacementToChildren=function(t,e){for(var r,n=this.getChild().getNodes(),i=0;in&&(n=Math.floor(s.y)),a=Math.floor(s.x+u.DEFAULT_COMPONENT_SEPERATION)}this.transform(new f(d.WORLD_CENTER_X-s.x/2,d.WORLD_CENTER_Y-s.y/2))},x.radialLayout=function(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),u.DEFAULT_RADIAL_SEPARATION),e=(x.branchRadialLayout(e,null,0,359,0,n),l.calculateBounds(t)),i=new c;i.setDeviceOrgX(e.getMinX()),i.setDeviceOrgY(e.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;al&&(l=h.rect.height)}r+=l+t.verticalPadding}},x.prototype.tileCompoundMembers=function(r,n){var i=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(t){var e=n[t];i.tiledMemberPack[t]=i.tileNodes(r[t],e.paddingLeft+e.paddingRight),e.rect.width=i.tiledMemberPack[t].width,e.rect.height=i.tiledMemberPack[t].height})},x.prototype.tileNodes=function(t,e){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.heightt.rowHeight[r]&&(i=t.rowHeight[r],t.rowHeight[r]=n,i=t.rowHeight[r]-i),t.height+=i,t.rows[r].push(e)},x.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;nr&&(e=n,r=t.rowWidth[n]);return e},x.prototype.canAddHorizontal=function(t,e,r){var n,i,a=this.getShortestRowIndex(t);return a<0||(i=t.rowWidth[a])+t.horizontalPadding+e<=t.width||(n=0,t.rowHeight[a]=e+t.horizontalPadding?(t.height+n)/(i+e+t.horizontalPadding):(t.height+n)/t.width,n=r+t.verticalPadding,(a<1?1/a:a)<((i=t.widtha&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;os&&(s=n[o].height);0{Ae(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(KCt()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeCoseBilkent=e(KCt()):t.cytoscapeCoseBilkent=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(t,e){t.exports=r},function(t,e,r){var n=r(0).layoutBase.LayoutConstants,i=r(0).layoutBase.FDLayoutConstants,a=r(0).CoSEConstants,g=r(0).CoSELayout,u=r(0).CoSENode,d=r(0).layoutBase.PointD,p=r(0).layoutBase.DimensionD,s={ready:Ae(function(){},"ready"),stop:Ae(function(){},"stop"),quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function o(t,e){var r,n={};for(r in t)n[r]=t[r];for(r in e)n[r]=e[r];return n}function l(t){this.options=o(s,t),c(this.options)}Ae(o,"extend"),Ae(l,"_CoSELayout");var c=Ae(function(t){null!=t.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?n.QUALITY=0:"proof"==t.quality?n.QUALITY=2:n.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!t.randomize,a.ANIMATE=i.ANIMATE=n.ANIMATE=t.animate,a.TILE=t.tile,a.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal},"getUserOptions"),r=(l.prototype.run=function(){var s,o,l=this.options,c=(this.idToLNode={},this.layout=new g),h=this,t=(h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this}),c.newGraphManager()),e=(this.gm=t,this.options.eles.nodes()),r=this.options.eles.edges();this.root=t.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(e),c);for(var n=0;n{eS(),rT(),JCt=Ae(function(t,e,r,n){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${10-r.height} q0,-5 5,-5 h${r.width-10} q5,0 5,5 v${r.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),t9t=Ae(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),e9t=Ae(function(t,e,r){var n=r.width,i=r.height,a=.15*n,s=.25*n,o=.35*n,l=.2*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${.25*n},${-1*n*.1} + a${o},${o} 1 0,1 ${.4*n},${-1*n*.1} + a${s},${s} 1 0,1 ${.35*n},${.2*+n} + + a${a},${a} 1 0,1 ${.15*n},${.35*+i} + a${l},${l} 1 0,1 ${-1*n*.15},${.65*+i} + + a${s},${a} 1 0,1 ${-1*n*.25},${.15*n} + a${o},${o} 1 0,1 ${-1*n*.5},0 + a${a},${a} 1 0,1 ${-1*n*.25},${-1*n*.15} + + a${a},${a} 1 0,1 ${-1*n*.1},${-1*i*.35} + a${l},${l} 1 0,1 ${.1*n},${-1*i*.65} + + H0 V0 Z`)},"cloudBkg"),r9t=Ae(function(t,e,r){var n=r.width,i=r.height,a=.15*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${.25*n},${-1*i*.1} + a${a},${a} 1 0,0 ${.25*n},0 + a${a},${a} 1 0,0 ${.25*n},0 + a${a},${a} 1 0,0 ${.25*n},${.1*+i} + + a${a},${a} 1 0,0 ${.15*n},${.33*+i} + a${.8*a},${.8*a} 1 0,0 0,${.34*+i} + a${a},${a} 1 0,0 ${-1*n*.15},${.33*+i} + + a${a},${a} 1 0,0 ${-1*n*.25},${.15*i} + a${a},${a} 1 0,0 ${-1*n*.25},0 + a${a},${a} 1 0,0 ${-1*n*.25},0 + a${a},${a} 1 0,0 ${-1*n*.25},${-1*i*.15} + + a${a},${a} 1 0,0 ${-1*n*.1},${-1*i*.33} + a${.8*a},${.8*a} 1 0,0 0,${-1*i*.34} + a${a},${a} 1 0,0 ${.1*n},${-1*i*.33} + + H0 V0 Z`)},"bangBkg"),n9t=Ae(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)},"circleBkg"),Ae(QCt,"insertPolygonShape"),i9t=Ae(function(t,e,r){var n=r.height,i=n/4,a=r.width-r.padding+2*i;QCt(e,a,n,[{x:i,y:0},{x:a-i,y:0},{x:a,y:-n/2},{x:a-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}],r)},"hexagonBkg"),a9t=Ae(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),s9t=Ae(async function(t,e,r,n,i){var a=i.htmlLabels,s=n%11,n=e.append("g");let o="section-"+(r.section=s);s<0&&(o+=" section-root"),n.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+o);var l=n.append("g"),e=n.append("g"),c=r.descr.replace(/()/g,` +`),c=(await tS(e,c,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.node().getBBox()),[i]=Z8(i.fontSize);switch(r.height=c.height+1.1*i*.5+r.padding,r.width=c.width+2*r.padding,r.icon?r.type===t.nodeType.CIRCLE?(r.height+=50,r.width+=50,n.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),e.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")")):(r.width+=50,i=r.height,r.height=Math.max(i,60),i=Math.abs(r.height-i),n.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+i/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),e.attr("transform","translate("+(25+r.width/2)+", "+(i/2+r.padding/2)+")")):a?(i=(r.width-c.width)/2,a=(r.height-c.height)/2,e.attr("transform","translate("+i+", "+a+")")):(c=r.width/2,i=r.padding/2,e.attr("transform","translate("+c+", "+i+")")),r.type){case t.nodeType.DEFAULT:JCt(t,l,r,s);break;case t.nodeType.ROUNDED_RECT:a9t(t,l,r,s);break;case t.nodeType.RECT:t9t(t,l,r,s);break;case t.nodeType.CIRCLE:l.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),n9t(t,l,r,s);break;case t.nodeType.CLOUD:e9t(t,l,r,s);break;case t.nodeType.BANG:r9t(t,l,r,s);break;case t.nodeType.HEXAGON:i9t(t,l,r,s)}return t.setElementForId(r.id,n),r.height},"drawNode"),o9t=Ae(function(t,e){var t=t.getElementById(e.id),r=e.x||0,e=e.y||0;t.attr("transform","translate("+r+","+e+")")},"positionNode")});async function c9t(r,n,t,i,a){await s9t(r,n,t,i,a),t.children&&await Promise.all(t.children.map((t,e)=>c9t(r,n,t,i<0?e:i,a)))}function h9t(n,t){t.edges().map((t,e)=>{var r=t.data();t[0]._private.bodyBounds&&(t=t[0]._private.rscratch,R.trace("Edge: ",e,r),n.insert("path").attr("d",`M ${t.startX},${t.startY} L ${t.midX},${t.midY} L${t.endX},${t.endY} `).attr("class","edge section-edge-"+r.section+" edge-depth-"+r.depth))})}function u9t(e,r,n,i){r.add({group:"nodes",data:{id:e.id.toString(),labelText:e.descr,height:e.height,width:e.width,level:i,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach(t=>{u9t(t,r,n,i+1),r.add({group:"edges",data:{id:e.id+"_"+t.id,source:e.id,target:t.id,depth:i,section:t.section}})})}function d9t(n,i){return new Promise(e=>{let t=O("body").append("div").attr("id","cy").attr("style","display:none"),r=HCt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});t.remove(),u9t(n,r,i,0),r.nodes().forEach(function(e){e.layoutDimensions=()=>{var t=e.data();return{w:t.width,h:t.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(t=>{R.info("Ready",t),e(r)})})}function p9t(i,t){t.nodes().map((t,e)=>{var r=t.data(),n=(r.x=t.position().x,r.y=t.position().y,o9t(i,r),i.getElementById(r.nodeId));R.info("Id:",e,"Position: (",t.position().x,", ",t.position().y,")",r),n.attr("transform",`translate(${t.position().x-r.width/2}, ${t.position().y-r.height/2})`),n.attr("attr",`apa-${e})`)})}var g9t,f9t,m9t,y9t,v9t,x9t=i(()=>{VCt(),g9t=M(ZCt(),1),i3(),wc(),t(),_0t(),sl(),l9t(),Dr(),HCt.use(g9t.default),Ae(c9t,"drawNodes"),Ae(h9t,"drawEdges"),Ae(u9t,"addNodes"),Ae(d9t,"layoutMindmap"),Ae(p9t,"positionNodes"),g9t=Ae(async(t,e,r,n)=>{var i,a,s;R.debug(`Rendering mindmap diagram +`+t),(n=(t=n.db).getMindmap())&&((i=D()).htmlLabels=!1,(a=(e=y0t(e)).append("g")).attr("class","mindmap-edges"),(s=e.append("g")).attr("class","mindmap-nodes"),await c9t(t,s,n,-1,i),h9t(a,s=await d9t(n,i)),p9t(t,s),tl(void 0,e,i.mindmap?.padding??ke.mindmap.padding,i.mindmap?.useMaxWidth??ke.mindmap.useMaxWidth))},"draw"),f9t={draw:g9t}}),b9t=i(()=>{_r(),m9t=Ae(e=>{let r="";for(let t=0;t` + .edge { + stroke-width: 3; + } + ${m9t(t)} + .section-root rect, .section-root path, .section-root circle, .section-root polygon { + fill: ${t.git0}; + } + .section-root text { + fill: ${t.gitBranchLabel0}; + } + .icon-container { + height:100%; + display: flex; + justify-content: center; + align-items: center; + } + .edge { + fill: none; + } + .mindmap-node-label { + dy: 1em; + alignment-baseline: middle; + text-anchor: middle; + dominant-baseline: middle; + text-align: center; + } +`,"getStyles"),v9t=y9t}),w9t={};A(w9t,{diagram:()=>k9t});var k9t,T9t,_9t,E9t,S9t,C9t,A9t,L9t,N9t,I9t,M9t,R9t,D9t,O9t,P9t,B9t=i(()=>{a5t(),s5t(),x9t(),b9t(),k9t={db:n5t,renderer:f9t,parser:U3t,styles:v9t}}),F9t=i(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,9],n=[1,10],i=[1,5,10,12],i={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:"error",4:"SANKEY",5:"NEWLINE",10:"EOF",11:"field[source]",12:"COMMA",13:"field[target]",14:"field[value]",18:"DQUOTE",19:"ESCAPED_TEXT",20:"NON_ESCAPED_TEXT"},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 7:var l=n.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),c=n.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),h=parseFloat(a[o].trim());n.addLink(l,c,h);break;case 8:case 9:case 11:this.$=a[o];break;case 10:this.$=a[o-1]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:r,20:n},{1:[2,6],7:11,10:[1,12]},e(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(i,[2,8]),e(i,[2,9]),{19:[1,16]},e(i,[2,11]),{1:[2,1]},{1:[2,5]},e(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:n},{15:18,16:7,17:8,18:r,20:n},{18:[1,19]},e(n,[2,3]),{12:[1,20]},e(i,[2,10]),{15:21,16:7,17:8,18:r,20:n},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0{wc(),al(),bc(),E9t=[],S9t=[],C9t=new Map,A9t=Ae(()=>{E9t=[],S9t=[],C9t=new Map,pl()},"clear"),L9t=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{Ae(this,"SankeyLink")}},N9t=Ae((t,e,r)=>{E9t.push(new L9t(t,e,r))},"addLink"),I9t=class{constructor(t){this.ID=t}static{Ae(this,"SankeyNode")}},M9t=Ae(t=>{t=L.sanitizeText(t,D());let e=C9t.get(t);return void 0===e&&(e=new I9t(t),C9t.set(t,e),S9t.push(e)),e},"findOrCreateNode"),R9t=Ae(()=>S9t,"getNodes"),D9t=Ae(()=>E9t,"getLinks"),O9t=Ae(()=>({nodes:S9t.map(t=>({id:t.ID})),links:E9t.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),P9t={nodesMap:C9t,getConfig:Ae(()=>D().sankey,"getConfig"),getNodes:R9t,getLinks:D9t,getGraph:O9t,addLink:N9t,findOrCreateNode:M9t,getAccTitle:fl,setAccTitle:gl,getAccDescription:yl,setAccDescription:ml,getDiagramTitle:xl,setDiagramTitle:vl,clear:A9t}});function z9t(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n{Ae(z9t,"max")});function U9t(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n>t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var j9t=i(()=>{Ae(U9t,"min")});function G9t(e,r){let n=0;if(void 0===r)for(var t of e)(t=+t)&&(n+=t);else{let t=-1;for(var i of e)(i=+r(i,++t,e))&&(n+=i)}return n}var W9t=i(()=>{Ae(G9t,"sum")}),Y9t=i(()=>{q9t(),j9t(),W9t()});function H9t(t){return t.target.depth}function V9t(t){return t.depth}function X9t(t,e){return e-1-t.height}function K9t(t,e){return t.sourceLinks.length?t.depth:e-1}function Z9t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?U9t(t.sourceLinks,H9t)-1:0}var Q9t=i(()=>{Y9t(),Ae(H9t,"targetDepth"),Ae(V9t,"left"),Ae(X9t,"right"),Ae(K9t,"justify"),Ae(Z9t,"center")});function J9t(t){return function(){return t}}var tAt=i(()=>{Ae(J9t,"constant")});function eAt(t,e){return nAt(t.source,e.source)||t.index-e.index}function rAt(t,e){return nAt(t.target,e.target)||t.index-e.index}function nAt(t,e){return t.y0-e.y0}function iAt(t){return t.value}function aAt(t){return t.index}function sAt(t){return t.nodes}function oAt(t){return t.links}function lAt(t,e){if(t=t.get(e))return t;throw new Error("missing: "+e)}function cAt({nodes:t}){for(var r of t){let t=r.y0,e=t;for(var n of r.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(var i of r.targetLinks)i.y1=e+i.width/2,e+=i.width}}function hAt(){let o=0,l=0,c=1,h=1,u=24,i=8,d,p=aAt,g=K9t,f,m,e=sAt,r=oAt,a=6;function n(){var t={nodes:e.apply(null,arguments),links:r.apply(null,arguments)};return s(t),y(t),v(t),x(t),k(t),cAt(t),t}function s({nodes:r,links:t}){for(var[e,n]of r.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];var i,a,s=new Map(r.map((t,e)=>[p(t,e,r),t]));for([i,a]of t.entries()){a.index=i;let{source:t,target:e}=a;"object"!=typeof t&&(t=a.source=lAt(s,t)),"object"!=typeof e&&(e=a.target=lAt(s,e)),t.sourceLinks.push(a),e.targetLinks.push(a)}if(null!=m)for(var{sourceLinks:o,targetLinks:l}of r)o.sort(m),l.sort(m)}function y({nodes:t}){for(var e of t)e.value=void 0===e.fixedValue?Math.max(G9t(e.sourceLinks,iAt),G9t(e.targetLinks,iAt)):e.fixedValue}function v({nodes:t}){let e=t.length,r=new Set(t),n=new Set,i=0;for(;r.size;){for(var a of r){a.depth=i;for(var{target:s}of a.sourceLinks)n.add(s)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}function x({nodes:t}){let e=t.length,r=new Set(t),n=new Set,i=0;for(;r.size;){for(var a of r){a.height=i;for(var{source:s}of a.targetLinks)n.add(s)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}function b({nodes:t}){var e,r=z9t(t,t=>t.depth)+1,n=(c-o-u)/(r-1),i=new Array(r);for(e of t){var a=Math.max(0,Math.min(r-1,Math.floor(g.call(null,e,r))));e.layer=a,e.x0=o+a*n,e.x1=e.x0+u,i[a]?i[a].push(e):i[a]=[e]}if(f)for(var s of i)s.sort(f);return i}function w(t){var r,n=U9t(t,t=>(h-l-(t.length-1)*d)/G9t(t,iAt));for(r of t){let e=l;for(var i of r){i.y0=e,i.y1=e+i.value*n,e=i.y1+d;for(var a of i.sourceLinks)a.width=a.value*n}e=(h-e+d)/(r.length+1);for(let t=0;tt.length)-1)),w(e);for(let t=0;t>1,n=t[r];C(t,n.y0-d,r-1,e),S(t,n.y1+d,1+r,e),C(t,h,t.length-1,e),S(t,l,0,e)}function S(t,e,r,n){for(;r{Y9t(),Q9t(),tAt(),Ae(eAt,"ascendingSourceBreadth"),Ae(rAt,"ascendingTargetBreadth"),Ae(nAt,"ascendingBreadth"),Ae(iAt,"value"),Ae(aAt,"defaultId"),Ae(sAt,"defaultNodes"),Ae(oAt,"defaultLinks"),Ae(lAt,"find"),Ae(cAt,"computeLinkBreadths"),Ae(hAt,"Sankey")});function dAt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function pAt(){return new dAt}var gAt,fAt,mAt,yAt,vAt=i(()=>{gAt=Math.PI,mAt=(fAt=2*gAt)-1e-6,Ae(dAt,"Path"),Ae(pAt,"path"),dAt.prototype=pAt.prototype={constructor:dAt,moveTo:Ae(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:Ae(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:Ae(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:Ae(function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:Ae(function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:Ae(function(t,e,r,n,i){var a,s,o=this._x1,l=this._y1,c=(r=+r)-(t=+t),h=(n=+n)-(e=+e),u=o-t,d=l-e,p=u*u+d*d;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):1e-6{vAt()});function bAt(t){return Ae(function(){return t},"constant")}var wAt=i(()=>{Ae(bAt,"default")});function kAt(t){return t[0]}function TAt(t){return t[1]}var _At,EAt=i(()=>{Ae(kAt,"x"),Ae(TAt,"y")}),SAt=i(()=>{_At=Array.prototype.slice});function CAt(t){return t.source}function AAt(t){return t.target}function LAt(i){var a=CAt,s=AAt,o=kAt,l=TAt,c=null;function e(){var t,e=_At.call(arguments),r=a.apply(this,e),n=s.apply(this,e);if(c=c||(t=yAt()),i(c,+o.apply(this,(e[0]=r,e)),+l.apply(this,e),+o.apply(this,(e[0]=n,e)),+l.apply(this,e)),t)return c=null,t+""||null}return Ae(e,"link"),e.source=function(t){return arguments.length?(a=t,e):a},e.target=function(t){return arguments.length?(s=t,e):s},e.x=function(t){return arguments.length?(o="function"==typeof t?t:bAt(+t),e):o},e.y=function(t){return arguments.length?(l="function"==typeof t?t:bAt(+t),e):l},e.context=function(t){return arguments.length?(c=t??null,e):c},e}function NAt(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function IAt(){return LAt(NAt)}var MAt=i(()=>{xAt(),SAt(),wAt(),EAt(),Ae(CAt,"linkSource"),Ae(AAt,"linkTarget"),Ae(LAt,"link"),Ae(NAt,"curveHorizontal"),Ae(IAt,"linkHorizontal")}),RAt=i(()=>{MAt()});function DAt(t){return[t.source.x1,t.y0]}function OAt(t){return[t.target.x0,t.y1]}function PAt(){return IAt().source(DAt).target(OAt)}var BAt,FAt,$At,zAt,qAt,UAt=i(()=>{RAt(),Ae(DAt,"horizontalSource"),Ae(OAt,"horizontalTarget"),Ae(PAt,"default")}),jAt=i(()=>{uAt(),Q9t(),UAt()}),GAt=i(()=>{BAt=class e{static{Ae(this,"Uid")}static{this.count=0}static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href="#"+t}toString(){return"url("+this.href+")"}}}),WAt=i(()=>{wc(),i3(),jAt(),sl(),GAt(),FAt={left:V9t,right:X9t,center:Z9t,justify:K9t},$At=Ae(function(t,e,r,n){let{securityLevel:i,sankey:a}=D(),s=Tl.sankey,o,l=("sandbox"===i&&(o=O("#i"+e)),O("sandbox"===i?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===i?l.select(`[id="${e}"]`):O(`[id="${e}"]`),h=a?.width??s.width,u=a?.height??s.width,d=a?.useMaxWidth??s.useMaxWidth,p=a?.nodeAlignment??s.nodeAlignment,g=a?.prefix??s.prefix,f=a?.suffix??s.suffix,m=a?.showValues??s.showValues,y=n.db.getGraph(),v=FAt[p],x=(hAt().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),yy(y4));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=BAt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>x(t.id));var e=Ae(({id:t,value:e})=>m?t+` +`+g+Math.round(100*e)/100+f:t,"getText"),n=(c.append("g").attr("class","node-labels").attr("font-family","sans-serif").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",t=>t.x0(t.y1+t.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",t=>t.x0(t.uid=BAt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0)).append("stop").attr("offset","0%").attr("stop-color",t=>x(t.source.id)),e.append("stop").attr("offset","100%").attr("stop-color",t=>x(t.target.id)));let w;switch(b){case"gradient":w=Ae(t=>t.uid,"coloring");break;case"source":w=Ae(t=>x(t.source.id),"coloring");break;case"target":w=Ae(t=>x(t.target.id),"coloring");break;default:w=b}n.append("path").attr("d",PAt()).attr("stroke",w).attr("stroke-width",t=>Math.max(1,t.width)),tl(void 0,c,0,d)},"draw"),zAt={draw:$At}}),YAt=i(()=>{qAt=Ae(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing")}),HAt={};A(HAt,{diagram:()=>XAt});var VAt,XAt,KAt,ZAt,QAt,JAt,tLt,eLt,rLt,nLt,iLt,aLt,sLt,oLt,lLt,cLt,hLt,uLt,dLt=i(()=>{F9t(),$9t(),WAt(),YAt(),VAt=_9t.parse.bind(_9t),_9t.parse=t=>VAt(qAt(t)),XAt={parser:_9t,db:P9t,renderer:zAt}}),pLt=i(()=>{Pr(),Dr(),rT(),bc(),KAt={packet:[]},ZAt=structuredClone(KAt),QAt=ke.packet,JAt=Ae(()=>{var t=S8({...QAt,...Be().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),tLt=Ae(()=>ZAt.packet,"getPacket"),eLt=Ae(t=>{0{pl(),ZAt=structuredClone(KAt)},"clear"),nLt={pushWord:eLt,getPacket:tLt,getConfig:JAt,clear:rLt,setAccTitle:gl,getAccTitle:fl,setDiagramTitle:vl,getDiagramTitle:xl,getAccDescription:yl,setAccDescription:ml}}),gLt=i(()=>{rht(),t(),sht(),pLt(),iLt=Ae(t=>{nht(t,nLt);let e=-1,r=[],n=1,i=nLt.getConfig().bitsPerRow;for(var{start:a,end:s,label:o}of t.blocks){if(s&&s{if(void 0===t.end&&(t.end=t.start),t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);return t.end+1<=e*r?[t,void 0]:[{start:t.start,end:e*r-1,label:t.label},{start:e*r,end:t.end,label:t.label}]},"getNextFittingBlock"),sLt={parse:Ae(async t=>{t=await Qct("packet",t),R.debug(t),iLt(t)},"parse")}}),fLt=i(()=>{_0t(),sl(),oLt=Ae((t,e,r,n)=>{var i,a,s=(n=n.db).getConfig(),{rowHeight:o,paddingY:l,bitWidth:c,bitsPerRow:h}=s,u=n.getPacket(),n=n.getDiagramTitle(),o=(l=o+l)*(u.length+1)-(n?0:o),c=c*h+2,d=y0t(e);d.attr("viewbox",`0 0 ${c} `+o),Jo(d,o,c,s.useMaxWidth);for([i,a]of u.entries())lLt(d,a,i,s);d.append("text").text(n).attr("x",c/2).attr("y",o-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),lLt=Ae((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=t.append("g"),u=r*(n+a)+a;for(c of e){var d,p,g=c.start%o*s+1,f=(c.end-c.start+1)*s-i;h.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",g+f/2).attr("y",u+n/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),l&&(d=c.end===c.start,p=u-2,h.append("text").attr("x",g+(d?f/2:0)).attr("y",p).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",d?"middle":"start").text(c.start),d||h.append("text").attr("x",g+f).attr("y",p).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(c.end))}},"drawWord"),cLt={draw:oLt}}),mLt=i(()=>{rT(),hLt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},uLt=Ae(({packet:t}={})=>` + .packetByte { + font-size: ${(t=S8(hLt,t)).byteFontSize}; + } + .packetByte.start { + fill: ${t.startByteColor}; + } + .packetByte.end { + fill: ${t.endByteColor}; + } + .packetLabel { + fill: ${t.labelColor}; + font-size: ${t.labelFontSize}; + } + .packetTitle { + fill: ${t.titleColor}; + font-size: ${t.titleFontSize}; + } + .packetBlock { + stroke: ${t.blockStrokeColor}; + stroke-width: ${t.blockStrokeWidth}; + fill: ${t.blockFillColor}; + } + `,"styles")}),yLt={};A(yLt,{diagram:()=>vLt});var vLt,xLt,bLt,wLt=i(()=>{pLt(),gLt(),fLt(),mLt(),vLt={parser:sLt,db:nLt,renderer:cLt,styles:uLt}}),kLt=i(()=>{function t(){this.yy={}}var e=Ae(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,7],n=[1,13],i=[1,14],a=[1,15],s=[1,19],o=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,21,28,29,30,31,32,40,44,47],d=[1,23],p=[1,24],g=[8,15,16,21,28,29,30,31,32,40,44,47],f=[8,15,16,21,27,28,29,30,31,32,40,44,47],m=[1,49],h={trace:Ae(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList:34,DIR:35,NODE_DSTART:36,NODE_DEND:37,BLOCK_ARROW_START:38,BLOCK_ARROW_END:39,classDef:40,CLASSDEF_ID:41,CLASSDEF_STYLEOPTS:42,DEFAULT:43,class:44,CLASSENTITY_IDS:45,STYLECLASS:46,style:47,STYLE_ENTITY_IDS:48,STYLE_DEFINITION_DATA:49,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:Ae(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 4:n.getLogger().debug("Rule: separator (NL) ");break;case 5:n.getLogger().debug("Rule: separator (Space) ");break;case 6:n.getLogger().debug("Rule: separator (EOF) ");break;case 7:n.getLogger().debug("Rule: hierarchy: ",a[o-1]),n.setHierarchy(a[o-1]);break;case 8:n.getLogger().debug("Stop NL ");break;case 9:n.getLogger().debug("Stop EOF ");break;case 10:n.getLogger().debug("Stop NL2 ");break;case 11:n.getLogger().debug("Stop EOF2 ");break;case 12:n.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:n.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:n.getLogger().debug("Rule: link: ",a[o],t),this.$={edgeTypeStr:a[o],label:""};break;case 15:n.getLogger().debug("Rule: LABEL link: ",a[o-3],a[o-1],a[o]),this.$={edgeTypeStr:a[o],label:a[o-1]};break;case 18:var l=parseInt(a[o]),c=n.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr),c=n.edgeStrToEdgeData(a[o-1].edgeTypeStr),this.$=[{id:a[o-2].id,label:a[o-2].label,type:a[o-2].type,directions:a[o-2].directions},{id:a[o-2].id+"-"+a[o].id,start:a[o-2].id,end:a[o].id,label:a[o-1].label,type:"edge",directions:a[o].directions,arrowTypeEnd:c,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:n.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this||"na"),n.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:n.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]),n.generateId(),this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:n.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]),l=n.generateId(),this.$={id:l,type:"composite",label:"",children:a[o-1]};break;case 29:n.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:n.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",a[o-1],a[o]),this.$={id:a[o-1],label:a[o].label,typeStr:a[o].typeStr,directions:a[o].directions};break;case 31:n.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:n.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:n.getLogger().debug("Rule: nodeShapeNLabel: ",a[o-2],a[o-1],a[o]),this.$={typeStr:a[o-2]+a[o],label:a[o-1]};break;case 34:n.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",a[o-3],a[o-2]," #3:",a[o-1],a[o]),this.$={typeStr:a[o-3]+a[o],label:a[o-2],directions:a[o-1]};break;case 35:case 36:this.$={type:"classDef",id:a[o-1].trim(),css:a[o].trim()};break;case 37:this.$={type:"applyClass",id:a[o-1].trim(),styleClass:a[o].trim()};break;case 38:this.$={type:"applyStyles",id:a[o-1].trim(),stylesStr:a[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:r,28:n,29:i,31:a,32:s,40:o,44:l,47:c}),e(u,[2,16],{14:22,15:d,16:p}),e(u,[2,17]),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,22]),e(g,[2,25],{27:[1,25]}),e(u,[2,26]),{19:26,26:12,32:s},{11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(f,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,32:s},{32:[2,14]},{17:[1,36]},e(g,[2,24]),{11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(f,[2,30]),{18:[1,43]},{18:[1,44]},e(g,[2,23]),{18:[1,45]},{30:[1,46]},e(u,[2,28]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{37:[1,47]},{34:48,35:m},{15:[1,50]},e(u,[2,27]),e(f,[2,33]),{39:[1,51]},{34:52,35:m,39:[2,31]},{32:[2,15]},e(f,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:Ae(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:Ae(function(t){var e,r=this,n=[0],i=[],a=[null],s=[],o=this.table,l="",c=0,h=0,u=0,d=1,p=s.slice.call(arguments,1),g=Object.create(this.lexer),f={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. +`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:Ae(function(){return this.next()||this.lex()},"lex"),begin:Ae(function(t){this.conditionStack.push(t)},"begin"),popState:Ae(function(){return 0"),"NODE_DEND";case 54:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:case 61:case 62:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),38;case 75:return t.getLogger().debug("Lex: NODE_ID",e.yytext),32;case 76:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 77:case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 84:t.getLogger().debug("LEX POPPING"),this.popState();break;case 85:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 91:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 92:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 94:case 95:case 96:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 97:case 98:case 99:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 103:case 104:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 105:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};h.lexer=d,Ae(t,"Parser"),(xLt=new((t.prototype=h).Parser=t)).parser=xLt,bLt=xLt});function TLt(t){switch(R.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return R.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function _Lt(t){return"=="!==(R.debug("typeStr2Type",t),t)?"normal":"thick"}function ELt(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var SLt,CLt,ALt,LLt,NLt,ILt,MLt,RLt,DLt,OLt,PLt,BLt,FLt,$Lt,zLt,qLt,ULt,jLt,GLt,WLt,YLt,HLt,VLt,XLt,KLt,ZLt,QLt,JLt,tNt=i(()=>{CD(),Pr(),wc(),t(),al(),bc(),SLt=new Map,CLt=[],ALt=new Map,LLt=D(),NLt=new Map,ILt=Ae(t=>L.sanitizeText(t,LLt),"sanitizeText"),MLt=Ae(function(t,e=""){let r=NLt.get(t);r||(r={id:t,styles:[],textStyles:[]},NLt.set(t,r)),e?.split(",").forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(t)&&(t=e.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(t)),r.styles.push(e)})},"addStyleClass"),RLt=Ae(function(t,e=""){t=SLt.get(t),null!=e&&(t.styles=e.split(","))},"addStyle2Node"),DLt=Ae(function(t,r){t.split(",").forEach(function(t){let e=SLt.get(t);void 0===e&&(t=t.trim(),e={id:t,type:"na",children:[]},SLt.set(t,e)),e.classes||(e.classes=[]),e.classes.push(r)})},"setCssClass"),OLt=Ae((t,e)=>{var r,n=[];for(r of t.flat())if(r.label&&(r.label=ILt(r.label)),"classDef"===r.type)MLt(r.id,r.css);else if("applyClass"===r.type)DLt(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&RLt(r.id,r?.stylesStr);else if("column-setting"===r.type)e.columns=r.columns??-1;else if("edge"===r.type){var i=(ALt.get(r.id)??0)+1;ALt.set(r.id,i),r.id=i+"-"+r.id,CLt.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(i=SLt.get(r.id))?SLt.set(r.id,r):("na"!==r.type&&(i.type=r.type),r.label!==r.id&&(i.label=r.label)),r.children&&OLt(r.children,r),"space"===r.type){var a=r.width??1;for(let t=0;t{R.debug("Clear called"),pl(),BLt={id:"root",type:"composite",children:[],columns:-1},SLt=new Map([["root",BLt]]),PLt=[],NLt=new Map,CLt=[],ALt=new Map},"clear"),Ae(TLt,"typeStr2Type"),Ae(_Lt,"edgeTypeStr2Type"),Ae(ELt,"edgeStrToEdgeData"),$Lt=0,zLt=Ae(()=>($Lt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+$Lt),"generateId"),qLt=Ae(t=>{BLt.children=t,OLt(t,BLt),PLt=BLt.children},"setHierarchy"),ULt=Ae(t=>(t=SLt.get(t))?t.columns||(t.children?t.children.length:-1):-1,"getColumns"),jLt=Ae(()=>[...SLt.values()],"getBlocksFlat"),GLt=Ae(()=>PLt||[],"getBlocks"),WLt=Ae(()=>CLt,"getEdges"),YLt=Ae(t=>SLt.get(t),"getBlock"),HLt=Ae(t=>{SLt.set(t.id,t)},"setBlock"),XLt=Ae(()=>console,"getLogger"),VLt=Ae(function(){return NLt},"getClasses"),XLt={getConfig:Ae(()=>Be().block,"getConfig"),typeStr2Type:TLt,edgeTypeStr2Type:_Lt,edgeStrToEdgeData:ELt,getLogger:XLt,getBlocksFlat:jLt,getBlocks:GLt,getEdges:WLt,setHierarchy:qLt,getBlock:YLt,setBlock:HLt,getColumns:ULt,getClasses:VLt,clear:FLt,generateId:zLt},KLt=XLt}),eNt=i(()=>{_r(),ZLt=Ae((t,e)=>{var r=(i=zt)(t,"r"),n=i(t,"g"),i=i(t,"b");return Ft(r,n,i,e)},"fade"),QLt=Ae(t=>`.label { + font-family: ${t.fontFamily}; + color: ${t.nodeTextColor||t.textColor}; + } + .cluster-label text { + fill: ${t.titleColor}; + } + .cluster-label span,p { + color: ${t.titleColor}; + } + .label text,span,p { + fill: ${t.nodeTextColor||t.textColor}; + color: ${t.nodeTextColor||t.textColor}; + } + + .node rect, + .node circle, + .node ellipse, + .node polygon, + .node path { + fill: ${t.mainBkg}; + stroke: ${t.nodeBorder}; + stroke-width: 1px; + } + .flowchart-label text { + text-anchor: middle; + } + .node .label { + text-align: center; + } + .node.clickable { + cursor: pointer; + } + + .arrowheadPath { + fill: ${t.arrowheadColor}; + } + + .edgePath .path { + stroke: ${t.lineColor}; + stroke-width: 2.0px; + } + + .flowchart-link { + stroke: ${t.lineColor}; + fill: none; + } + .edgeLabel { + background-color: ${t.edgeLabelBackground}; + rect { + opacity: 0.5; + background-color: ${t.edgeLabelBackground}; + fill: ${t.edgeLabelBackground}; + } + text-align: center; + } + .labelBkg { + background-color: ${ZLt(t.edgeLabelBackground,.5)}; + } + + .node .cluster { + fill: ${ZLt(t.clusterBkg,.5)}; + stroke: ${ZLt(t.clusterBorder,.2)}; + box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; + stroke-width: 1px; + } + + .cluster text { + fill: ${t.titleColor}; + } + + .cluster span,p { + color: ${t.titleColor}; + } + div.mermaidTooltip { + position: absolute; + text-align: center; + max-width: 200px; + padding: 2px; + font-family: ${t.fontFamily}; + font-size: 12px; + background: ${t.tertiaryColor}; + border: 1px solid ${t.border2}; + border-radius: 2px; + pointer-events: none; + z-index: 100; + } + + .flowchartTitleText { + text-anchor: middle; + font-size: 18px; + fill: ${t.textColor}; + } +`,"getStyles"),JLt=QLt});function rNt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}function nNt(s,o,l=0,c=0){if(R.debug("setBlockSizes abc95 (start)",s.id,s?.size?.x,"block width =",s?.size,"sieblingWidth",l),s?.size?.width||(s.size={width:l,height:c,x:0,y:0}),0layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width);var a=n.columns??-1;if(R.debug("layoutBlocks columns abc95",n.id,"=>",a,n),n.children&&0 x:${s.size.x} y:${s.size.y} ${s.widthInColumns} (width * (child?.w || 1)) / 2 `+l*(s?.widthInColumns??1)/2),e=s.size.x+u,s.size.y=d.size.y-d.size.height/2+h*(c+oNt)+c/2+oNt,R.debug(`abc88 layout blocks (calc) px, pyid:${s.id}startingPosX${e}${oNt}${u}=>x:${s.size.x}y:${s.size.y}${s.widthInColumns}(width * (child?.w || 1)) / 2`+l*(s?.widthInColumns??1)/2)),s.children&&iNt(s,i),t+=s?.widthInColumns??1,R.debug("abc88 columnsPos",s,t))}}R.debug(`layout blocks (<==layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width)}function aNt(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){var a,s,o,l;if(t.size&&"root"!==t.id&&({x:a,y:s,width:o,height:l}=t.size,a-o/2{t(),wc(),oNt=D()?.block?.padding??8,Ae(rNt,"calculateBlockPosition"),lNt=Ae(t=>{let e=0,r=0;for(var n of t.children){var{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};R.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),"space"!==n.type&&(i>e&&(e=i/(t.widthInColumns??1)),a>r)&&(r=a)}return{width:e,height:r}},"getMaxChildSize"),Ae(nNt,"setBlockSizes"),Ae(iNt,"layoutBlocks"),Ae(aNt,"findBounds"),Ae(sNt,"layout")});function hNt(t,e,r=!1){let n=t,i="default",a=(0<(n?.classes?.length||0)&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label",0),s="",o;switch(n.type){case"round":a=5,s="rect";break;case"composite":a=0,s="composite",o=0;break;case"square":s="rect";break;case"diamond":s="question";break;case"hexagon":s="hexagon";break;case"block_arrow":s="block_arrow";break;case"odd":s="rect_left_inv_arrow";break;case"lean_right":s="lean_right";break;case"lean_left":s="lean_left";break;case"trapezoid":s="trapezoid";break;case"inv_trapezoid":s="inv_trapezoid";break;case"rect_left_inv_arrow":s="rect_left_inv_arrow";break;case"circle":s="circle";break;case"ellipse":s="ellipse";break;case"stadium":s="stadium";break;case"subroutine":s="subroutine";break;case"cylinder":s="cylinder";break;case"group":s="rect";break;case"doublecircle":s="doublecircle";break;default:s="rect"}var t=w8(n?.styles??[]),l=n.label,c=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:t.labelStyle,shape:s,labelText:l,rx:a,ry:a,class:i,style:t.style,id:n.id,directions:n.directions,width:c.width,height:c.height,x:c.x,y:c.y,positioned:r,intersect:void 0,type:n.type,padding:o??Be()?.block?.padding??0}}async function uNt(t,e,r){var n;"group"!==(e=hNt(e,0,!1)).type&&(n=(t=await cC(t,e)).node().getBBox(),(e=r.getBlock(e.id)).size={width:n.width,height:n.height,x:0,y:0,node:t},r.setBlock(e),t.remove())}async function dNt(t,e,r){var n=hNt(e,0,!0);"space"!==r.getBlock(n.id).type&&(await cC(t,n),e.intersect=n?.intersect,dC(n))}async function pNt(t,e,r,n){for(var i of e)await n(t,i,r),i.children&&await pNt(t,i.children,r,n)}async function gNt(t,e,r){await pNt(t,e,r,uNt)}async function fNt(t,e,r){await pNt(t,e,r,dNt)}async function mNt(t,e,r,n,i){var a,s,o,l,c=new oq({multigraph:!0,compound:!0});c.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(a of r)a.size&&c.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(s of e)s.start&&s.end&&(l=n.getBlock(s.start),o=n.getBlock(s.end),l?.size)&&o?.size&&(l=l.size,o=o.size,l=[{x:l.x,y:l.y},{x:l.x+(o.x-l.x)/2,y:l.y+(o.y-l.y)/2},{x:o.x,y:o.y}],evt(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",c,i),s.label)&&(await K2t(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),Z2t({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}var yNt,vNt,xNt,bNt=i(()=>{cq(),Pr(),ivt(),fC(),rT(),Ae(hNt,"getNodeFromBlock"),Ae(uNt,"calculateBlockSize"),Ae(dNt,"insertBlockPositioned"),Ae(pNt,"performOperations"),Ae(gNt,"calculateBlockSizes"),Ae(fNt,"insertBlocks"),Ae(mNt,"insertEdges")}),wNt=i(()=>{i3(),Pr(),U2t(),t(),sl(),cNt(),bNt(),yNt=Ae(function(t,e){return e.db.getClasses()},"getClasses"),vNt=Ae(async function(t,e,r,n){let{securityLevel:i,block:a}=Be(),s=n.db,o;"sandbox"===i&&(o=O("#i"+e));var l=O("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),l="sandbox"===i?l.select(`[id="${e}"]`):O(`[id="${e}"]`),n=(f2t(l,["point","circle","cross"],n.type,e),s.getBlocks()),c=s.getBlocksFlat(),h=s.getEdges(),u=l.insert("g").attr("class","block"),d=(await gNt(u,n,s),sNt(s));await fNt(u,n,s),await mNt(u,h,c,s,e),d&&(n=d,u=Math.max(1,Math.round(n.width/n.height*.125)),h=n.height+u+10,c=n.width+10,e=a.useMaxWidth,Jo(l,h,c,!!e),R.debug("Here Bounds",d,n),l.attr("viewBox",`${n.x-5} ${n.y-5} ${n.width+10} `+(n.height+10)))},"draw"),xNt={draw:vNt,getClasses:yNt}}),kNt={};A(kNt,{diagram:()=>TNt});var TNt,_Nt=i(()=>{kLt(),tNt(),eNt(),wNt(),TNt={parser:bLt,db:KLt,renderer:xNt,styles:JLt}}),ENt=(A(C={},{default:()=>ROt}),We(),Xe(),{id:"c4",detector:Ae(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:Ae(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(AT(),ST))).diagram}),"loader")}),SNt={id:"flowchart",detector:Ae((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:Ae(async()=>({id:"flowchart",diagram:(await Promise.resolve().then(()=>(MW(),pW))).diagram}),"loader")},CNt="flowchart-v2",i=Ae((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&(!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),A=Ae(async()=>{var t=(await Promise.resolve().then(()=>(MW(),pW))).diagram;return{id:CNt,diagram:t}},"loader"),ANt={id:CNt,detector:i,loader:A},LNt={id:"er",detector:Ae(t=>/^\s*erDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(AY(),SY))).diagram}),"loader")},NNt={id:"gitGraph",detector:Ae(t=>/^\s*gitGraph/.test(t),"detector"),loader:Ae(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(Aut(),_ut))).diagram}),"loader")},INt={id:"gantt",detector:Ae(t=>/^\s*gantt/.test(t),"detector"),loader:Ae(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(b0t(),h0t))).diagram}),"loader")},MNt={id:"info",detector:Ae(t=>/^\s*info/.test(t),"detector"),loader:Ae(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(Y0t(),S0t))).diagram}),"loader")},RNt={id:"pie",detector:Ae(t=>/^\s*pie/.test(t),"detector"),loader:Ae(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(npt(),Z0t))).diagram}),"loader")},DNt="quadrantChart",i=Ae(t=>/^\s*quadrantChart/.test(t),"detector"),A=Ae(async()=>{var t=(await Promise.resolve().then(()=>(Fpt(),Dpt))).diagram;return{id:DNt,diagram:t}},"loader"),ONt={id:DNt,detector:i,loader:A},PNt={id:"xychart",detector:Ae(t=>/^\s*xychart-beta/.test(t),"detector"),loader:Ae(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>($gt(),H1t))).diagram}),"loader")},BNt="requirement",i=Ae(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),A=Ae(async()=>{var t=(await Promise.resolve().then(()=>(Xgt(),Wgt))).diagram;return{id:BNt,diagram:t}},"loader"),FNt={id:BNt,detector:i,loader:A},$Nt={id:"sequence",detector:Ae(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(Xyt(),zmt))).diagram}),"loader")},zNt={id:"class",detector:Ae((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"class",diagram:(await Promise.resolve().then(()=>(q2t(),r2t))).diagram}),"loader")},qNt="classDiagram",i=Ae((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),A=Ae(async()=>{var t=(await Promise.resolve().then(()=>(r4t(),yvt))).diagram;return{id:qNt,diagram:t}},"loader"),UNt={id:qNt,detector:i,loader:A},jNt={id:"state",detector:Ae((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:Ae(async()=>({id:"state",diagram:(await Promise.resolve().then(()=>(Yxt(),Gxt))).diagram}),"loader")},GNt="stateDiagram",i=Ae((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&"dagre-wrapper"===e?.state?.defaultRenderer),"detector"),A=Ae(async()=>{var t=(await Promise.resolve().then(()=>(Ebt(),Hxt))).diagram;return{id:GNt,diagram:t}},"loader"),WNt={id:GNt,detector:i,loader:A},YNt={id:"journey",detector:Ae(t=>/^\s*journey/.test(t),"detector"),loader:Ae(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(Ybt(),Ubt))).diagram}),"loader")},HNt=(t(),_0t(),sl(),i={draw:Ae((t,e,r)=>{R.debug(`rendering svg for syntax error +`);var n=(e=y0t(e)).append("g");e.attr("viewBox","0 0 2412 512"),Jo(e,100,512,!0),n.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),n.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),n.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),n.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),n.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),n.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),n.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),n.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r)},"draw")}),VNt={db:{},renderer:i,parser:{parse:Ae(()=>{},"parse")}},XNt="flowchart-elk",A=Ae((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),i=Ae(async()=>{var t=(await Promise.resolve().then(()=>(MW(),pW))).diagram;return{id:XNt,diagram:t}},"loader"),KNt={id:XNt,detector:A,loader:i},ZNt={id:"timeline",detector:Ae(t=>/^\s*timeline/.test(t),"detector"),loader:Ae(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(i5t(),$3t))).diagram}),"loader")},QNt={id:"mindmap",detector:Ae(t=>/^\s*mindmap/.test(t),"detector"),loader:Ae(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(B9t(),w9t))).diagram}),"loader")},JNt={id:"sankey",detector:Ae(t=>/^\s*sankey-beta/.test(t),"detector"),loader:Ae(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(dLt(),HAt))).diagram}),"loader")},tIt={id:"packet",detector:Ae(t=>/^\s*packet-beta/.test(t),"detector"),loader:Ae(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(wLt(),yLt))).diagram}),"loader")},eIt={id:"block",detector:Ae(t=>/^\s*block-beta/.test(t),"detector"),loader:Ae(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(_Nt(),kNt))).diagram}),"loader")},rIt=(Xe(),wc(),!1),nIt=Ae(()=>{rIt||(rIt=!0,Al("error",VNt,t=>"error"===t.toLowerCase().trim()),Al("---",{db:{clear:Ae(()=>{},"clear")},styles:{},renderer:{draw:Ae(()=>{},"draw")},parser:{parse:Ae(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:Ae(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),rt(ENt,UNt,zNt,LNt,INt,MNt,RNt,FNt,$Nt,KNt,ANt,SNt,QNt,ZNt,NNt,WNt,jNt,YNt,ONt,JNt,tIt,PNt,eIt))},"addDiagrams"),iIt=(t(),Xe(),wc(),Ae(async()=>{R.debug("Loading registered diagrams");var t=(await Promise.allSettled(Object.entries(tt).map(async([t,{detector:e,loader:r}])=>{if(r)try{Ll(t)}catch{try{var{diagram:n,id:i}=await r();Al(i,n,e)}catch(e){throw R.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete tt[t],e}}}))).filter(t=>"rejected"===t.status);if(0{YIt.forEach(t=>{t()}),YIt=[]},"attachFunctions"),VIt=(t(),ol(),Mr(),M(Br(),1));function XIt(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function KIt(t,e,r,n){var i;void 0!==t.insert&&(r&&(t.attr("aria-describedby",i="chart-desc-"+n),t.insert("desc",":first-child").attr("id",i).text(r)),e)&&(t.attr("aria-labelledby",i="chart-title-"+n),t.insert("title",":first-child").attr("id",i).text(e))}al(),NF(),Ae(XIt,"setA11yDiagramInfo"),Ae(KIt,"addSVGa11yTitleDescription");var ZIt=Ae(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function QIt(t){return"u">16&255),a.push(i>>8&255),a.push(255&i)),i=i<<6|n.indexOf(e.charAt(s));return 0==(t=r%4*6)?(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)):18==t?(a.push(i>>10&255),a.push(i>>2&255)):12==t&&a.push(i>>4&255),new Uint8Array(a)}function KMt(t){for(var e,r="",n=0,i=t.length,a=HMt,s=0;s>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]),n=(n<<8)+t[s];return 0==(e=i%3)?r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]:2==e?r=(r=(r=(r+=a[n>>10&63])+a[n>>4&63])+a[n<<2&63])+a[64]:1==e&&(r=(r=(r=(r+=a[n>>2&63])+a[n<<4&63])+a[64])+a[64]),r}function ZMt(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}Ae(VMt,"resolveYamlBinary"),Ae(XMt,"constructYamlBinary"),Ae(KMt,"representYamlBinary"),Ae(ZMt,"isBinary");var zMt=new mMt("tag:yaml.org,2002:binary",{kind:"scalar",resolve:VMt,construct:XMt,predicate:ZMt,represent:KMt}),QMt=Object.prototype.hasOwnProperty,JMt=Object.prototype.toString;function tRt(t){if(null!==t)for(var e,r,n,i=[],a=t,s=0,o=a.length;s>10),56320+(t-65536&1023))}Ae(ERt,"_class"),Ae(SRt,"is_EOL"),Ae(CRt,"is_WHITE_SPACE"),Ae(ARt,"is_WS_OR_EOL"),Ae(LRt,"is_FLOW_INDICATOR"),Ae(NRt,"fromHexCode"),Ae(IRt,"escapedHexLen"),Ae(MRt,"fromDecimalCode"),Ae(RRt,"simpleEscapeSequence"),Ae(DRt,"charFromCodepoint");for(var ORt=new Array(256),PRt=new Array(256),BRt=0;BRt<256;BRt++)ORt[BRt]=RRt(BRt)?1:0,PRt[BRt]=RRt(BRt);function FRt(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||uRt,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function $Rt(t,e){return(t={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart}).snippet=uMt(t),new oMt(e,t)}function zRt(t,e){throw $Rt(t,e)}function qRt(t,e){t.onWarning&&t.onWarning.call(null,$Rt(t,e))}Ae(FRt,"State$1"),Ae($Rt,"generateError"),Ae(zRt,"throwError"),Ae(qRt,"throwWarning");var URt={YAML:Ae(function(t,e,r){var n,i;null!==t.version&&zRt(t,"duplication of %YAML directive"),1!==r.length&&zRt(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&zRt(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),i=parseInt(i[2],10),1!==n&&zRt(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=i<2,1!==i&&2!==i&&qRt(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:Ae(function(t,e,r){var n;2!==r.length&&zRt(t,"TAG directive accepts exactly two arguments"),n=r[0],r=r[1],TRt.test(n)||zRt(t,"ill-formed tag handle (first argument) of the TAG directive"),dRt.call(t.tagMap,n)&&zRt(t,'there is a previously declared suffix for "'+n+'" tag handle'),_Rt.test(r)||zRt(t,"ill-formed tag prefix (second argument) of the TAG directive");try{r=decodeURIComponent(r)}catch{zRt(t,"tag prefix is malformed: "+r)}t.tagMap[n]=r},"handleTagDirective")};function jRt(t,e,r,n){var i,a,s,o;if(e=e){s=!0,d=t.input.charCodeAt(t.position);continue}t.position=a,t.line=o,t.lineStart=l,t.lineIndent=c;break}}s&&(jRt(t,i,a,!1),XRt(t,t.line-o),i=a=t.position,s=!1),CRt(d)||(a=t.position+1),d=t.input.charCodeAt(++t.position)}return jRt(t,i,a,!1),!!t.result||(t.kind=h,t.result=u,!1)}function ZRt(t,e){var r,n,i=t.input.charCodeAt(t.position);if(39!==i)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(i=t.input.charCodeAt(t.position));)if(39===i){if(jRt(t,r,t.position,!0),39!==(i=t.input.charCodeAt(++t.position)))return!0;r=t.position,t.position++,n=t.position}else SRt(i)?(jRt(t,r,n,!0),XRt(t,HRt(t,!1,e)),r=n=t.position):t.position===t.lineStart&&VRt(t)?zRt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);zRt(t,"unexpected end of the stream within a single quoted scalar")}function QRt(t,e){var r,n,i,a,s,o=t.input.charCodeAt(t.position);if(34!==o)return!1;for(t.kind="scalar",t.result="",t.position++,r=n=t.position;0!==(o=t.input.charCodeAt(t.position));){if(34===o)return jRt(t,r,t.position,!0),t.position++,!0;if(92===o){if(jRt(t,r,t.position,!0),SRt(o=t.input.charCodeAt(++t.position)))HRt(t,!1,e);else if(o<256&&ORt[o])t.result+=PRt[o],t.position++;else if(0<(s=IRt(o))){for(i=s,a=0;0l&&(l=t.lineIndent),SRt(u))c++;else{if(t.lineIndente)&&0!==n)zRt(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(s=t.line,o=t.lineStart,l=t.position),sDt(t,e,mRt,!0,i)&&(y?f=t.result:m=t.result),y||(WRt(t,d,p,g,f,m,s,o,l),g=f=m=null),HRt(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)zRt(t,"bad indentation of a mapping entry");else if(t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&zRt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):zRt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function oDt(t){var e,r,n,i,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(HRt(t,!0,-1),i=t.input.charCodeAt(t.position),!(0=i.flowLevel;function n(t){return _Dt(i,t)}switch(Ae(n,"testAmbiguity"),FDt(a,r,i.indent,e,n,i.quotingType,i.forceQuotes&&!o,l)){case RDt:return a;case DDt:return"'"+a.replace(/'/g,"''")+"'";case ODt:return"|"+zDt(a,i.indent)+qDt(kDt(a,t));case PDt:return">"+zDt(a,i.indent)+qDt(kDt(UDt(a,e),t));case BDt:return'"'+GDt(a)+'"';default:throw new oMt("impossible error: invalid scalar style")}}()}function zDt(t,e){var e=MDt(t)?String(e):"",r=t[t.length-1]===` +`;return e+(!r||t[t.length-2]!==` +`&&t!==` +`?r?"":"-":"+")+` +`}function qDt(t){return t[t.length-1]===` +`?t.slice(0,-1):t}function UDt(t,e){for(var r,n=/(\n+)([^\n]*)/g,i=(r=-1!==(r=t.indexOf(` +`))?r:t.length,n.lastIndex=r,jDt(t.slice(0,r),e)),a=t[0]===` +`||" "===t[0];o=n.exec(t);){var s=o[1],o=o[2],l=" "===o[0];i+=s+(a||l||""===o?"":` +`)+jDt(o,e),a=l}return i}function jDt(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,a=0,s=0,o="";n=i.exec(t);)e<(n=n.index)-a&&(o+=` +`+t.slice(a,r=ae&&a tag resolver accepts not "'+a+'" style');n=i.represent[a](e,a)}t.dump=n}return!0}return!1}function KDt(t,e,r,n,i,a,s){t.tag=null,t.dump=r,XDt(t,r,!1)||XDt(t,r,!0);var o,l,c=uDt.call(t.dump),h=n,u=(n=n&&(t.flowLevel<0||t.flowLevel>e),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(o=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||l||2!==t.indent&&0",t.dump=r+" "+t.dump)}return!0}function ZDt(t,e){var r,n,i=[],a=[];for(QDt(t,i,a),r=0,n=a.length;rt.replace(/\r\n?/g,` +`).replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),iOt=Ae(t=>{var{text:t,metadata:e}=rOt(t),{displayMode:e,title:r,config:n={}}=e;return e&&(n.gantt||(n.gantt={}),n.gantt.displayMode=e),{title:r,config:n,text:t}},"processFrontmatter"),aOt=Ae(t=>{var e=Q8.detectInit(t)??{},r=Q8.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:R8(t),directive:e}},"processDirectives");function sOt(t){var e=nOt(t),e=iOt(e),r=aOt(e.text),n=S8(e.config,r.directive);return{code:t=ZIt(r.text),title:e.title,config:n}}function oOt(t){return t=(new TextEncoder).encode(t),t=Array.from(t,t=>String.fromCodePoint(t)).join(""),btoa(t)}Ae(sOt,"preprocessDiagram"),rT(),Ae(oOt,"toBase64"),Ze();var lOt=["foreignobject"],cOt=["dominant-baseline"];function hOt(t){return t=sOt(t),ze(),$e(t.config??{}),t}async function uOt(t,e){nIt();try{var r=hOt(t).code;return{diagramType:(await wOt(r)).type}}catch(t){if(e?.suppressErrors)return!1;throw t}}Ae(hOt,"processAndSetConfigs"),Ae(uOt,"parse");var dOt=Ae((t,e,r=[])=>` +.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),pOt=Ae((e,r=new Map)=>{let n="";if(void 0!==e.themeCSS&&(n+=` +`+e.themeCSS),void 0!==e.fontFamily&&(n+=` +:root { --mermaid-font-family: ${e.fontFamily}}`),void 0!==e.altFontFamily&&(n+=` +:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),r instanceof Map){let t=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(e=>{LF(e.styles)||t.forEach(t=>{n+=dOt(e.id,t,e.styles)}),LF(e.textStyles)||(n+=dOt(e.id,"tspan",(e?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return n},"createCssStyles"),gOt=Ae((t,e,r,n)=>(r=pOt(t,r),jIt(FIt(n+`{${il(e,r,t.themeVariables)}}`),GIt)),"createUserStyles"),fOt=Ae((t="",e,r)=>{let n=t;return r||e||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(n=tT(n)).replace(/
/g,"
")},"cleanUpSvgCode"),mOt=Ae((t="",e)=>``,"putIntoIFrame"),yOt=Ae((t,e,r,n,i)=>{var a=t.append("div"),r=(a.attr("id",r),n&&a.attr("style",n),a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return i&&r.attr("xmlns:xlink",i),r.append("g"),t},"appendDivSvgG");function vOt(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}Ae(vOt,"sandboxedIframe");var xOt=Ae((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),SMt=Ae(async function(t,e,r){nIt();var n=hOt(e),i=(e=n.code,Be());R.debug(i),e.length>(i?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let a="#"+t,s="i"+t,o="#"+s,l="d"+t,c="#"+l,h=Ae(()=>{var t=O(d?o:c).node();t&&"remove"in t&&t.remove()},"removeTempElements"),u=O("body"),d="sandbox"===i.securityLevel,p="loose"===i.securityLevel,g=i.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=vOt(O(r),s),(u=O(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=O(r),yOt(u,t,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(xOt(document,t,l,s),d?(y=vOt(O("body"),s),(u=O(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=O("body"),yOt(u,t,l));let f,m;try{f=await WIt.fromText(e,{title:n.title})}catch(r){if(i.suppressErrorRendering)throw h(),r;f=await WIt.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(n=r.firstChild).firstChild,v=f.renderer.getClasses?.(e,f),v=gOt(i,y,v,a),x=document.createElement("style");x.innerHTML=v,n.insertBefore(x,r);try{await f.renderer.draw(e,t,p0t,f)}catch(r){throw i.suppressErrorRendering?h():HNt.draw(e,t,p0t),r}kOt(y,u.select(c+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=u.select(c).node().innerHTML;if(R.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),b=fOt(b,d,$o(i.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=mOt(b,v)):p||(b=VIt.default.sanitize(b,{ADD_TAGS:lOt,ADD_ATTR:cOt})),HIt(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function bOt(t={}){(t=ct({},t))?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Re(t),t?.theme&&t.theme in ye?t.themeVariables=ye[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ye.default.getThemeVariables(t.themeVariables)),t="object"==typeof t?Me(t):Oe(),q(t.logLevel),nIt()}Ae(bOt,"initialize");var wOt=Ae((t,e={})=>(t=sOt(t).code,WIt.fromText(t,e)),"getDiagramFromText");function kOt(t,e,r,n){XIt(e,t),KIt(e,r,n,e.attr("id"))}Ae(kOt,"addA11yInfo");var TOt=Object.freeze({render:SMt,parse:uOt,getDiagramFromText:wOt,initialize:bOt,getConfig:Be,setConfig:Pe,getSiteConfig:Oe,updateSiteConfig:De,reset:Ae(()=>{ze()},"reset"),globalReset:Ae(()=>{ze(Ee)},"globalReset"),defaultConfig:Ee}),_Ot=(q(Be().logLevel),ze(Be()),lW(),rT(),Ae((t,e,r)=>{R.warn(t),E8(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError")),EOt=Ae(async function(e={querySelector:".mermaid"}){try{await SOt(e)}catch(t){if(E8(t)&&R.error(t.str),MOt.parseError&&MOt.parseError(t),!e.suppressErrors)throw R.error("Use the suppressErrors option to suppress these errors"),t}},"run"),SOt=Ae(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){var n=TOt.getConfig();R.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}R.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(R.debug("Start On Load: "+n?.startOnLoad),TOt.updateSiteConfig({startOnLoad:n?.startOnLoad}));var a,s=new Q8.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o=[];for(a of Array.from(i))if(R.info("Rendering diagram: "+a.id),!a.getAttribute("data-processed")){a.setAttribute("data-processed","true");var l="mermaid-"+s.next(),c=a.innerHTML,h=(c=F(Q8.entityDecode(c)).trim().replace(//gi,"
"),Q8.detectInit(c));h&&R.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await IOt(l,c,a);a.innerHTML=u,t&&await t(l),d&&d(a)}catch(t){_Ot(t,o,MOt.parseError)}}if(0{nIt(),rt(...t),!1===e&&await iIt()},"registerExternalDiagrams"),rRt=Ae(function(){MOt.startOnLoad&&TOt.getConfig().startOnLoad&&MOt.run().catch(t=>R.error("Mermaid failed to initialize",t))},"contentLoaded"),sRt=(typeof document<"u"&&window.addEventListener("load",rRt,!1),Ae(function(t){MOt.parseError=t},"setParseErrorHandler")),AOt=[],LOt=!1,NOt=Ae(async()=>{if(!LOt){for(LOt=!0;0new Promise((n,i)=>{var t=Ae(()=>new Promise((e,r)=>{TOt.parse(a,s).then(t=>{e(t),n(t)},t=>{R.error("Error parsing",t),MOt.parseError?.(t),r(t),i(t)})}),"performCall");AOt.push(t),NOt().catch(i)}),"parse"),IOt=Ae((a,s,o)=>new Promise((n,i)=>{var t=Ae(()=>new Promise((e,r)=>{TOt.render(a,s,o).then(t=>{e(t),n(t)},t=>{R.error("Error parsing",t),MOt.parseError?.(t),r(t),i(t)})}),"performCall");AOt.push(t),NOt().catch(i)}),"render"),MOt={startOnLoad:!0,mermaidAPI:TOt,parse:hRt,render:IOt,init:RMt,run:EOt,registerExternalDiagrams:zMt,registerLayoutLoaders:HG,initialize:COt,parseError:void 0,contentLoaded:rRt,setParseErrorHandler:sRt,detectType:et},ROt=MOt;return A=C,N(s({},"__esModule",{value:!0}),A)})();globalThis.mermaid=globalThis.__esbuild_esm_mermaid.default; diff --git a/templates/partials/content_security_policy.html b/templates/partials/content_security_policy.html index 08b4f5d11..cb2eb79b5 100644 --- a/templates/partials/content_security_policy.html +++ b/templates/partials/content_security_policy.html @@ -7,6 +7,10 @@ {%- set giscus_enabled = config.extra.giscus.enabled_for_all_posts or page.extra.giscus -%} {%- set hyvortalk_enabled = config.extra.hyvortalk.enabled_for_all_posts or page.extra.hyvortalk -%} {%- set isso_enabled = config.extra.isso.enabled_for_all_posts or page.extra.isso -%} + {%- if page -%} + {%- set mermaid_enabled = macros_settings::evaluate_setting_priority(setting="mermaid", page=page, default_global_value=false) == "true" -%} + {%- endif -%} + {%- set serve_local_mermaid = config.extra.serve_local_mermaid | default(value=true) -%} {#- Initialise a base script-src directive -#} {%- set script_src = "script-src 'self'" -%} @@ -46,6 +50,10 @@ {%- set script_src = script_src ~ " " ~ " utteranc.es" -%} {%- endif -%} + {%- if mermaid_enabled and not serve_local_mermaid -%} + {%- set script_src = script_src ~ " " ~ " cdn.jsdelivr.net" -%} + {%- endif -%} + {#- Append WebSocket for Zola serve mode -#} {%- if config.mode == "serve" -%} {%- set connect_src = connect_src ~ " ws:" -%} @@ -67,8 +75,13 @@ {#- Handle directives that are not connect-src -#} {{ domain.directive }} {{ domain.domains | join(sep=' ') -}} - {%- if utterances_enabled or hyvortalk_enabled -%} - {%- if domain.directive == "style-src" %} 'unsafe-inline' + {%- if domain.directive == "style-src" -%} + {%- if utterances_enabled or hyvortalk_enabled or mermaid_enabled %} 'unsafe-inline' + {%- endif -%} + {%- endif -%} + + {%- if domain.directive == "font-src" -%} + {%- if mermaid_enabled %} 'self' {%- endif -%} {%- endif -%} diff --git a/templates/partials/extra_features.html b/templates/partials/extra_features.html index e0671e4eb..ad0080da4 100644 --- a/templates/partials/extra_features.html +++ b/templates/partials/extra_features.html @@ -35,6 +35,15 @@ {%- endif -%} +{# Load mermaid.js #} +{%- if macros_settings::evaluate_setting_priority(setting="mermaid", page=page, default_global_value=false) == "true" -%} + {%- if config.extra.serve_local_mermaid | default(value=true) -%} + + {%- else -%} + + {%- endif -%} +{%- endif -%} + {# Add copy button to code blocks #} {%- if macros_settings::evaluate_setting_priority(setting="copy_button", page=page, default_global_value=true) == "true" -%} {#- Add hidden HTML elements with the translated strings for the button's interactions -#} diff --git a/templates/shortcodes/mermaid.html b/templates/shortcodes/mermaid.html new file mode 100644 index 000000000..88bbdc458 --- /dev/null +++ b/templates/shortcodes/mermaid.html @@ -0,0 +1,8 @@ +{% set invertible = invertible | default(value=true) %} +{% set full_width = full_width | default(value=false) %} + +
+    {{ body | safe }}
+
diff --git a/theme.toml b/theme.toml index 6e73bf96f..f6a5207c9 100644 --- a/theme.toml +++ b/theme.toml @@ -119,6 +119,15 @@ footnote_backlinks = false # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy katex = false +# Enable Mermaid diagrams. +# Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy +mermaid = false + +# Serve Mermaid JavaScript locally. +# If set to false, it will load the latest version from JSDelivr. +# Only relevant when `mermaid = true`. +serve_local_mermaid = true + # Show links to previous and next articles at the bottom of posts. # Can be set at page or section levels, following the hierarchy: page > section > config. See: https://welpo.github.io/tabi/blog/mastering-tabi-settings/#settings-hierarchy show_previous_next_article_links = false