Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitignore +12 -0
- README.md +482 -12
- __init__.py +0 -0
- app.py +104 -0
- css.css +157 -0
- requirements.txt +1 -0
- space.py +226 -0
- src/.gitignore +12 -0
- src/.gradio/certificate.pem +31 -0
- src/.vscode/launch.json +17 -0
- src/README.md +482 -0
- src/backend/gradio_tokenizertextbox/__init__.py +4 -0
- src/backend/gradio_tokenizertextbox/templates/component/Index-DiS7y4tI.js +0 -0
- src/backend/gradio_tokenizertextbox/templates/component/_basePickBy-CApE71AJ.js +151 -0
- src/backend/gradio_tokenizertextbox/templates/component/_baseUniq-_084E1r1.js +614 -0
- src/backend/gradio_tokenizertextbox/templates/component/arc-CD-swOK-.js +83 -0
- src/backend/gradio_tokenizertextbox/templates/component/architectureDiagram-KYWUMXXP-DfMVYVBl.js +0 -0
- src/backend/gradio_tokenizertextbox/templates/component/blockDiagram-ZUX3OVTL-DdsqIV7C.js +0 -0
- src/backend/gradio_tokenizertextbox/templates/component/c4Diagram-E5VUS4TQ-RzspGqYz.js +1581 -0
- src/backend/gradio_tokenizertextbox/templates/component/channel-DO4s0fWC.js +5 -0
- src/backend/gradio_tokenizertextbox/templates/component/chunk-44GW5IO5-I0mkHKCJ.js +9 -0
- src/backend/gradio_tokenizertextbox/templates/component/chunk-BQPDZTM5-BDSGaJp-.js +15 -0
- src/backend/gradio_tokenizertextbox/templates/component/chunk-GOYUR5SG-5KV7imez.js +1381 -0
- src/backend/gradio_tokenizertextbox/templates/component/chunk-HPOVUXKZ-Dn5Xnpaz.js +24 -0
- src/backend/gradio_tokenizertextbox/templates/component/chunk-UIWBPB2F-DCnPuFaH.js +19 -0
- src/backend/gradio_tokenizertextbox/templates/component/chunk-WZLT4MVT-Cpjjsmu7.js +64 -0
- src/backend/gradio_tokenizertextbox/templates/component/chunk-YQZZRAKN-B2br4HuY.js +1374 -0
- src/backend/gradio_tokenizertextbox/templates/component/classDiagram-EGQPL23Y-BIUZ9-Wz.js +16 -0
- src/backend/gradio_tokenizertextbox/templates/component/classDiagram-v2-4EBKGCBT-BIUZ9-Wz.js +16 -0
- src/backend/gradio_tokenizertextbox/templates/component/clone-BFXwIeh2.js +8 -0
- src/backend/gradio_tokenizertextbox/templates/component/cytoscape.esm-C2cgT2B2.js +0 -0
- src/backend/gradio_tokenizertextbox/templates/component/dagre-IE2X5DAH-duWuOiqv.js +447 -0
- src/backend/gradio_tokenizertextbox/templates/component/diagram-3XXCIKAB-xC1Rc_FE.js +137 -0
- src/backend/gradio_tokenizertextbox/templates/component/diagram-DTTGSU4T-D0Xgb2P5.js +221 -0
- src/backend/gradio_tokenizertextbox/templates/component/erDiagram-FWMTN743-CXWkY-HF.js +841 -0
- src/backend/gradio_tokenizertextbox/templates/component/flowDiagram-OUUYVNGO-y3hFWJ8o.js +1626 -0
- src/backend/gradio_tokenizertextbox/templates/component/ganttDiagram-Y4ZJHTSR-54wJrCeT.js +2502 -0
- src/backend/gradio_tokenizertextbox/templates/component/gitGraphDiagram-SOPYED2O-CZf1STxn.js +712 -0
- src/backend/gradio_tokenizertextbox/templates/component/graph-By8AcOsS.js +247 -0
- src/backend/gradio_tokenizertextbox/templates/component/index.js +6 -0
- src/backend/gradio_tokenizertextbox/templates/component/infoDiagram-LZPS564M-C96RKYDG.js +24 -0
- src/backend/gradio_tokenizertextbox/templates/component/init-DjUOC4st.js +16 -0
- src/backend/gradio_tokenizertextbox/templates/component/journeyDiagram-KRBQ73NG-_ijLByyQ.js +836 -0
- src/backend/gradio_tokenizertextbox/templates/component/kanban-definition-TWHLSRP4-WOynQC1E.js +720 -0
- src/backend/gradio_tokenizertextbox/templates/component/layout-By9VfgKH.js +1324 -0
- src/backend/gradio_tokenizertextbox/templates/component/linear-Cldj0_Rh.js +423 -0
- src/backend/gradio_tokenizertextbox/templates/component/mermaid.core-CfPtPiLZ.js +0 -0
- src/backend/gradio_tokenizertextbox/templates/component/mindmap-definition-RDSO3R44-CF6GctCt.js +0 -0
- src/backend/gradio_tokenizertextbox/templates/component/ordinal-DfAQgscy.js +61 -0
- src/backend/gradio_tokenizertextbox/templates/component/pieDiagram-JVH3GP2A-KTfGFEz1.js +161 -0
.gitignore
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.eggs/
|
| 2 |
+
dist/
|
| 3 |
+
*.pyc
|
| 4 |
+
__pycache__/
|
| 5 |
+
*.py[cod]
|
| 6 |
+
*$py.class
|
| 7 |
+
__tmp/*
|
| 8 |
+
*.pyi
|
| 9 |
+
.mypycache
|
| 10 |
+
.ruff_cache
|
| 11 |
+
node_modules
|
| 12 |
+
backend/**/templates/
|
README.md
CHANGED
|
@@ -1,12 +1,482 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
---
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags: [gradio-custom-component, TextBox, textbox]
|
| 3 |
+
title: gradio_tokenizertextbox
|
| 4 |
+
short_description: Textbox tokenizer
|
| 5 |
+
colorFrom: blue
|
| 6 |
+
colorTo: yellow
|
| 7 |
+
sdk: gradio
|
| 8 |
+
pinned: false
|
| 9 |
+
app_file: space.py
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# `gradio_tokenizertextbox`
|
| 13 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.1%20-%20orange">
|
| 14 |
+
|
| 15 |
+
Textbox tokenizer
|
| 16 |
+
|
| 17 |
+
## Installation
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
pip install gradio_tokenizertextbox
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
## Usage
|
| 24 |
+
|
| 25 |
+
```python
|
| 26 |
+
#
|
| 27 |
+
# demo/app.py
|
| 28 |
+
#
|
| 29 |
+
import gradio as gr
|
| 30 |
+
from gradio_tokenizertextbox import TokenizerTextBox
|
| 31 |
+
import json
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
TOKENIZER_OPTIONS = {
|
| 36 |
+
"Xenova/clip-vit-large-patch14": "CLIP ViT-L/14",
|
| 37 |
+
"Xenova/gpt-4": "gpt-4 / gpt-3.5-turbo / text-embedding-ada-002",
|
| 38 |
+
"Xenova/text-davinci-003": "text-davinci-003 / text-davinci-002",
|
| 39 |
+
"Xenova/gpt-3": "gpt-3",
|
| 40 |
+
"Xenova/grok-1-tokenizer": "Grok-1",
|
| 41 |
+
"Xenova/claude-tokenizer": "Claude",
|
| 42 |
+
"Xenova/mistral-tokenizer-v3": "Mistral v3",
|
| 43 |
+
"Xenova/mistral-tokenizer-v1": "Mistral v1",
|
| 44 |
+
"Xenova/gemma-tokenizer": "Gemma",
|
| 45 |
+
"Xenova/llama-3-tokenizer": "Llama 3",
|
| 46 |
+
"Xenova/llama-tokenizer": "LLaMA / Llama 2",
|
| 47 |
+
"Xenova/c4ai-command-r-v01-tokenizer": "Cohere Command-R",
|
| 48 |
+
"Xenova/t5-small": "T5",
|
| 49 |
+
"Xenova/bert-base-cased": "bert-base-cased",
|
| 50 |
+
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
# 2. Prepare the choices for the gr.Dropdown component
|
| 54 |
+
# The format is a list of tuples: [(display_name, internal_value)]
|
| 55 |
+
dropdown_choices = [
|
| 56 |
+
(display_name, model_name)
|
| 57 |
+
for model_name, display_name in TOKENIZER_OPTIONS.items()
|
| 58 |
+
]
|
| 59 |
+
|
| 60 |
+
def process_output(tokenization_data):
|
| 61 |
+
"""
|
| 62 |
+
This function receives the full dictionary from the component.
|
| 63 |
+
"""
|
| 64 |
+
if not tokenization_data:
|
| 65 |
+
return {"status": "Waiting for input..."}
|
| 66 |
+
return tokenization_data
|
| 67 |
+
|
| 68 |
+
# --- Gradio Application ---
|
| 69 |
+
with gr.Blocks() as demo:
|
| 70 |
+
gr.Markdown("# TokenizerTextBox Component Demo")
|
| 71 |
+
gr.Markdown("# Component idea taken from the original example application on [Xenova Tokenizer Playground](https://github.com/huggingface/transformers.js-examples/tree/main/the-tokenizer-playground) ")
|
| 72 |
+
gr.Markdown("## Select a tokenizer from the dropdown menu to see how it processes your text in real-time.")
|
| 73 |
+
gr.Markdown("## For more models, check out the [Xenova Transformers Models](https://huggingface.co/Xenova/models) page.")
|
| 74 |
+
|
| 75 |
+
with gr.Row():
|
| 76 |
+
# 3. Create the Dropdown for model selection
|
| 77 |
+
model_selector = gr.Dropdown(
|
| 78 |
+
label="Select a Tokenizer",
|
| 79 |
+
choices=dropdown_choices,
|
| 80 |
+
value="Xenova/clip-vit-large-patch14", # Set a default value
|
| 81 |
+
)
|
| 82 |
+
|
| 83 |
+
display_mode_radio = gr.Radio(
|
| 84 |
+
["text", "token_ids", "hidden"],
|
| 85 |
+
label="Display Mode",
|
| 86 |
+
value="text"
|
| 87 |
+
)
|
| 88 |
+
|
| 89 |
+
# 4. Initialize the component with a default model
|
| 90 |
+
tokenizer_input = TokenizerTextBox(
|
| 91 |
+
label="Type your text here",
|
| 92 |
+
value="Gradio is an awesome tool for building ML demos!",
|
| 93 |
+
model="Xenova/clip-vit-large-patch14", # Must match the dropdown's default value
|
| 94 |
+
display_mode="text",
|
| 95 |
+
)
|
| 96 |
+
|
| 97 |
+
output_info = gr.JSON(label="Component Output (from preprocess)")
|
| 98 |
+
|
| 99 |
+
# --- Event Listeners ---
|
| 100 |
+
|
| 101 |
+
# A. When the tokenizer component changes, update the JSON output
|
| 102 |
+
tokenizer_input.change(
|
| 103 |
+
fn=process_output,
|
| 104 |
+
inputs=tokenizer_input,
|
| 105 |
+
outputs=output_info
|
| 106 |
+
)
|
| 107 |
+
|
| 108 |
+
# B. When the dropdown value changes, update the 'model' prop of our component
|
| 109 |
+
def update_tokenizer_model(selected_model):
|
| 110 |
+
return gr.update(model=selected_model)
|
| 111 |
+
|
| 112 |
+
model_selector.change(
|
| 113 |
+
fn=update_tokenizer_model,
|
| 114 |
+
inputs=model_selector,
|
| 115 |
+
outputs=tokenizer_input
|
| 116 |
+
)
|
| 117 |
+
|
| 118 |
+
# C. When the radio button value changes, update the 'display_mode' prop
|
| 119 |
+
def update_display_mode(mode):
|
| 120 |
+
return gr.update(display_mode=mode)
|
| 121 |
+
|
| 122 |
+
display_mode_radio.change(
|
| 123 |
+
fn=update_display_mode,
|
| 124 |
+
inputs=display_mode_radio,
|
| 125 |
+
outputs=tokenizer_input
|
| 126 |
+
)
|
| 127 |
+
|
| 128 |
+
if __name__ == '__main__':
|
| 129 |
+
demo.launch()
|
| 130 |
+
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
## `TokenizerTextBox`
|
| 134 |
+
|
| 135 |
+
### Initialization
|
| 136 |
+
|
| 137 |
+
<table>
|
| 138 |
+
<thead>
|
| 139 |
+
<tr>
|
| 140 |
+
<th align="left">name</th>
|
| 141 |
+
<th align="left" style="width: 25%;">type</th>
|
| 142 |
+
<th align="left">default</th>
|
| 143 |
+
<th align="left">description</th>
|
| 144 |
+
</tr>
|
| 145 |
+
</thead>
|
| 146 |
+
<tbody>
|
| 147 |
+
<tr>
|
| 148 |
+
<td align="left"><code>value</code></td>
|
| 149 |
+
<td align="left" style="width: 25%;">
|
| 150 |
+
|
| 151 |
+
```python
|
| 152 |
+
typing.Union[str, dict, typing.Callable, NoneType][
|
| 153 |
+
str, dict, Callable, None
|
| 154 |
+
]
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
</td>
|
| 158 |
+
<td align="left"><code>None</code></td>
|
| 159 |
+
<td align="left">The initial value. Can be a string to initialize the text, or a dictionary for full state. If a function is provided, it will be called when the app loads to set the initial value.</td>
|
| 160 |
+
</tr>
|
| 161 |
+
|
| 162 |
+
<tr>
|
| 163 |
+
<td align="left"><code>model</code></td>
|
| 164 |
+
<td align="left" style="width: 25%;">
|
| 165 |
+
|
| 166 |
+
```python
|
| 167 |
+
str
|
| 168 |
+
```
|
| 169 |
+
|
| 170 |
+
</td>
|
| 171 |
+
<td align="left"><code>"Xenova/gpt-3"</code></td>
|
| 172 |
+
<td align="left">The name of a Hugging Face tokenizer to use (must be compatible with Transformers.js). Defaults to "Xenova/gpt-2".</td>
|
| 173 |
+
</tr>
|
| 174 |
+
|
| 175 |
+
<tr>
|
| 176 |
+
<td align="left"><code>display_mode</code></td>
|
| 177 |
+
<td align="left" style="width: 25%;">
|
| 178 |
+
|
| 179 |
+
```python
|
| 180 |
+
"text" | "token_ids" | "hidden"
|
| 181 |
+
```
|
| 182 |
+
|
| 183 |
+
</td>
|
| 184 |
+
<td align="left"><code>"text"</code></td>
|
| 185 |
+
<td align="left">Controls the content of the token visualization panel. Can be 'text' (default), 'token_ids', or 'hidden'.</td>
|
| 186 |
+
</tr>
|
| 187 |
+
|
| 188 |
+
<tr>
|
| 189 |
+
<td align="left"><code>lines</code></td>
|
| 190 |
+
<td align="left" style="width: 25%;">
|
| 191 |
+
|
| 192 |
+
```python
|
| 193 |
+
int
|
| 194 |
+
```
|
| 195 |
+
|
| 196 |
+
</td>
|
| 197 |
+
<td align="left"><code>2</code></td>
|
| 198 |
+
<td align="left">The minimum number of line rows for the textarea.</td>
|
| 199 |
+
</tr>
|
| 200 |
+
|
| 201 |
+
<tr>
|
| 202 |
+
<td align="left"><code>max_lines</code></td>
|
| 203 |
+
<td align="left" style="width: 25%;">
|
| 204 |
+
|
| 205 |
+
```python
|
| 206 |
+
int | None
|
| 207 |
+
```
|
| 208 |
+
|
| 209 |
+
</td>
|
| 210 |
+
<td align="left"><code>None</code></td>
|
| 211 |
+
<td align="left">The maximum number of line rows for the textarea.</td>
|
| 212 |
+
</tr>
|
| 213 |
+
|
| 214 |
+
<tr>
|
| 215 |
+
<td align="left"><code>placeholder</code></td>
|
| 216 |
+
<td align="left" style="width: 25%;">
|
| 217 |
+
|
| 218 |
+
```python
|
| 219 |
+
str | None
|
| 220 |
+
```
|
| 221 |
+
|
| 222 |
+
</td>
|
| 223 |
+
<td align="left"><code>None</code></td>
|
| 224 |
+
<td align="left">A placeholder hint to display in the textarea when it is empty.</td>
|
| 225 |
+
</tr>
|
| 226 |
+
|
| 227 |
+
<tr>
|
| 228 |
+
<td align="left"><code>autofocus</code></td>
|
| 229 |
+
<td align="left" style="width: 25%;">
|
| 230 |
+
|
| 231 |
+
```python
|
| 232 |
+
bool
|
| 233 |
+
```
|
| 234 |
+
|
| 235 |
+
</td>
|
| 236 |
+
<td align="left"><code>False</code></td>
|
| 237 |
+
<td align="left">If True, will focus on the textbox when the page loads.</td>
|
| 238 |
+
</tr>
|
| 239 |
+
|
| 240 |
+
<tr>
|
| 241 |
+
<td align="left"><code>autoscroll</code></td>
|
| 242 |
+
<td align="left" style="width: 25%;">
|
| 243 |
+
|
| 244 |
+
```python
|
| 245 |
+
bool
|
| 246 |
+
```
|
| 247 |
+
|
| 248 |
+
</td>
|
| 249 |
+
<td align="left"><code>True</code></td>
|
| 250 |
+
<td align="left">If True, will automatically scroll to the bottom of the textbox when the value changes.</td>
|
| 251 |
+
</tr>
|
| 252 |
+
|
| 253 |
+
<tr>
|
| 254 |
+
<td align="left"><code>text_align</code></td>
|
| 255 |
+
<td align="left" style="width: 25%;">
|
| 256 |
+
|
| 257 |
+
```python
|
| 258 |
+
typing.Optional[typing.Literal["left", "right"]][
|
| 259 |
+
"left" | "right", None
|
| 260 |
+
]
|
| 261 |
+
```
|
| 262 |
+
|
| 263 |
+
</td>
|
| 264 |
+
<td align="left"><code>None</code></td>
|
| 265 |
+
<td align="left">How to align the text in the textbox, can be: "left" or "right".</td>
|
| 266 |
+
</tr>
|
| 267 |
+
|
| 268 |
+
<tr>
|
| 269 |
+
<td align="left"><code>rtl</code></td>
|
| 270 |
+
<td align="left" style="width: 25%;">
|
| 271 |
+
|
| 272 |
+
```python
|
| 273 |
+
bool
|
| 274 |
+
```
|
| 275 |
+
|
| 276 |
+
</td>
|
| 277 |
+
<td align="left"><code>False</code></td>
|
| 278 |
+
<td align="left">If True, sets the direction of the text to right-to-left.</td>
|
| 279 |
+
</tr>
|
| 280 |
+
|
| 281 |
+
<tr>
|
| 282 |
+
<td align="left"><code>show_copy_button</code></td>
|
| 283 |
+
<td align="left" style="width: 25%;">
|
| 284 |
+
|
| 285 |
+
```python
|
| 286 |
+
bool
|
| 287 |
+
```
|
| 288 |
+
|
| 289 |
+
</td>
|
| 290 |
+
<td align="left"><code>False</code></td>
|
| 291 |
+
<td align="left">If True, a copy button will be shown.</td>
|
| 292 |
+
</tr>
|
| 293 |
+
|
| 294 |
+
<tr>
|
| 295 |
+
<td align="left"><code>max_length</code></td>
|
| 296 |
+
<td align="left" style="width: 25%;">
|
| 297 |
+
|
| 298 |
+
```python
|
| 299 |
+
int | None
|
| 300 |
+
```
|
| 301 |
+
|
| 302 |
+
</td>
|
| 303 |
+
<td align="left"><code>None</code></td>
|
| 304 |
+
<td align="left">The maximum number of characters allowed in the textbox.</td>
|
| 305 |
+
</tr>
|
| 306 |
+
|
| 307 |
+
<tr>
|
| 308 |
+
<td align="left"><code>label</code></td>
|
| 309 |
+
<td align="left" style="width: 25%;">
|
| 310 |
+
|
| 311 |
+
```python
|
| 312 |
+
str | None
|
| 313 |
+
```
|
| 314 |
+
|
| 315 |
+
</td>
|
| 316 |
+
<td align="left"><code>None</code></td>
|
| 317 |
+
<td align="left">The label for this component, displayed above the component.</td>
|
| 318 |
+
</tr>
|
| 319 |
+
|
| 320 |
+
<tr>
|
| 321 |
+
<td align="left"><code>info</code></td>
|
| 322 |
+
<td align="left" style="width: 25%;">
|
| 323 |
+
|
| 324 |
+
```python
|
| 325 |
+
str | None
|
| 326 |
+
```
|
| 327 |
+
|
| 328 |
+
</td>
|
| 329 |
+
<td align="left"><code>None</code></td>
|
| 330 |
+
<td align="left">Additional component description, displayed below the label.</td>
|
| 331 |
+
</tr>
|
| 332 |
+
|
| 333 |
+
<tr>
|
| 334 |
+
<td align="left"><code>every</code></td>
|
| 335 |
+
<td align="left" style="width: 25%;">
|
| 336 |
+
|
| 337 |
+
```python
|
| 338 |
+
float | None
|
| 339 |
+
```
|
| 340 |
+
|
| 341 |
+
</td>
|
| 342 |
+
<td align="left"><code>None</code></td>
|
| 343 |
+
<td align="left">If `value` is a callable, this sets a timer to run the function repeatedly.</td>
|
| 344 |
+
</tr>
|
| 345 |
+
|
| 346 |
+
<tr>
|
| 347 |
+
<td align="left"><code>show_label</code></td>
|
| 348 |
+
<td align="left" style="width: 25%;">
|
| 349 |
+
|
| 350 |
+
```python
|
| 351 |
+
bool
|
| 352 |
+
```
|
| 353 |
+
|
| 354 |
+
</td>
|
| 355 |
+
<td align="left"><code>True</code></td>
|
| 356 |
+
<td align="left">If False, the label is not displayed.</td>
|
| 357 |
+
</tr>
|
| 358 |
+
|
| 359 |
+
<tr>
|
| 360 |
+
<td align="left"><code>container</code></td>
|
| 361 |
+
<td align="left" style="width: 25%;">
|
| 362 |
+
|
| 363 |
+
```python
|
| 364 |
+
bool
|
| 365 |
+
```
|
| 366 |
+
|
| 367 |
+
</td>
|
| 368 |
+
<td align="left"><code>True</code></td>
|
| 369 |
+
<td align="left">If False, the component will not be wrapped in a container.</td>
|
| 370 |
+
</tr>
|
| 371 |
+
|
| 372 |
+
<tr>
|
| 373 |
+
<td align="left"><code>scale</code></td>
|
| 374 |
+
<td align="left" style="width: 25%;">
|
| 375 |
+
|
| 376 |
+
```python
|
| 377 |
+
int | None
|
| 378 |
+
```
|
| 379 |
+
|
| 380 |
+
</td>
|
| 381 |
+
<td align="left"><code>None</code></td>
|
| 382 |
+
<td align="left">The relative size of the component compared to others in a `gr.Row` or `gr.Column`.</td>
|
| 383 |
+
</tr>
|
| 384 |
+
|
| 385 |
+
<tr>
|
| 386 |
+
<td align="left"><code>min_width</code></td>
|
| 387 |
+
<td align="left" style="width: 25%;">
|
| 388 |
+
|
| 389 |
+
```python
|
| 390 |
+
int
|
| 391 |
+
```
|
| 392 |
+
|
| 393 |
+
</td>
|
| 394 |
+
<td align="left"><code>160</code></td>
|
| 395 |
+
<td align="left">The minimum-width of the component in pixels.</td>
|
| 396 |
+
</tr>
|
| 397 |
+
|
| 398 |
+
<tr>
|
| 399 |
+
<td align="left"><code>interactive</code></td>
|
| 400 |
+
<td align="left" style="width: 25%;">
|
| 401 |
+
|
| 402 |
+
```python
|
| 403 |
+
bool | None
|
| 404 |
+
```
|
| 405 |
+
|
| 406 |
+
</td>
|
| 407 |
+
<td align="left"><code>None</code></td>
|
| 408 |
+
<td align="left">If False, the user will not be able to edit the text.</td>
|
| 409 |
+
</tr>
|
| 410 |
+
|
| 411 |
+
<tr>
|
| 412 |
+
<td align="left"><code>visible</code></td>
|
| 413 |
+
<td align="left" style="width: 25%;">
|
| 414 |
+
|
| 415 |
+
```python
|
| 416 |
+
bool
|
| 417 |
+
```
|
| 418 |
+
|
| 419 |
+
</td>
|
| 420 |
+
<td align="left"><code>True</code></td>
|
| 421 |
+
<td align="left">If False, the component will be hidden.</td>
|
| 422 |
+
</tr>
|
| 423 |
+
|
| 424 |
+
<tr>
|
| 425 |
+
<td align="left"><code>elem_id</code></td>
|
| 426 |
+
<td align="left" style="width: 25%;">
|
| 427 |
+
|
| 428 |
+
```python
|
| 429 |
+
str | None
|
| 430 |
+
```
|
| 431 |
+
|
| 432 |
+
</td>
|
| 433 |
+
<td align="left"><code>None</code></td>
|
| 434 |
+
<td align="left">An optional string that is assigned as the id of this component in the HTML DOM.</td>
|
| 435 |
+
</tr>
|
| 436 |
+
|
| 437 |
+
<tr>
|
| 438 |
+
<td align="left"><code>elem_classes</code></td>
|
| 439 |
+
<td align="left" style="width: 25%;">
|
| 440 |
+
|
| 441 |
+
```python
|
| 442 |
+
list[str] | str | None
|
| 443 |
+
```
|
| 444 |
+
|
| 445 |
+
</td>
|
| 446 |
+
<td align="left"><code>None</code></td>
|
| 447 |
+
<td align="left">An optional list of strings that are assigned as the classes of this component in the HTML DOM.</td>
|
| 448 |
+
</tr>
|
| 449 |
+
</tbody></table>
|
| 450 |
+
|
| 451 |
+
|
| 452 |
+
### Events
|
| 453 |
+
|
| 454 |
+
| name | description |
|
| 455 |
+
|:-----|:------------|
|
| 456 |
+
| `change` | Triggered when the value of the TokenizerTextBox changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input. |
|
| 457 |
+
| `input` | This listener is triggered when the user changes the value of the TokenizerTextBox. |
|
| 458 |
+
| `submit` | This listener is triggered when the user presses the Enter key while the TokenizerTextBox is focused. |
|
| 459 |
+
| `blur` | This listener is triggered when the TokenizerTextBox is unfocused/blurred. |
|
| 460 |
+
| `select` | Event listener for when the user selects or deselects the TokenizerTextBox. Uses event data gradio.SelectData to carry `value` referring to the label of the TokenizerTextBox, and `selected` to refer to state of the TokenizerTextBox. See EventData documentation on how to use this event data |
|
| 461 |
+
|
| 462 |
+
|
| 463 |
+
|
| 464 |
+
### User function
|
| 465 |
+
|
| 466 |
+
The impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both).
|
| 467 |
+
|
| 468 |
+
- When used as an Input, the component only impacts the input signature of the user function.
|
| 469 |
+
- When used as an output, the component only impacts the return signature of the user function.
|
| 470 |
+
|
| 471 |
+
The code snippet below is accurate in cases where the component is used as both an input and an output.
|
| 472 |
+
|
| 473 |
+
- **As output:** Is passed, a dictionary enriched with 'char_count' and 'token_count'.
|
| 474 |
+
- **As input:** Should return, the value to set for the component, can be a string or a dictionary.
|
| 475 |
+
|
| 476 |
+
```python
|
| 477 |
+
def predict(
|
| 478 |
+
value: dict | None
|
| 479 |
+
) -> str | dict | None:
|
| 480 |
+
return value
|
| 481 |
+
```
|
| 482 |
+
|
__init__.py
ADDED
|
File without changes
|
app.py
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#
|
| 2 |
+
# demo/app.py
|
| 3 |
+
#
|
| 4 |
+
import gradio as gr
|
| 5 |
+
from gradio_tokenizertextbox import TokenizerTextBox
|
| 6 |
+
import json
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
TOKENIZER_OPTIONS = {
|
| 11 |
+
"Xenova/clip-vit-large-patch14": "CLIP ViT-L/14",
|
| 12 |
+
"Xenova/gpt-4": "gpt-4 / gpt-3.5-turbo / text-embedding-ada-002",
|
| 13 |
+
"Xenova/text-davinci-003": "text-davinci-003 / text-davinci-002",
|
| 14 |
+
"Xenova/gpt-3": "gpt-3",
|
| 15 |
+
"Xenova/grok-1-tokenizer": "Grok-1",
|
| 16 |
+
"Xenova/claude-tokenizer": "Claude",
|
| 17 |
+
"Xenova/mistral-tokenizer-v3": "Mistral v3",
|
| 18 |
+
"Xenova/mistral-tokenizer-v1": "Mistral v1",
|
| 19 |
+
"Xenova/gemma-tokenizer": "Gemma",
|
| 20 |
+
"Xenova/llama-3-tokenizer": "Llama 3",
|
| 21 |
+
"Xenova/llama-tokenizer": "LLaMA / Llama 2",
|
| 22 |
+
"Xenova/c4ai-command-r-v01-tokenizer": "Cohere Command-R",
|
| 23 |
+
"Xenova/t5-small": "T5",
|
| 24 |
+
"Xenova/bert-base-cased": "bert-base-cased",
|
| 25 |
+
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
# 2. Prepare the choices for the gr.Dropdown component
|
| 29 |
+
# The format is a list of tuples: [(display_name, internal_value)]
|
| 30 |
+
dropdown_choices = [
|
| 31 |
+
(display_name, model_name)
|
| 32 |
+
for model_name, display_name in TOKENIZER_OPTIONS.items()
|
| 33 |
+
]
|
| 34 |
+
|
| 35 |
+
def process_output(tokenization_data):
|
| 36 |
+
"""
|
| 37 |
+
This function receives the full dictionary from the component.
|
| 38 |
+
"""
|
| 39 |
+
if not tokenization_data:
|
| 40 |
+
return {"status": "Waiting for input..."}
|
| 41 |
+
return tokenization_data
|
| 42 |
+
|
| 43 |
+
# --- Gradio Application ---
|
| 44 |
+
with gr.Blocks() as demo:
|
| 45 |
+
gr.Markdown("# TokenizerTextBox Component Demo")
|
| 46 |
+
gr.Markdown("# Component idea taken from the original example application on [Xenova Tokenizer Playground](https://github.com/huggingface/transformers.js-examples/tree/main/the-tokenizer-playground) ")
|
| 47 |
+
gr.Markdown("## Select a tokenizer from the dropdown menu to see how it processes your text in real-time.")
|
| 48 |
+
gr.Markdown("## For more models, check out the [Xenova Transformers Models](https://huggingface.co/Xenova/models) page.")
|
| 49 |
+
|
| 50 |
+
with gr.Row():
|
| 51 |
+
# 3. Create the Dropdown for model selection
|
| 52 |
+
model_selector = gr.Dropdown(
|
| 53 |
+
label="Select a Tokenizer",
|
| 54 |
+
choices=dropdown_choices,
|
| 55 |
+
value="Xenova/clip-vit-large-patch14", # Set a default value
|
| 56 |
+
)
|
| 57 |
+
|
| 58 |
+
display_mode_radio = gr.Radio(
|
| 59 |
+
["text", "token_ids", "hidden"],
|
| 60 |
+
label="Display Mode",
|
| 61 |
+
value="text"
|
| 62 |
+
)
|
| 63 |
+
|
| 64 |
+
# 4. Initialize the component with a default model
|
| 65 |
+
tokenizer_input = TokenizerTextBox(
|
| 66 |
+
label="Type your text here",
|
| 67 |
+
value="Gradio is an awesome tool for building ML demos!",
|
| 68 |
+
model="Xenova/clip-vit-large-patch14", # Must match the dropdown's default value
|
| 69 |
+
display_mode="text",
|
| 70 |
+
)
|
| 71 |
+
|
| 72 |
+
output_info = gr.JSON(label="Component Output (from preprocess)")
|
| 73 |
+
|
| 74 |
+
# --- Event Listeners ---
|
| 75 |
+
|
| 76 |
+
# A. When the tokenizer component changes, update the JSON output
|
| 77 |
+
tokenizer_input.change(
|
| 78 |
+
fn=process_output,
|
| 79 |
+
inputs=tokenizer_input,
|
| 80 |
+
outputs=output_info
|
| 81 |
+
)
|
| 82 |
+
|
| 83 |
+
# B. When the dropdown value changes, update the 'model' prop of our component
|
| 84 |
+
def update_tokenizer_model(selected_model):
|
| 85 |
+
return gr.update(model=selected_model)
|
| 86 |
+
|
| 87 |
+
model_selector.change(
|
| 88 |
+
fn=update_tokenizer_model,
|
| 89 |
+
inputs=model_selector,
|
| 90 |
+
outputs=tokenizer_input
|
| 91 |
+
)
|
| 92 |
+
|
| 93 |
+
# C. When the radio button value changes, update the 'display_mode' prop
|
| 94 |
+
def update_display_mode(mode):
|
| 95 |
+
return gr.update(display_mode=mode)
|
| 96 |
+
|
| 97 |
+
display_mode_radio.change(
|
| 98 |
+
fn=update_display_mode,
|
| 99 |
+
inputs=display_mode_radio,
|
| 100 |
+
outputs=tokenizer_input
|
| 101 |
+
)
|
| 102 |
+
|
| 103 |
+
if __name__ == '__main__':
|
| 104 |
+
demo.launch()
|
css.css
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
html {
|
| 2 |
+
font-family: Inter;
|
| 3 |
+
font-size: 16px;
|
| 4 |
+
font-weight: 400;
|
| 5 |
+
line-height: 1.5;
|
| 6 |
+
-webkit-text-size-adjust: 100%;
|
| 7 |
+
background: #fff;
|
| 8 |
+
color: #323232;
|
| 9 |
+
-webkit-font-smoothing: antialiased;
|
| 10 |
+
-moz-osx-font-smoothing: grayscale;
|
| 11 |
+
text-rendering: optimizeLegibility;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
:root {
|
| 15 |
+
--space: 1;
|
| 16 |
+
--vspace: calc(var(--space) * 1rem);
|
| 17 |
+
--vspace-0: calc(3 * var(--space) * 1rem);
|
| 18 |
+
--vspace-1: calc(2 * var(--space) * 1rem);
|
| 19 |
+
--vspace-2: calc(1.5 * var(--space) * 1rem);
|
| 20 |
+
--vspace-3: calc(0.5 * var(--space) * 1rem);
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.app {
|
| 24 |
+
max-width: 748px !important;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
.prose p {
|
| 28 |
+
margin: var(--vspace) 0;
|
| 29 |
+
line-height: var(--vspace * 2);
|
| 30 |
+
font-size: 1rem;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
code {
|
| 34 |
+
font-family: "Inconsolata", sans-serif;
|
| 35 |
+
font-size: 16px;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
h1,
|
| 39 |
+
h1 code {
|
| 40 |
+
font-weight: 400;
|
| 41 |
+
line-height: calc(2.5 / var(--space) * var(--vspace));
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
h1 code {
|
| 45 |
+
background: none;
|
| 46 |
+
border: none;
|
| 47 |
+
letter-spacing: 0.05em;
|
| 48 |
+
padding-bottom: 5px;
|
| 49 |
+
position: relative;
|
| 50 |
+
padding: 0;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
h2 {
|
| 54 |
+
margin: var(--vspace-1) 0 var(--vspace-2) 0;
|
| 55 |
+
line-height: 1em;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
h3,
|
| 59 |
+
h3 code {
|
| 60 |
+
margin: var(--vspace-1) 0 var(--vspace-2) 0;
|
| 61 |
+
line-height: 1em;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
h4,
|
| 65 |
+
h5,
|
| 66 |
+
h6 {
|
| 67 |
+
margin: var(--vspace-3) 0 var(--vspace-3) 0;
|
| 68 |
+
line-height: var(--vspace);
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
.bigtitle,
|
| 72 |
+
h1,
|
| 73 |
+
h1 code {
|
| 74 |
+
font-size: calc(8px * 4.5);
|
| 75 |
+
word-break: break-word;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.title,
|
| 79 |
+
h2,
|
| 80 |
+
h2 code {
|
| 81 |
+
font-size: calc(8px * 3.375);
|
| 82 |
+
font-weight: lighter;
|
| 83 |
+
word-break: break-word;
|
| 84 |
+
border: none;
|
| 85 |
+
background: none;
|
| 86 |
+
}
|
| 87 |
+
|
| 88 |
+
.subheading1,
|
| 89 |
+
h3,
|
| 90 |
+
h3 code {
|
| 91 |
+
font-size: calc(8px * 1.8);
|
| 92 |
+
font-weight: 600;
|
| 93 |
+
border: none;
|
| 94 |
+
background: none;
|
| 95 |
+
letter-spacing: 0.1em;
|
| 96 |
+
text-transform: uppercase;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
h2 code {
|
| 100 |
+
padding: 0;
|
| 101 |
+
position: relative;
|
| 102 |
+
letter-spacing: 0.05em;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
blockquote {
|
| 106 |
+
font-size: calc(8px * 1.1667);
|
| 107 |
+
font-style: italic;
|
| 108 |
+
line-height: calc(1.1667 * var(--vspace));
|
| 109 |
+
margin: var(--vspace-2) var(--vspace-2);
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
.subheading2,
|
| 113 |
+
h4 {
|
| 114 |
+
font-size: calc(8px * 1.4292);
|
| 115 |
+
text-transform: uppercase;
|
| 116 |
+
font-weight: 600;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
.subheading3,
|
| 120 |
+
h5 {
|
| 121 |
+
font-size: calc(8px * 1.2917);
|
| 122 |
+
line-height: calc(1.2917 * var(--vspace));
|
| 123 |
+
|
| 124 |
+
font-weight: lighter;
|
| 125 |
+
text-transform: uppercase;
|
| 126 |
+
letter-spacing: 0.15em;
|
| 127 |
+
}
|
| 128 |
+
|
| 129 |
+
h6 {
|
| 130 |
+
font-size: calc(8px * 1.1667);
|
| 131 |
+
font-size: 1.1667em;
|
| 132 |
+
font-weight: normal;
|
| 133 |
+
font-style: italic;
|
| 134 |
+
font-family: "le-monde-livre-classic-byol", serif !important;
|
| 135 |
+
letter-spacing: 0px !important;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
#start .md > *:first-child {
|
| 139 |
+
margin-top: 0;
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
h2 + h3 {
|
| 143 |
+
margin-top: 0;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
.md hr {
|
| 147 |
+
border: none;
|
| 148 |
+
border-top: 1px solid var(--block-border-color);
|
| 149 |
+
margin: var(--vspace-2) 0 var(--vspace-2) 0;
|
| 150 |
+
}
|
| 151 |
+
.prose ul {
|
| 152 |
+
margin: var(--vspace-2) 0 var(--vspace-1) 0;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
.gap {
|
| 156 |
+
gap: 0;
|
| 157 |
+
}
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
gradio_tokenizertextbox
|
space.py
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
import gradio as gr
|
| 3 |
+
from app import demo as app
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
_docs = {'TokenizerTextBox': {'description': "Creates a textarea for user to enter string input or display string output,\nwith built-in, client-side tokenization visualization powered by Transformers.js.\nThe component's value is a JSON object containing the text and tokenization results.", 'members': {'__init__': {'value': {'type': 'typing.Union[str, dict, typing.Callable, NoneType][\n str, dict, Callable, None\n]', 'default': 'None', 'description': 'The initial value. Can be a string to initialize the text, or a dictionary for full state. If a function is provided, it will be called when the app loads to set the initial value.'}, 'model': {'type': 'str', 'default': '"Xenova/gpt-3"', 'description': 'The name of a Hugging Face tokenizer to use (must be compatible with Transformers.js). Defaults to "Xenova/gpt-2".'}, 'display_mode': {'type': '"text" | "token_ids" | "hidden"', 'default': '"text"', 'description': "Controls the content of the token visualization panel. Can be 'text' (default), 'token_ids', or 'hidden'."}, 'lines': {'type': 'int', 'default': '2', 'description': 'The minimum number of line rows for the textarea.'}, 'max_lines': {'type': 'int | None', 'default': 'None', 'description': 'The maximum number of line rows for the textarea.'}, 'placeholder': {'type': 'str | None', 'default': 'None', 'description': 'A placeholder hint to display in the textarea when it is empty.'}, 'autofocus': {'type': 'bool', 'default': 'False', 'description': 'If True, will focus on the textbox when the page loads.'}, 'autoscroll': {'type': 'bool', 'default': 'True', 'description': 'If True, will automatically scroll to the bottom of the textbox when the value changes.'}, 'text_align': {'type': 'typing.Optional[typing.Literal["left", "right"]][\n "left" | "right", None\n]', 'default': 'None', 'description': 'How to align the text in the textbox, can be: "left" or "right".'}, 'rtl': {'type': 'bool', 'default': 'False', 'description': 'If True, sets the direction of the text to right-to-left.'}, 'show_copy_button': {'type': 'bool', 'default': 'False', 'description': 'If True, a copy button will be shown.'}, 'max_length': {'type': 'int | None', 'default': 'None', 'description': 'The maximum number of characters allowed in the textbox.'}, 'label': {'type': 'str | None', 'default': 'None', 'description': 'The label for this component, displayed above the component.'}, 'info': {'type': 'str | None', 'default': 'None', 'description': 'Additional component description, displayed below the label.'}, 'every': {'type': 'float | None', 'default': 'None', 'description': 'If `value` is a callable, this sets a timer to run the function repeatedly.'}, 'show_label': {'type': 'bool', 'default': 'True', 'description': 'If False, the label is not displayed.'}, 'container': {'type': 'bool', 'default': 'True', 'description': 'If False, the component will not be wrapped in a container.'}, 'scale': {'type': 'int | None', 'default': 'None', 'description': 'The relative size of the component compared to others in a `gr.Row` or `gr.Column`.'}, 'min_width': {'type': 'int', 'default': '160', 'description': 'The minimum-width of the component in pixels.'}, 'interactive': {'type': 'bool | None', 'default': 'None', 'description': 'If False, the user will not be able to edit the text.'}, 'visible': {'type': 'bool', 'default': 'True', 'description': 'If False, the component will be hidden.'}, 'elem_id': {'type': 'str | None', 'default': 'None', 'description': 'An optional string that is assigned as the id of this component in the HTML DOM.'}, 'elem_classes': {'type': 'list[str] | str | None', 'default': 'None', 'description': 'An optional list of strings that are assigned as the classes of this component in the HTML DOM.'}}, 'postprocess': {'value': {'type': 'str | dict | None', 'description': 'The value to set for the component, can be a string or a dictionary.'}}, 'preprocess': {'return': {'type': 'dict | None', 'description': "A dictionary enriched with 'char_count' and 'token_count'."}, 'value': None}}, 'events': {'change': {'type': None, 'default': None, 'description': 'Triggered when the value of the TokenizerTextBox changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input.'}, 'input': {'type': None, 'default': None, 'description': 'This listener is triggered when the user changes the value of the TokenizerTextBox.'}, 'submit': {'type': None, 'default': None, 'description': 'This listener is triggered when the user presses the Enter key while the TokenizerTextBox is focused.'}, 'blur': {'type': None, 'default': None, 'description': 'This listener is triggered when the TokenizerTextBox is unfocused/blurred.'}, 'select': {'type': None, 'default': None, 'description': 'Event listener for when the user selects or deselects the TokenizerTextBox. Uses event data gradio.SelectData to carry `value` referring to the label of the TokenizerTextBox, and `selected` to refer to state of the TokenizerTextBox. See EventData documentation on how to use this event data'}}}, '__meta__': {'additional_interfaces': {}, 'user_fn_refs': {'TokenizerTextBox': []}}}
|
| 7 |
+
|
| 8 |
+
abs_path = os.path.join(os.path.dirname(__file__), "css.css")
|
| 9 |
+
|
| 10 |
+
with gr.Blocks(
|
| 11 |
+
css=abs_path,
|
| 12 |
+
theme=gr.themes.Default(
|
| 13 |
+
font_mono=[
|
| 14 |
+
gr.themes.GoogleFont("Inconsolata"),
|
| 15 |
+
"monospace",
|
| 16 |
+
],
|
| 17 |
+
),
|
| 18 |
+
) as demo:
|
| 19 |
+
gr.Markdown(
|
| 20 |
+
"""
|
| 21 |
+
# `gradio_tokenizertextbox`
|
| 22 |
+
|
| 23 |
+
<div style="display: flex; gap: 7px;">
|
| 24 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.1%20-%20orange">
|
| 25 |
+
</div>
|
| 26 |
+
|
| 27 |
+
Textbox tokenizer
|
| 28 |
+
""", elem_classes=["md-custom"], header_links=True)
|
| 29 |
+
app.render()
|
| 30 |
+
gr.Markdown(
|
| 31 |
+
"""
|
| 32 |
+
## Installation
|
| 33 |
+
|
| 34 |
+
```bash
|
| 35 |
+
pip install gradio_tokenizertextbox
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## Usage
|
| 39 |
+
|
| 40 |
+
```python
|
| 41 |
+
#
|
| 42 |
+
# demo/app.py
|
| 43 |
+
#
|
| 44 |
+
import gradio as gr
|
| 45 |
+
from gradio_tokenizertextbox import TokenizerTextBox
|
| 46 |
+
import json
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
TOKENIZER_OPTIONS = {
|
| 51 |
+
"Xenova/clip-vit-large-patch14": "CLIP ViT-L/14",
|
| 52 |
+
"Xenova/gpt-4": "gpt-4 / gpt-3.5-turbo / text-embedding-ada-002",
|
| 53 |
+
"Xenova/text-davinci-003": "text-davinci-003 / text-davinci-002",
|
| 54 |
+
"Xenova/gpt-3": "gpt-3",
|
| 55 |
+
"Xenova/grok-1-tokenizer": "Grok-1",
|
| 56 |
+
"Xenova/claude-tokenizer": "Claude",
|
| 57 |
+
"Xenova/mistral-tokenizer-v3": "Mistral v3",
|
| 58 |
+
"Xenova/mistral-tokenizer-v1": "Mistral v1",
|
| 59 |
+
"Xenova/gemma-tokenizer": "Gemma",
|
| 60 |
+
"Xenova/llama-3-tokenizer": "Llama 3",
|
| 61 |
+
"Xenova/llama-tokenizer": "LLaMA / Llama 2",
|
| 62 |
+
"Xenova/c4ai-command-r-v01-tokenizer": "Cohere Command-R",
|
| 63 |
+
"Xenova/t5-small": "T5",
|
| 64 |
+
"Xenova/bert-base-cased": "bert-base-cased",
|
| 65 |
+
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
# 2. Prepare the choices for the gr.Dropdown component
|
| 69 |
+
# The format is a list of tuples: [(display_name, internal_value)]
|
| 70 |
+
dropdown_choices = [
|
| 71 |
+
(display_name, model_name)
|
| 72 |
+
for model_name, display_name in TOKENIZER_OPTIONS.items()
|
| 73 |
+
]
|
| 74 |
+
|
| 75 |
+
def process_output(tokenization_data):
|
| 76 |
+
\"\"\"
|
| 77 |
+
This function receives the full dictionary from the component.
|
| 78 |
+
\"\"\"
|
| 79 |
+
if not tokenization_data:
|
| 80 |
+
return {"status": "Waiting for input..."}
|
| 81 |
+
return tokenization_data
|
| 82 |
+
|
| 83 |
+
# --- Gradio Application ---
|
| 84 |
+
with gr.Blocks() as demo:
|
| 85 |
+
gr.Markdown("# TokenizerTextBox Component Demo")
|
| 86 |
+
gr.Markdown("# Component idea taken from the original example application on [Xenova Tokenizer Playground](https://github.com/huggingface/transformers.js-examples/tree/main/the-tokenizer-playground) ")
|
| 87 |
+
gr.Markdown("## Select a tokenizer from the dropdown menu to see how it processes your text in real-time.")
|
| 88 |
+
gr.Markdown("## For more models, check out the [Xenova Transformers Models](https://huggingface.co/Xenova/models) page.")
|
| 89 |
+
|
| 90 |
+
with gr.Row():
|
| 91 |
+
# 3. Create the Dropdown for model selection
|
| 92 |
+
model_selector = gr.Dropdown(
|
| 93 |
+
label="Select a Tokenizer",
|
| 94 |
+
choices=dropdown_choices,
|
| 95 |
+
value="Xenova/clip-vit-large-patch14", # Set a default value
|
| 96 |
+
)
|
| 97 |
+
|
| 98 |
+
display_mode_radio = gr.Radio(
|
| 99 |
+
["text", "token_ids", "hidden"],
|
| 100 |
+
label="Display Mode",
|
| 101 |
+
value="text"
|
| 102 |
+
)
|
| 103 |
+
|
| 104 |
+
# 4. Initialize the component with a default model
|
| 105 |
+
tokenizer_input = TokenizerTextBox(
|
| 106 |
+
label="Type your text here",
|
| 107 |
+
value="Gradio is an awesome tool for building ML demos!",
|
| 108 |
+
model="Xenova/clip-vit-large-patch14", # Must match the dropdown's default value
|
| 109 |
+
display_mode="text",
|
| 110 |
+
)
|
| 111 |
+
|
| 112 |
+
output_info = gr.JSON(label="Component Output (from preprocess)")
|
| 113 |
+
|
| 114 |
+
# --- Event Listeners ---
|
| 115 |
+
|
| 116 |
+
# A. When the tokenizer component changes, update the JSON output
|
| 117 |
+
tokenizer_input.change(
|
| 118 |
+
fn=process_output,
|
| 119 |
+
inputs=tokenizer_input,
|
| 120 |
+
outputs=output_info
|
| 121 |
+
)
|
| 122 |
+
|
| 123 |
+
# B. When the dropdown value changes, update the 'model' prop of our component
|
| 124 |
+
def update_tokenizer_model(selected_model):
|
| 125 |
+
return gr.update(model=selected_model)
|
| 126 |
+
|
| 127 |
+
model_selector.change(
|
| 128 |
+
fn=update_tokenizer_model,
|
| 129 |
+
inputs=model_selector,
|
| 130 |
+
outputs=tokenizer_input
|
| 131 |
+
)
|
| 132 |
+
|
| 133 |
+
# C. When the radio button value changes, update the 'display_mode' prop
|
| 134 |
+
def update_display_mode(mode):
|
| 135 |
+
return gr.update(display_mode=mode)
|
| 136 |
+
|
| 137 |
+
display_mode_radio.change(
|
| 138 |
+
fn=update_display_mode,
|
| 139 |
+
inputs=display_mode_radio,
|
| 140 |
+
outputs=tokenizer_input
|
| 141 |
+
)
|
| 142 |
+
|
| 143 |
+
if __name__ == '__main__':
|
| 144 |
+
demo.launch()
|
| 145 |
+
|
| 146 |
+
```
|
| 147 |
+
""", elem_classes=["md-custom"], header_links=True)
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
gr.Markdown("""
|
| 151 |
+
## `TokenizerTextBox`
|
| 152 |
+
|
| 153 |
+
### Initialization
|
| 154 |
+
""", elem_classes=["md-custom"], header_links=True)
|
| 155 |
+
|
| 156 |
+
gr.ParamViewer(value=_docs["TokenizerTextBox"]["members"]["__init__"], linkify=[])
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
gr.Markdown("### Events")
|
| 160 |
+
gr.ParamViewer(value=_docs["TokenizerTextBox"]["events"], linkify=['Event'])
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
gr.Markdown("""
|
| 166 |
+
|
| 167 |
+
### User function
|
| 168 |
+
|
| 169 |
+
The impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both).
|
| 170 |
+
|
| 171 |
+
- When used as an Input, the component only impacts the input signature of the user function.
|
| 172 |
+
- When used as an output, the component only impacts the return signature of the user function.
|
| 173 |
+
|
| 174 |
+
The code snippet below is accurate in cases where the component is used as both an input and an output.
|
| 175 |
+
|
| 176 |
+
- **As input:** Is passed, a dictionary enriched with 'char_count' and 'token_count'.
|
| 177 |
+
- **As output:** Should return, the value to set for the component, can be a string or a dictionary.
|
| 178 |
+
|
| 179 |
+
```python
|
| 180 |
+
def predict(
|
| 181 |
+
value: dict | None
|
| 182 |
+
) -> str | dict | None:
|
| 183 |
+
return value
|
| 184 |
+
```
|
| 185 |
+
""", elem_classes=["md-custom", "TokenizerTextBox-user-fn"], header_links=True)
|
| 186 |
+
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
demo.load(None, js=r"""function() {
|
| 191 |
+
const refs = {};
|
| 192 |
+
const user_fn_refs = {
|
| 193 |
+
TokenizerTextBox: [], };
|
| 194 |
+
requestAnimationFrame(() => {
|
| 195 |
+
|
| 196 |
+
Object.entries(user_fn_refs).forEach(([key, refs]) => {
|
| 197 |
+
if (refs.length > 0) {
|
| 198 |
+
const el = document.querySelector(`.${key}-user-fn`);
|
| 199 |
+
if (!el) return;
|
| 200 |
+
refs.forEach(ref => {
|
| 201 |
+
el.innerHTML = el.innerHTML.replace(
|
| 202 |
+
new RegExp("\\b"+ref+"\\b", "g"),
|
| 203 |
+
`<a href="#h-${ref.toLowerCase()}">${ref}</a>`
|
| 204 |
+
);
|
| 205 |
+
})
|
| 206 |
+
}
|
| 207 |
+
})
|
| 208 |
+
|
| 209 |
+
Object.entries(refs).forEach(([key, refs]) => {
|
| 210 |
+
if (refs.length > 0) {
|
| 211 |
+
const el = document.querySelector(`.${key}`);
|
| 212 |
+
if (!el) return;
|
| 213 |
+
refs.forEach(ref => {
|
| 214 |
+
el.innerHTML = el.innerHTML.replace(
|
| 215 |
+
new RegExp("\\b"+ref+"\\b", "g"),
|
| 216 |
+
`<a href="#h-${ref.toLowerCase()}">${ref}</a>`
|
| 217 |
+
);
|
| 218 |
+
})
|
| 219 |
+
}
|
| 220 |
+
})
|
| 221 |
+
})
|
| 222 |
+
}
|
| 223 |
+
|
| 224 |
+
""")
|
| 225 |
+
|
| 226 |
+
demo.launch()
|
src/.gitignore
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.eggs/
|
| 2 |
+
dist/
|
| 3 |
+
*.pyc
|
| 4 |
+
__pycache__/
|
| 5 |
+
*.py[cod]
|
| 6 |
+
*$py.class
|
| 7 |
+
__tmp/*
|
| 8 |
+
*.pyi
|
| 9 |
+
.mypycache
|
| 10 |
+
.ruff_cache
|
| 11 |
+
node_modules
|
| 12 |
+
backend/**/templates/
|
src/.gradio/certificate.pem
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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r7g1SgEEzwxA57d
|
| 30 |
+
emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
|
| 31 |
+
-----END CERTIFICATE-----
|
src/.vscode/launch.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
// Use IntelliSense to learn about possible attributes.
|
| 3 |
+
// Hover to view descriptions of existing attributes.
|
| 4 |
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
| 5 |
+
"version": "0.2.0",
|
| 6 |
+
"configurations": [
|
| 7 |
+
|
| 8 |
+
{
|
| 9 |
+
"name": "Python Debugger: Current File",
|
| 10 |
+
"type": "debugpy",
|
| 11 |
+
"request": "launch",
|
| 12 |
+
"program": "${file}",
|
| 13 |
+
"console": "integratedTerminal",
|
| 14 |
+
"justMyCode": false
|
| 15 |
+
}
|
| 16 |
+
]
|
| 17 |
+
}
|
src/README.md
ADDED
|
@@ -0,0 +1,482 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags: [gradio-custom-component, TextBox, textbox]
|
| 3 |
+
title: gradio_tokenizertextbox
|
| 4 |
+
short_description: Textbox tokenizer
|
| 5 |
+
colorFrom: blue
|
| 6 |
+
colorTo: yellow
|
| 7 |
+
sdk: gradio
|
| 8 |
+
pinned: false
|
| 9 |
+
app_file: space.py
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# `gradio_tokenizertextbox`
|
| 13 |
+
<img alt="Static Badge" src="https://img.shields.io/badge/version%20-%200.0.1%20-%20orange">
|
| 14 |
+
|
| 15 |
+
Textbox tokenizer
|
| 16 |
+
|
| 17 |
+
## Installation
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
pip install gradio_tokenizertextbox
|
| 21 |
+
```
|
| 22 |
+
|
| 23 |
+
## Usage
|
| 24 |
+
|
| 25 |
+
```python
|
| 26 |
+
#
|
| 27 |
+
# demo/app.py
|
| 28 |
+
#
|
| 29 |
+
import gradio as gr
|
| 30 |
+
from gradio_tokenizertextbox import TokenizerTextBox
|
| 31 |
+
import json
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
TOKENIZER_OPTIONS = {
|
| 36 |
+
"Xenova/clip-vit-large-patch14": "CLIP ViT-L/14",
|
| 37 |
+
"Xenova/gpt-4": "gpt-4 / gpt-3.5-turbo / text-embedding-ada-002",
|
| 38 |
+
"Xenova/text-davinci-003": "text-davinci-003 / text-davinci-002",
|
| 39 |
+
"Xenova/gpt-3": "gpt-3",
|
| 40 |
+
"Xenova/grok-1-tokenizer": "Grok-1",
|
| 41 |
+
"Xenova/claude-tokenizer": "Claude",
|
| 42 |
+
"Xenova/mistral-tokenizer-v3": "Mistral v3",
|
| 43 |
+
"Xenova/mistral-tokenizer-v1": "Mistral v1",
|
| 44 |
+
"Xenova/gemma-tokenizer": "Gemma",
|
| 45 |
+
"Xenova/llama-3-tokenizer": "Llama 3",
|
| 46 |
+
"Xenova/llama-tokenizer": "LLaMA / Llama 2",
|
| 47 |
+
"Xenova/c4ai-command-r-v01-tokenizer": "Cohere Command-R",
|
| 48 |
+
"Xenova/t5-small": "T5",
|
| 49 |
+
"Xenova/bert-base-cased": "bert-base-cased",
|
| 50 |
+
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
# 2. Prepare the choices for the gr.Dropdown component
|
| 54 |
+
# The format is a list of tuples: [(display_name, internal_value)]
|
| 55 |
+
dropdown_choices = [
|
| 56 |
+
(display_name, model_name)
|
| 57 |
+
for model_name, display_name in TOKENIZER_OPTIONS.items()
|
| 58 |
+
]
|
| 59 |
+
|
| 60 |
+
def process_output(tokenization_data):
|
| 61 |
+
"""
|
| 62 |
+
This function receives the full dictionary from the component.
|
| 63 |
+
"""
|
| 64 |
+
if not tokenization_data:
|
| 65 |
+
return {"status": "Waiting for input..."}
|
| 66 |
+
return tokenization_data
|
| 67 |
+
|
| 68 |
+
# --- Gradio Application ---
|
| 69 |
+
with gr.Blocks() as demo:
|
| 70 |
+
gr.Markdown("# TokenizerTextBox Component Demo")
|
| 71 |
+
gr.Markdown("# Component idea taken from the original example application on [Xenova Tokenizer Playground](https://github.com/huggingface/transformers.js-examples/tree/main/the-tokenizer-playground) ")
|
| 72 |
+
gr.Markdown("## Select a tokenizer from the dropdown menu to see how it processes your text in real-time.")
|
| 73 |
+
gr.Markdown("## For more models, check out the [Xenova Transformers Models](https://huggingface.co/Xenova/models) page.")
|
| 74 |
+
|
| 75 |
+
with gr.Row():
|
| 76 |
+
# 3. Create the Dropdown for model selection
|
| 77 |
+
model_selector = gr.Dropdown(
|
| 78 |
+
label="Select a Tokenizer",
|
| 79 |
+
choices=dropdown_choices,
|
| 80 |
+
value="Xenova/clip-vit-large-patch14", # Set a default value
|
| 81 |
+
)
|
| 82 |
+
|
| 83 |
+
display_mode_radio = gr.Radio(
|
| 84 |
+
["text", "token_ids", "hidden"],
|
| 85 |
+
label="Display Mode",
|
| 86 |
+
value="text"
|
| 87 |
+
)
|
| 88 |
+
|
| 89 |
+
# 4. Initialize the component with a default model
|
| 90 |
+
tokenizer_input = TokenizerTextBox(
|
| 91 |
+
label="Type your text here",
|
| 92 |
+
value="Gradio is an awesome tool for building ML demos!",
|
| 93 |
+
model="Xenova/clip-vit-large-patch14", # Must match the dropdown's default value
|
| 94 |
+
display_mode="text",
|
| 95 |
+
)
|
| 96 |
+
|
| 97 |
+
output_info = gr.JSON(label="Component Output (from preprocess)")
|
| 98 |
+
|
| 99 |
+
# --- Event Listeners ---
|
| 100 |
+
|
| 101 |
+
# A. When the tokenizer component changes, update the JSON output
|
| 102 |
+
tokenizer_input.change(
|
| 103 |
+
fn=process_output,
|
| 104 |
+
inputs=tokenizer_input,
|
| 105 |
+
outputs=output_info
|
| 106 |
+
)
|
| 107 |
+
|
| 108 |
+
# B. When the dropdown value changes, update the 'model' prop of our component
|
| 109 |
+
def update_tokenizer_model(selected_model):
|
| 110 |
+
return gr.update(model=selected_model)
|
| 111 |
+
|
| 112 |
+
model_selector.change(
|
| 113 |
+
fn=update_tokenizer_model,
|
| 114 |
+
inputs=model_selector,
|
| 115 |
+
outputs=tokenizer_input
|
| 116 |
+
)
|
| 117 |
+
|
| 118 |
+
# C. When the radio button value changes, update the 'display_mode' prop
|
| 119 |
+
def update_display_mode(mode):
|
| 120 |
+
return gr.update(display_mode=mode)
|
| 121 |
+
|
| 122 |
+
display_mode_radio.change(
|
| 123 |
+
fn=update_display_mode,
|
| 124 |
+
inputs=display_mode_radio,
|
| 125 |
+
outputs=tokenizer_input
|
| 126 |
+
)
|
| 127 |
+
|
| 128 |
+
if __name__ == '__main__':
|
| 129 |
+
demo.launch()
|
| 130 |
+
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
## `TokenizerTextBox`
|
| 134 |
+
|
| 135 |
+
### Initialization
|
| 136 |
+
|
| 137 |
+
<table>
|
| 138 |
+
<thead>
|
| 139 |
+
<tr>
|
| 140 |
+
<th align="left">name</th>
|
| 141 |
+
<th align="left" style="width: 25%;">type</th>
|
| 142 |
+
<th align="left">default</th>
|
| 143 |
+
<th align="left">description</th>
|
| 144 |
+
</tr>
|
| 145 |
+
</thead>
|
| 146 |
+
<tbody>
|
| 147 |
+
<tr>
|
| 148 |
+
<td align="left"><code>value</code></td>
|
| 149 |
+
<td align="left" style="width: 25%;">
|
| 150 |
+
|
| 151 |
+
```python
|
| 152 |
+
typing.Union[str, dict, typing.Callable, NoneType][
|
| 153 |
+
str, dict, Callable, None
|
| 154 |
+
]
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
</td>
|
| 158 |
+
<td align="left"><code>None</code></td>
|
| 159 |
+
<td align="left">The initial value. Can be a string to initialize the text, or a dictionary for full state. If a function is provided, it will be called when the app loads to set the initial value.</td>
|
| 160 |
+
</tr>
|
| 161 |
+
|
| 162 |
+
<tr>
|
| 163 |
+
<td align="left"><code>model</code></td>
|
| 164 |
+
<td align="left" style="width: 25%;">
|
| 165 |
+
|
| 166 |
+
```python
|
| 167 |
+
str
|
| 168 |
+
```
|
| 169 |
+
|
| 170 |
+
</td>
|
| 171 |
+
<td align="left"><code>"Xenova/gpt-3"</code></td>
|
| 172 |
+
<td align="left">The name of a Hugging Face tokenizer to use (must be compatible with Transformers.js). Defaults to "Xenova/gpt-2".</td>
|
| 173 |
+
</tr>
|
| 174 |
+
|
| 175 |
+
<tr>
|
| 176 |
+
<td align="left"><code>display_mode</code></td>
|
| 177 |
+
<td align="left" style="width: 25%;">
|
| 178 |
+
|
| 179 |
+
```python
|
| 180 |
+
"text" | "token_ids" | "hidden"
|
| 181 |
+
```
|
| 182 |
+
|
| 183 |
+
</td>
|
| 184 |
+
<td align="left"><code>"text"</code></td>
|
| 185 |
+
<td align="left">Controls the content of the token visualization panel. Can be 'text' (default), 'token_ids', or 'hidden'.</td>
|
| 186 |
+
</tr>
|
| 187 |
+
|
| 188 |
+
<tr>
|
| 189 |
+
<td align="left"><code>lines</code></td>
|
| 190 |
+
<td align="left" style="width: 25%;">
|
| 191 |
+
|
| 192 |
+
```python
|
| 193 |
+
int
|
| 194 |
+
```
|
| 195 |
+
|
| 196 |
+
</td>
|
| 197 |
+
<td align="left"><code>2</code></td>
|
| 198 |
+
<td align="left">The minimum number of line rows for the textarea.</td>
|
| 199 |
+
</tr>
|
| 200 |
+
|
| 201 |
+
<tr>
|
| 202 |
+
<td align="left"><code>max_lines</code></td>
|
| 203 |
+
<td align="left" style="width: 25%;">
|
| 204 |
+
|
| 205 |
+
```python
|
| 206 |
+
int | None
|
| 207 |
+
```
|
| 208 |
+
|
| 209 |
+
</td>
|
| 210 |
+
<td align="left"><code>None</code></td>
|
| 211 |
+
<td align="left">The maximum number of line rows for the textarea.</td>
|
| 212 |
+
</tr>
|
| 213 |
+
|
| 214 |
+
<tr>
|
| 215 |
+
<td align="left"><code>placeholder</code></td>
|
| 216 |
+
<td align="left" style="width: 25%;">
|
| 217 |
+
|
| 218 |
+
```python
|
| 219 |
+
str | None
|
| 220 |
+
```
|
| 221 |
+
|
| 222 |
+
</td>
|
| 223 |
+
<td align="left"><code>None</code></td>
|
| 224 |
+
<td align="left">A placeholder hint to display in the textarea when it is empty.</td>
|
| 225 |
+
</tr>
|
| 226 |
+
|
| 227 |
+
<tr>
|
| 228 |
+
<td align="left"><code>autofocus</code></td>
|
| 229 |
+
<td align="left" style="width: 25%;">
|
| 230 |
+
|
| 231 |
+
```python
|
| 232 |
+
bool
|
| 233 |
+
```
|
| 234 |
+
|
| 235 |
+
</td>
|
| 236 |
+
<td align="left"><code>False</code></td>
|
| 237 |
+
<td align="left">If True, will focus on the textbox when the page loads.</td>
|
| 238 |
+
</tr>
|
| 239 |
+
|
| 240 |
+
<tr>
|
| 241 |
+
<td align="left"><code>autoscroll</code></td>
|
| 242 |
+
<td align="left" style="width: 25%;">
|
| 243 |
+
|
| 244 |
+
```python
|
| 245 |
+
bool
|
| 246 |
+
```
|
| 247 |
+
|
| 248 |
+
</td>
|
| 249 |
+
<td align="left"><code>True</code></td>
|
| 250 |
+
<td align="left">If True, will automatically scroll to the bottom of the textbox when the value changes.</td>
|
| 251 |
+
</tr>
|
| 252 |
+
|
| 253 |
+
<tr>
|
| 254 |
+
<td align="left"><code>text_align</code></td>
|
| 255 |
+
<td align="left" style="width: 25%;">
|
| 256 |
+
|
| 257 |
+
```python
|
| 258 |
+
typing.Optional[typing.Literal["left", "right"]][
|
| 259 |
+
"left" | "right", None
|
| 260 |
+
]
|
| 261 |
+
```
|
| 262 |
+
|
| 263 |
+
</td>
|
| 264 |
+
<td align="left"><code>None</code></td>
|
| 265 |
+
<td align="left">How to align the text in the textbox, can be: "left" or "right".</td>
|
| 266 |
+
</tr>
|
| 267 |
+
|
| 268 |
+
<tr>
|
| 269 |
+
<td align="left"><code>rtl</code></td>
|
| 270 |
+
<td align="left" style="width: 25%;">
|
| 271 |
+
|
| 272 |
+
```python
|
| 273 |
+
bool
|
| 274 |
+
```
|
| 275 |
+
|
| 276 |
+
</td>
|
| 277 |
+
<td align="left"><code>False</code></td>
|
| 278 |
+
<td align="left">If True, sets the direction of the text to right-to-left.</td>
|
| 279 |
+
</tr>
|
| 280 |
+
|
| 281 |
+
<tr>
|
| 282 |
+
<td align="left"><code>show_copy_button</code></td>
|
| 283 |
+
<td align="left" style="width: 25%;">
|
| 284 |
+
|
| 285 |
+
```python
|
| 286 |
+
bool
|
| 287 |
+
```
|
| 288 |
+
|
| 289 |
+
</td>
|
| 290 |
+
<td align="left"><code>False</code></td>
|
| 291 |
+
<td align="left">If True, a copy button will be shown.</td>
|
| 292 |
+
</tr>
|
| 293 |
+
|
| 294 |
+
<tr>
|
| 295 |
+
<td align="left"><code>max_length</code></td>
|
| 296 |
+
<td align="left" style="width: 25%;">
|
| 297 |
+
|
| 298 |
+
```python
|
| 299 |
+
int | None
|
| 300 |
+
```
|
| 301 |
+
|
| 302 |
+
</td>
|
| 303 |
+
<td align="left"><code>None</code></td>
|
| 304 |
+
<td align="left">The maximum number of characters allowed in the textbox.</td>
|
| 305 |
+
</tr>
|
| 306 |
+
|
| 307 |
+
<tr>
|
| 308 |
+
<td align="left"><code>label</code></td>
|
| 309 |
+
<td align="left" style="width: 25%;">
|
| 310 |
+
|
| 311 |
+
```python
|
| 312 |
+
str | None
|
| 313 |
+
```
|
| 314 |
+
|
| 315 |
+
</td>
|
| 316 |
+
<td align="left"><code>None</code></td>
|
| 317 |
+
<td align="left">The label for this component, displayed above the component.</td>
|
| 318 |
+
</tr>
|
| 319 |
+
|
| 320 |
+
<tr>
|
| 321 |
+
<td align="left"><code>info</code></td>
|
| 322 |
+
<td align="left" style="width: 25%;">
|
| 323 |
+
|
| 324 |
+
```python
|
| 325 |
+
str | None
|
| 326 |
+
```
|
| 327 |
+
|
| 328 |
+
</td>
|
| 329 |
+
<td align="left"><code>None</code></td>
|
| 330 |
+
<td align="left">Additional component description, displayed below the label.</td>
|
| 331 |
+
</tr>
|
| 332 |
+
|
| 333 |
+
<tr>
|
| 334 |
+
<td align="left"><code>every</code></td>
|
| 335 |
+
<td align="left" style="width: 25%;">
|
| 336 |
+
|
| 337 |
+
```python
|
| 338 |
+
float | None
|
| 339 |
+
```
|
| 340 |
+
|
| 341 |
+
</td>
|
| 342 |
+
<td align="left"><code>None</code></td>
|
| 343 |
+
<td align="left">If `value` is a callable, this sets a timer to run the function repeatedly.</td>
|
| 344 |
+
</tr>
|
| 345 |
+
|
| 346 |
+
<tr>
|
| 347 |
+
<td align="left"><code>show_label</code></td>
|
| 348 |
+
<td align="left" style="width: 25%;">
|
| 349 |
+
|
| 350 |
+
```python
|
| 351 |
+
bool
|
| 352 |
+
```
|
| 353 |
+
|
| 354 |
+
</td>
|
| 355 |
+
<td align="left"><code>True</code></td>
|
| 356 |
+
<td align="left">If False, the label is not displayed.</td>
|
| 357 |
+
</tr>
|
| 358 |
+
|
| 359 |
+
<tr>
|
| 360 |
+
<td align="left"><code>container</code></td>
|
| 361 |
+
<td align="left" style="width: 25%;">
|
| 362 |
+
|
| 363 |
+
```python
|
| 364 |
+
bool
|
| 365 |
+
```
|
| 366 |
+
|
| 367 |
+
</td>
|
| 368 |
+
<td align="left"><code>True</code></td>
|
| 369 |
+
<td align="left">If False, the component will not be wrapped in a container.</td>
|
| 370 |
+
</tr>
|
| 371 |
+
|
| 372 |
+
<tr>
|
| 373 |
+
<td align="left"><code>scale</code></td>
|
| 374 |
+
<td align="left" style="width: 25%;">
|
| 375 |
+
|
| 376 |
+
```python
|
| 377 |
+
int | None
|
| 378 |
+
```
|
| 379 |
+
|
| 380 |
+
</td>
|
| 381 |
+
<td align="left"><code>None</code></td>
|
| 382 |
+
<td align="left">The relative size of the component compared to others in a `gr.Row` or `gr.Column`.</td>
|
| 383 |
+
</tr>
|
| 384 |
+
|
| 385 |
+
<tr>
|
| 386 |
+
<td align="left"><code>min_width</code></td>
|
| 387 |
+
<td align="left" style="width: 25%;">
|
| 388 |
+
|
| 389 |
+
```python
|
| 390 |
+
int
|
| 391 |
+
```
|
| 392 |
+
|
| 393 |
+
</td>
|
| 394 |
+
<td align="left"><code>160</code></td>
|
| 395 |
+
<td align="left">The minimum-width of the component in pixels.</td>
|
| 396 |
+
</tr>
|
| 397 |
+
|
| 398 |
+
<tr>
|
| 399 |
+
<td align="left"><code>interactive</code></td>
|
| 400 |
+
<td align="left" style="width: 25%;">
|
| 401 |
+
|
| 402 |
+
```python
|
| 403 |
+
bool | None
|
| 404 |
+
```
|
| 405 |
+
|
| 406 |
+
</td>
|
| 407 |
+
<td align="left"><code>None</code></td>
|
| 408 |
+
<td align="left">If False, the user will not be able to edit the text.</td>
|
| 409 |
+
</tr>
|
| 410 |
+
|
| 411 |
+
<tr>
|
| 412 |
+
<td align="left"><code>visible</code></td>
|
| 413 |
+
<td align="left" style="width: 25%;">
|
| 414 |
+
|
| 415 |
+
```python
|
| 416 |
+
bool
|
| 417 |
+
```
|
| 418 |
+
|
| 419 |
+
</td>
|
| 420 |
+
<td align="left"><code>True</code></td>
|
| 421 |
+
<td align="left">If False, the component will be hidden.</td>
|
| 422 |
+
</tr>
|
| 423 |
+
|
| 424 |
+
<tr>
|
| 425 |
+
<td align="left"><code>elem_id</code></td>
|
| 426 |
+
<td align="left" style="width: 25%;">
|
| 427 |
+
|
| 428 |
+
```python
|
| 429 |
+
str | None
|
| 430 |
+
```
|
| 431 |
+
|
| 432 |
+
</td>
|
| 433 |
+
<td align="left"><code>None</code></td>
|
| 434 |
+
<td align="left">An optional string that is assigned as the id of this component in the HTML DOM.</td>
|
| 435 |
+
</tr>
|
| 436 |
+
|
| 437 |
+
<tr>
|
| 438 |
+
<td align="left"><code>elem_classes</code></td>
|
| 439 |
+
<td align="left" style="width: 25%;">
|
| 440 |
+
|
| 441 |
+
```python
|
| 442 |
+
list[str] | str | None
|
| 443 |
+
```
|
| 444 |
+
|
| 445 |
+
</td>
|
| 446 |
+
<td align="left"><code>None</code></td>
|
| 447 |
+
<td align="left">An optional list of strings that are assigned as the classes of this component in the HTML DOM.</td>
|
| 448 |
+
</tr>
|
| 449 |
+
</tbody></table>
|
| 450 |
+
|
| 451 |
+
|
| 452 |
+
### Events
|
| 453 |
+
|
| 454 |
+
| name | description |
|
| 455 |
+
|:-----|:------------|
|
| 456 |
+
| `change` | Triggered when the value of the TokenizerTextBox changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See `.input()` for a listener that is only triggered by user input. |
|
| 457 |
+
| `input` | This listener is triggered when the user changes the value of the TokenizerTextBox. |
|
| 458 |
+
| `submit` | This listener is triggered when the user presses the Enter key while the TokenizerTextBox is focused. |
|
| 459 |
+
| `blur` | This listener is triggered when the TokenizerTextBox is unfocused/blurred. |
|
| 460 |
+
| `select` | Event listener for when the user selects or deselects the TokenizerTextBox. Uses event data gradio.SelectData to carry `value` referring to the label of the TokenizerTextBox, and `selected` to refer to state of the TokenizerTextBox. See EventData documentation on how to use this event data |
|
| 461 |
+
|
| 462 |
+
|
| 463 |
+
|
| 464 |
+
### User function
|
| 465 |
+
|
| 466 |
+
The impact on the users predict function varies depending on whether the component is used as an input or output for an event (or both).
|
| 467 |
+
|
| 468 |
+
- When used as an Input, the component only impacts the input signature of the user function.
|
| 469 |
+
- When used as an output, the component only impacts the return signature of the user function.
|
| 470 |
+
|
| 471 |
+
The code snippet below is accurate in cases where the component is used as both an input and an output.
|
| 472 |
+
|
| 473 |
+
- **As output:** Is passed, a dictionary enriched with 'char_count' and 'token_count'.
|
| 474 |
+
- **As input:** Should return, the value to set for the component, can be a string or a dictionary.
|
| 475 |
+
|
| 476 |
+
```python
|
| 477 |
+
def predict(
|
| 478 |
+
value: dict | None
|
| 479 |
+
) -> str | dict | None:
|
| 480 |
+
return value
|
| 481 |
+
```
|
| 482 |
+
|
src/backend/gradio_tokenizertextbox/__init__.py
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
from .tokenizertextbox import TokenizerTextBox
|
| 3 |
+
|
| 4 |
+
__all__ = ['TokenizerTextBox']
|
src/backend/gradio_tokenizertextbox/templates/component/Index-DiS7y4tI.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
src/backend/gradio_tokenizertextbox/templ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E1r1.js";
|
| 2 |
+
import { aK as g, aA as E, aL as F, aM as _, aN as $, aO as l, aP as B, aQ as S, aR as T, aS as y } from "./mermaid.core-CfPtPiLZ.js";
|
| 3 |
+
var L = /\s/;
|
| 4 |
+
function R(n) {
|
| 5 |
+
for (var r = n.length; r-- && L.test(n.charAt(r)); )
|
| 6 |
+
;
|
| 7 |
+
return r;
|
| 8 |
+
}
|
| 9 |
+
var G = /^\s+/;
|
| 10 |
+
function H(n) {
|
| 11 |
+
return n && n.slice(0, R(n) + 1).replace(G, "");
|
| 12 |
+
}
|
| 13 |
+
var o = NaN, K = /^[-+]0x[0-9a-f]+$/i, q = /^0b[01]+$/i, z = /^0o[0-7]+$/i, C = parseInt;
|
| 14 |
+
function Q(n) {
|
| 15 |
+
if (typeof n == "number")
|
| 16 |
+
return n;
|
| 17 |
+
if (x(n))
|
| 18 |
+
return o;
|
| 19 |
+
if (g(n)) {
|
| 20 |
+
var r = typeof n.valueOf == "function" ? n.valueOf() : n;
|
| 21 |
+
n = g(r) ? r + "" : r;
|
| 22 |
+
}
|
| 23 |
+
if (typeof n != "string")
|
| 24 |
+
return n === 0 ? n : +n;
|
| 25 |
+
n = H(n);
|
| 26 |
+
var t = q.test(n);
|
| 27 |
+
return t || z.test(n) ? C(n.slice(2), t ? 2 : 8) : K.test(n) ? o : +n;
|
| 28 |
+
}
|
| 29 |
+
var v = 1 / 0, W = 17976931348623157e292;
|
| 30 |
+
function X(n) {
|
| 31 |
+
if (!n)
|
| 32 |
+
return n === 0 ? n : 0;
|
| 33 |
+
if (n = Q(n), n === v || n === -v) {
|
| 34 |
+
var r = n < 0 ? -1 : 1;
|
| 35 |
+
return r * W;
|
| 36 |
+
}
|
| 37 |
+
return n === n ? n : 0;
|
| 38 |
+
}
|
| 39 |
+
function Y(n) {
|
| 40 |
+
var r = X(n), t = r % 1;
|
| 41 |
+
return r === r ? t ? r - t : r : 0;
|
| 42 |
+
}
|
| 43 |
+
function fn(n) {
|
| 44 |
+
var r = n == null ? 0 : n.length;
|
| 45 |
+
return r ? b(n) : [];
|
| 46 |
+
}
|
| 47 |
+
var O = Object.prototype, D = O.hasOwnProperty, dn = E(function(n, r) {
|
| 48 |
+
n = Object(n);
|
| 49 |
+
var t = -1, i = r.length, a = i > 2 ? r[2] : void 0;
|
| 50 |
+
for (a && F(r[0], r[1], a) && (i = 1); ++t < i; )
|
| 51 |
+
for (var f = r[t], e = _(f), s = -1, d = e.length; ++s < d; ) {
|
| 52 |
+
var u = e[s], h = n[u];
|
| 53 |
+
(h === void 0 || $(h, O[u]) && !D.call(n, u)) && (n[u] = f[u]);
|
| 54 |
+
}
|
| 55 |
+
return n;
|
| 56 |
+
});
|
| 57 |
+
function un(n) {
|
| 58 |
+
var r = n == null ? 0 : n.length;
|
| 59 |
+
return r ? n[r - 1] : void 0;
|
| 60 |
+
}
|
| 61 |
+
function J(n) {
|
| 62 |
+
return function(r, t, i) {
|
| 63 |
+
var a = Object(r);
|
| 64 |
+
if (!l(r)) {
|
| 65 |
+
var f = m(t);
|
| 66 |
+
r = P(r), t = function(s) {
|
| 67 |
+
return f(a[s], s, a);
|
| 68 |
+
};
|
| 69 |
+
}
|
| 70 |
+
var e = n(r, t, i);
|
| 71 |
+
return e > -1 ? a[f ? r[e] : e] : void 0;
|
| 72 |
+
};
|
| 73 |
+
}
|
| 74 |
+
var U = Math.max;
|
| 75 |
+
function Z(n, r, t) {
|
| 76 |
+
var i = n == null ? 0 : n.length;
|
| 77 |
+
if (!i)
|
| 78 |
+
return -1;
|
| 79 |
+
var a = t == null ? 0 : Y(t);
|
| 80 |
+
return a < 0 && (a = U(i + a, 0)), p(n, m(r), a);
|
| 81 |
+
}
|
| 82 |
+
var hn = J(Z);
|
| 83 |
+
function V(n, r) {
|
| 84 |
+
var t = -1, i = l(n) ? Array(n.length) : [];
|
| 85 |
+
return w(n, function(a, f, e) {
|
| 86 |
+
i[++t] = r(a, f, e);
|
| 87 |
+
}), i;
|
| 88 |
+
}
|
| 89 |
+
function gn(n, r) {
|
| 90 |
+
var t = B(n) ? A : V;
|
| 91 |
+
return t(n, m(r));
|
| 92 |
+
}
|
| 93 |
+
var j = Object.prototype, k = j.hasOwnProperty;
|
| 94 |
+
function nn(n, r) {
|
| 95 |
+
return n != null && k.call(n, r);
|
| 96 |
+
}
|
| 97 |
+
function mn(n, r) {
|
| 98 |
+
return n != null && N(n, r, nn);
|
| 99 |
+
}
|
| 100 |
+
function rn(n, r) {
|
| 101 |
+
return n < r;
|
| 102 |
+
}
|
| 103 |
+
function tn(n, r, t) {
|
| 104 |
+
for (var i = -1, a = n.length; ++i < a; ) {
|
| 105 |
+
var f = n[i], e = r(f);
|
| 106 |
+
if (e != null && (s === void 0 ? e === e && !x(e) : t(e, s)))
|
| 107 |
+
var s = e, d = f;
|
| 108 |
+
}
|
| 109 |
+
return d;
|
| 110 |
+
}
|
| 111 |
+
function on(n) {
|
| 112 |
+
return n && n.length ? tn(n, S, rn) : void 0;
|
| 113 |
+
}
|
| 114 |
+
function an(n, r, t, i) {
|
| 115 |
+
if (!g(n))
|
| 116 |
+
return n;
|
| 117 |
+
r = I(r, n);
|
| 118 |
+
for (var a = -1, f = r.length, e = f - 1, s = n; s != null && ++a < f; ) {
|
| 119 |
+
var d = c(r[a]), u = t;
|
| 120 |
+
if (d === "__proto__" || d === "constructor" || d === "prototype")
|
| 121 |
+
return n;
|
| 122 |
+
if (a != e) {
|
| 123 |
+
var h = s[d];
|
| 124 |
+
u = void 0, u === void 0 && (u = g(h) ? h : T(r[a + 1]) ? [] : {});
|
| 125 |
+
}
|
| 126 |
+
y(s, d, u), s = s[d];
|
| 127 |
+
}
|
| 128 |
+
return n;
|
| 129 |
+
}
|
| 130 |
+
function vn(n, r, t) {
|
| 131 |
+
for (var i = -1, a = r.length, f = {}; ++i < a; ) {
|
| 132 |
+
var e = r[i], s = M(n, e);
|
| 133 |
+
t(s, e) && an(f, I(e, n), s);
|
| 134 |
+
}
|
| 135 |
+
return f;
|
| 136 |
+
}
|
| 137 |
+
export {
|
| 138 |
+
rn as a,
|
| 139 |
+
tn as b,
|
| 140 |
+
V as c,
|
| 141 |
+
vn as d,
|
| 142 |
+
on as e,
|
| 143 |
+
fn as f,
|
| 144 |
+
hn as g,
|
| 145 |
+
mn as h,
|
| 146 |
+
dn as i,
|
| 147 |
+
Y as j,
|
| 148 |
+
un as l,
|
| 149 |
+
gn as m,
|
| 150 |
+
X as t
|
| 151 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/_baseUniq-_084E1r1.js
ADDED
|
@@ -0,0 +1,614 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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n as Dn, bo as D, bp as Gn, bq as Nn, br as _, aS as Un, bs as Bn, aN as Kn, bt as Q, bu as jn, bv as Hn, aR as qn, aQ as cn, b6 as Yn, bw as m } from "./mermaid.core-CfPtPiLZ.js";
|
| 2 |
+
var Zn = "[object Symbol]";
|
| 3 |
+
function U(n) {
|
| 4 |
+
return typeof n == "symbol" || S(n) && Rn(n) == Zn;
|
| 5 |
+
}
|
| 6 |
+
function bn(n, r) {
|
| 7 |
+
for (var e = -1, t = n == null ? 0 : n.length, f = Array(t); ++e < t; )
|
| 8 |
+
f[e] = r(n[e], e, n);
|
| 9 |
+
return f;
|
| 10 |
+
}
|
| 11 |
+
var X = w ? w.prototype : void 0, J = X ? X.toString : void 0;
|
| 12 |
+
function dn(n) {
|
| 13 |
+
if (typeof n == "string")
|
| 14 |
+
return n;
|
| 15 |
+
if (T(n))
|
| 16 |
+
return bn(n, dn) + "";
|
| 17 |
+
if (U(n))
|
| 18 |
+
return J ? J.call(n) : "";
|
| 19 |
+
var r = n + "";
|
| 20 |
+
return r == "0" && 1 / n == -1 / 0 ? "-0" : r;
|
| 21 |
+
}
|
| 22 |
+
function Qn() {
|
| 23 |
+
}
|
| 24 |
+
function pn(n, r) {
|
| 25 |
+
for (var e = -1, t = n == null ? 0 : n.length; ++e < t && r(n[e], e, n) !== !1; )
|
| 26 |
+
;
|
| 27 |
+
return n;
|
| 28 |
+
}
|
| 29 |
+
function Xn(n, r, e, t) {
|
| 30 |
+
for (var f = n.length, i = e + -1; ++i < f; )
|
| 31 |
+
if (r(n[i], i, n))
|
| 32 |
+
return i;
|
| 33 |
+
return -1;
|
| 34 |
+
}
|
| 35 |
+
function Jn(n) {
|
| 36 |
+
return n !== n;
|
| 37 |
+
}
|
| 38 |
+
function Wn(n, r, e) {
|
| 39 |
+
for (var t = e - 1, f = n.length; ++t < f; )
|
| 40 |
+
if (n[t] === r)
|
| 41 |
+
return t;
|
| 42 |
+
return -1;
|
| 43 |
+
}
|
| 44 |
+
function zn(n, r, e) {
|
| 45 |
+
return r === r ? Wn(n, r, e) : Xn(n, Jn, e);
|
| 46 |
+
}
|
| 47 |
+
function Vn(n, r) {
|
| 48 |
+
var e = n == null ? 0 : n.length;
|
| 49 |
+
return !!e && zn(n, r, 0) > -1;
|
| 50 |
+
}
|
| 51 |
+
function $(n) {
|
| 52 |
+
return sn(n) ? xn(n) : Mn(n);
|
| 53 |
+
}
|
| 54 |
+
var kn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, nr = /^\w*$/;
|
| 55 |
+
function B(n, r) {
|
| 56 |
+
if (T(n))
|
| 57 |
+
return !1;
|
| 58 |
+
var e = typeof n;
|
| 59 |
+
return e == "number" || e == "symbol" || e == "boolean" || n == null || U(n) ? !0 : nr.test(n) || !kn.test(n) || r != null && n in Object(r);
|
| 60 |
+
}
|
| 61 |
+
var rr = 500;
|
| 62 |
+
function er(n) {
|
| 63 |
+
var r = mn(n, function(t) {
|
| 64 |
+
return e.size === rr && e.clear(), t;
|
| 65 |
+
}), e = r.cache;
|
| 66 |
+
return r;
|
| 67 |
+
}
|
| 68 |
+
var tr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, ir = /\\(\\)?/g, fr = er(function(n) {
|
| 69 |
+
var r = [];
|
| 70 |
+
return n.charCodeAt(0) === 46 && r.push(""), n.replace(tr, function(e, t, f, i) {
|
| 71 |
+
r.push(f ? i.replace(ir, "$1") : t || e);
|
| 72 |
+
}), r;
|
| 73 |
+
});
|
| 74 |
+
function ar(n) {
|
| 75 |
+
return n == null ? "" : dn(n);
|
| 76 |
+
}
|
| 77 |
+
function An(n, r) {
|
| 78 |
+
return T(n) ? n : B(n, r) ? [n] : fr(ar(n));
|
| 79 |
+
}
|
| 80 |
+
function M(n) {
|
| 81 |
+
if (typeof n == "string" || U(n))
|
| 82 |
+
return n;
|
| 83 |
+
var r = n + "";
|
| 84 |
+
return r == "0" && 1 / n == -1 / 0 ? "-0" : r;
|
| 85 |
+
}
|
| 86 |
+
function yn(n, r) {
|
| 87 |
+
r = An(r, n);
|
| 88 |
+
for (var e = 0, t = r.length; n != null && e < t; )
|
| 89 |
+
n = n[M(r[e++])];
|
| 90 |
+
return e && e == t ? n : void 0;
|
| 91 |
+
}
|
| 92 |
+
function sr(n, r, e) {
|
| 93 |
+
var t = n == null ? void 0 : yn(n, r);
|
| 94 |
+
return t === void 0 ? e : t;
|
| 95 |
+
}
|
| 96 |
+
function K(n, r) {
|
| 97 |
+
for (var e = -1, t = r.length, f = n.length; ++e < t; )
|
| 98 |
+
n[f + e] = r[e];
|
| 99 |
+
return n;
|
| 100 |
+
}
|
| 101 |
+
var W = w ? w.isConcatSpreadable : void 0;
|
| 102 |
+
function ur(n) {
|
| 103 |
+
return T(n) || un(n) || !!(W && n && n[W]);
|
| 104 |
+
}
|
| 105 |
+
function Ot(n, r, e, t, f) {
|
| 106 |
+
var i = -1, a = n.length;
|
| 107 |
+
for (e || (e = ur), f || (f = []); ++i < a; ) {
|
| 108 |
+
var s = n[i];
|
| 109 |
+
e(s) ? K(f, s) : t || (f[f.length] = s);
|
| 110 |
+
}
|
| 111 |
+
return f;
|
| 112 |
+
}
|
| 113 |
+
function or(n, r, e, t) {
|
| 114 |
+
var f = -1, i = n == null ? 0 : n.length;
|
| 115 |
+
for (t && i && (e = n[++f]); ++f < i; )
|
| 116 |
+
e = r(e, n[f], f, n);
|
| 117 |
+
return e;
|
| 118 |
+
}
|
| 119 |
+
function gr(n, r) {
|
| 120 |
+
return n && x(r, $(r), n);
|
| 121 |
+
}
|
| 122 |
+
function lr(n, r) {
|
| 123 |
+
return n && x(r, N(r), n);
|
| 124 |
+
}
|
| 125 |
+
function Tn(n, r) {
|
| 126 |
+
for (var e = -1, t = n == null ? 0 : n.length, f = 0, i = []; ++e < t; ) {
|
| 127 |
+
var a = n[e];
|
| 128 |
+
r(a, e, n) && (i[f++] = a);
|
| 129 |
+
}
|
| 130 |
+
return i;
|
| 131 |
+
}
|
| 132 |
+
function hn() {
|
| 133 |
+
return [];
|
| 134 |
+
}
|
| 135 |
+
var cr = Object.prototype, br = cr.propertyIsEnumerable, z = Object.getOwnPropertySymbols, j = z ? function(n) {
|
| 136 |
+
return n == null ? [] : (n = Object(n), Tn(z(n), function(r) {
|
| 137 |
+
return br.call(n, r);
|
| 138 |
+
}));
|
| 139 |
+
} : hn;
|
| 140 |
+
function dr(n, r) {
|
| 141 |
+
return x(n, j(n), r);
|
| 142 |
+
}
|
| 143 |
+
var pr = Object.getOwnPropertySymbols, wn = pr ? function(n) {
|
| 144 |
+
for (var r = []; n; )
|
| 145 |
+
K(r, j(n)), n = Cn(n);
|
| 146 |
+
return r;
|
| 147 |
+
} : hn;
|
| 148 |
+
function Ar(n, r) {
|
| 149 |
+
return x(n, wn(n), r);
|
| 150 |
+
}
|
| 151 |
+
function On(n, r, e) {
|
| 152 |
+
var t = r(n);
|
| 153 |
+
return T(n) ? t : K(t, e(n));
|
| 154 |
+
}
|
| 155 |
+
function G(n) {
|
| 156 |
+
return On(n, $, j);
|
| 157 |
+
}
|
| 158 |
+
function yr(n) {
|
| 159 |
+
return On(n, N, wn);
|
| 160 |
+
}
|
| 161 |
+
var Tr = Object.prototype, hr = Tr.hasOwnProperty;
|
| 162 |
+
function wr(n) {
|
| 163 |
+
var r = n.length, e = new n.constructor(r);
|
| 164 |
+
return r && typeof n[0] == "string" && hr.call(n, "index") && (e.index = n.index, e.input = n.input), e;
|
| 165 |
+
}
|
| 166 |
+
function Or(n, r) {
|
| 167 |
+
var e = r ? on(n.buffer) : n.buffer;
|
| 168 |
+
return new n.constructor(e, n.byteOffset, n.byteLength);
|
| 169 |
+
}
|
| 170 |
+
var $r = /\w*$/;
|
| 171 |
+
function _r(n) {
|
| 172 |
+
var r = new n.constructor(n.source, $r.exec(n));
|
| 173 |
+
return r.lastIndex = n.lastIndex, r;
|
| 174 |
+
}
|
| 175 |
+
var V = w ? w.prototype : void 0, k = V ? V.valueOf : void 0;
|
| 176 |
+
function Sr(n) {
|
| 177 |
+
return k ? Object(k.call(n)) : {};
|
| 178 |
+
}
|
| 179 |
+
var Er = "[object Boolean]", Pr = "[object Date]", Ir = "[object Map]", vr = "[object Number]", Lr = "[object RegExp]", Rr = "[object Set]", xr = "[object String]", Mr = "[object Symbol]", mr = "[object ArrayBuffer]", Cr = "[object DataView]", Fr = "[object Float32Array]", Dr = "[object Float64Array]", Gr = "[object Int8Array]", Nr = "[object Int16Array]", Ur = "[object Int32Array]", Br = "[object Uint8Array]", Kr = "[object Uint8ClampedArray]", jr = "[object Uint16Array]", Hr = "[object Uint32Array]";
|
| 180 |
+
function qr(n, r, e) {
|
| 181 |
+
var t = n.constructor;
|
| 182 |
+
switch (r) {
|
| 183 |
+
case mr:
|
| 184 |
+
return on(n);
|
| 185 |
+
case Er:
|
| 186 |
+
case Pr:
|
| 187 |
+
return new t(+n);
|
| 188 |
+
case Cr:
|
| 189 |
+
return Or(n, e);
|
| 190 |
+
case Fr:
|
| 191 |
+
case Dr:
|
| 192 |
+
case Gr:
|
| 193 |
+
case Nr:
|
| 194 |
+
case Ur:
|
| 195 |
+
case Br:
|
| 196 |
+
case Kr:
|
| 197 |
+
case jr:
|
| 198 |
+
case Hr:
|
| 199 |
+
return Fn(n, e);
|
| 200 |
+
case Ir:
|
| 201 |
+
return new t();
|
| 202 |
+
case vr:
|
| 203 |
+
case xr:
|
| 204 |
+
return new t(n);
|
| 205 |
+
case Lr:
|
| 206 |
+
return _r(n);
|
| 207 |
+
case Rr:
|
| 208 |
+
return new t();
|
| 209 |
+
case Mr:
|
| 210 |
+
return Sr(n);
|
| 211 |
+
}
|
| 212 |
+
}
|
| 213 |
+
var Yr = "[object Map]";
|
| 214 |
+
function Zr(n) {
|
| 215 |
+
return S(n) && E(n) == Yr;
|
| 216 |
+
}
|
| 217 |
+
var nn = R && R.isMap, Qr = nn ? gn(nn) : Zr, Xr = "[object Set]";
|
| 218 |
+
function Jr(n) {
|
| 219 |
+
return S(n) && E(n) == Xr;
|
| 220 |
+
}
|
| 221 |
+
var rn = R && R.isSet, Wr = rn ? gn(rn) : Jr, zr = 1, Vr = 2, kr = 4, $n = "[object Arguments]", ne = "[object Array]", re = "[object Boolean]", ee = "[object Date]", te = "[object Error]", _n = "[object Function]", ie = "[object GeneratorFunction]", fe = "[object Map]", ae = "[object Number]", Sn = "[object Object]", se = "[object RegExp]", ue = "[object Set]", oe = "[object String]", ge = "[object Symbol]", le = "[object WeakMap]", ce = "[object ArrayBuffer]", be = "[object DataView]", de = "[object Float32Array]", pe = "[object Float64Array]", Ae = "[object Int8Array]", ye = "[object Int16Array]", Te = "[object Int32Array]", he = "[object Uint8Array]", we = "[object Uint8ClampedArray]", Oe = "[object Uint16Array]", $e = "[object Uint32Array]", g = {};
|
| 222 |
+
g[$n] = g[ne] = g[ce] = g[be] = g[re] = g[ee] = g[de] = g[pe] = g[Ae] = g[ye] = g[Te] = g[fe] = g[ae] = g[Sn] = g[se] = g[ue] = g[oe] = g[ge] = g[he] = g[we] = g[Oe] = g[$e] = !0;
|
| 223 |
+
g[te] = g[_n] = g[le] = !1;
|
| 224 |
+
function C(n, r, e, t, f, i) {
|
| 225 |
+
var a, s = r & zr, u = r & Vr, b = r & kr;
|
| 226 |
+
if (a !== void 0)
|
| 227 |
+
return a;
|
| 228 |
+
if (!ln(n))
|
| 229 |
+
return n;
|
| 230 |
+
var l = T(n);
|
| 231 |
+
if (l) {
|
| 232 |
+
if (a = wr(n), !s)
|
| 233 |
+
return Dn(n, a);
|
| 234 |
+
} else {
|
| 235 |
+
var o = E(n), c = o == _n || o == ie;
|
| 236 |
+
if (D(n))
|
| 237 |
+
return Gn(n, s);
|
| 238 |
+
if (o == Sn || o == $n || c && !f) {
|
| 239 |
+
if (a = u || c ? {} : Nn(n), !s)
|
| 240 |
+
return u ? Ar(n, lr(a, n)) : dr(n, gr(a, n));
|
| 241 |
+
} else {
|
| 242 |
+
if (!g[o])
|
| 243 |
+
return f ? n : {};
|
| 244 |
+
a = qr(n, o, s);
|
| 245 |
+
}
|
| 246 |
+
}
|
| 247 |
+
i || (i = new _());
|
| 248 |
+
var h = i.get(n);
|
| 249 |
+
if (h)
|
| 250 |
+
return h;
|
| 251 |
+
i.set(n, a), Wr(n) ? n.forEach(function(d) {
|
| 252 |
+
a.add(C(d, r, e, d, n, i));
|
| 253 |
+
}) : Qr(n) && n.forEach(function(d, p) {
|
| 254 |
+
a.set(p, C(d, r, e, p, n, i));
|
| 255 |
+
});
|
| 256 |
+
var A = b ? u ? yr : G : u ? N : $, y = l ? void 0 : A(n);
|
| 257 |
+
return pn(y || n, function(d, p) {
|
| 258 |
+
y && (p = d, d = n[p]), Un(a, p, C(d, r, e, p, n, i));
|
| 259 |
+
}), a;
|
| 260 |
+
}
|
| 261 |
+
var _e = "__lodash_hash_undefined__";
|
| 262 |
+
function Se(n) {
|
| 263 |
+
return this.__data__.set(n, _e), this;
|
| 264 |
+
}
|
| 265 |
+
function Ee(n) {
|
| 266 |
+
return this.__data__.has(n);
|
| 267 |
+
}
|
| 268 |
+
function P(n) {
|
| 269 |
+
var r = -1, e = n == null ? 0 : n.length;
|
| 270 |
+
for (this.__data__ = new Bn(); ++r < e; )
|
| 271 |
+
this.add(n[r]);
|
| 272 |
+
}
|
| 273 |
+
P.prototype.add = P.prototype.push = Se;
|
| 274 |
+
P.prototype.has = Ee;
|
| 275 |
+
function Pe(n, r) {
|
| 276 |
+
for (var e = -1, t = n == null ? 0 : n.length; ++e < t; )
|
| 277 |
+
if (r(n[e], e, n))
|
| 278 |
+
return !0;
|
| 279 |
+
return !1;
|
| 280 |
+
}
|
| 281 |
+
function En(n, r) {
|
| 282 |
+
return n.has(r);
|
| 283 |
+
}
|
| 284 |
+
var Ie = 1, ve = 2;
|
| 285 |
+
function Pn(n, r, e, t, f, i) {
|
| 286 |
+
var a = e & Ie, s = n.length, u = r.length;
|
| 287 |
+
if (s != u && !(a && u > s))
|
| 288 |
+
return !1;
|
| 289 |
+
var b = i.get(n), l = i.get(r);
|
| 290 |
+
if (b && l)
|
| 291 |
+
return b == r && l == n;
|
| 292 |
+
var o = -1, c = !0, h = e & ve ? new P() : void 0;
|
| 293 |
+
for (i.set(n, r), i.set(r, n); ++o < s; ) {
|
| 294 |
+
var A = n[o], y = r[o];
|
| 295 |
+
if (t)
|
| 296 |
+
var d = a ? t(y, A, o, r, n, i) : t(A, y, o, n, r, i);
|
| 297 |
+
if (d !== void 0) {
|
| 298 |
+
if (d)
|
| 299 |
+
continue;
|
| 300 |
+
c = !1;
|
| 301 |
+
break;
|
| 302 |
+
}
|
| 303 |
+
if (h) {
|
| 304 |
+
if (!Pe(r, function(p, O) {
|
| 305 |
+
if (!En(h, O) && (A === p || f(A, p, e, t, i)))
|
| 306 |
+
return h.push(O);
|
| 307 |
+
})) {
|
| 308 |
+
c = !1;
|
| 309 |
+
break;
|
| 310 |
+
}
|
| 311 |
+
} else if (!(A === y || f(A, y, e, t, i))) {
|
| 312 |
+
c = !1;
|
| 313 |
+
break;
|
| 314 |
+
}
|
| 315 |
+
}
|
| 316 |
+
return i.delete(n), i.delete(r), c;
|
| 317 |
+
}
|
| 318 |
+
function Le(n) {
|
| 319 |
+
var r = -1, e = Array(n.size);
|
| 320 |
+
return n.forEach(function(t, f) {
|
| 321 |
+
e[++r] = [f, t];
|
| 322 |
+
}), e;
|
| 323 |
+
}
|
| 324 |
+
function H(n) {
|
| 325 |
+
var r = -1, e = Array(n.size);
|
| 326 |
+
return n.forEach(function(t) {
|
| 327 |
+
e[++r] = t;
|
| 328 |
+
}), e;
|
| 329 |
+
}
|
| 330 |
+
var Re = 1, xe = 2, Me = "[object Boolean]", me = "[object Date]", Ce = "[object Error]", Fe = "[object Map]", De = "[object Number]", Ge = "[object RegExp]", Ne = "[object Set]", Ue = "[object String]", Be = "[object Symbol]", Ke = "[object ArrayBuffer]", je = "[object DataView]", en = w ? w.prototype : void 0, F = en ? en.valueOf : void 0;
|
| 331 |
+
function He(n, r, e, t, f, i, a) {
|
| 332 |
+
switch (e) {
|
| 333 |
+
case je:
|
| 334 |
+
if (n.byteLength != r.byteLength || n.byteOffset != r.byteOffset)
|
| 335 |
+
return !1;
|
| 336 |
+
n = n.buffer, r = r.buffer;
|
| 337 |
+
case Ke:
|
| 338 |
+
return !(n.byteLength != r.byteLength || !i(new Q(n), new Q(r)));
|
| 339 |
+
case Me:
|
| 340 |
+
case me:
|
| 341 |
+
case De:
|
| 342 |
+
return Kn(+n, +r);
|
| 343 |
+
case Ce:
|
| 344 |
+
return n.name == r.name && n.message == r.message;
|
| 345 |
+
case Ge:
|
| 346 |
+
case Ue:
|
| 347 |
+
return n == r + "";
|
| 348 |
+
case Fe:
|
| 349 |
+
var s = Le;
|
| 350 |
+
case Ne:
|
| 351 |
+
var u = t & Re;
|
| 352 |
+
if (s || (s = H), n.size != r.size && !u)
|
| 353 |
+
return !1;
|
| 354 |
+
var b = a.get(n);
|
| 355 |
+
if (b)
|
| 356 |
+
return b == r;
|
| 357 |
+
t |= xe, a.set(n, r);
|
| 358 |
+
var l = Pn(s(n), s(r), t, f, i, a);
|
| 359 |
+
return a.delete(n), l;
|
| 360 |
+
case Be:
|
| 361 |
+
if (F)
|
| 362 |
+
return F.call(n) == F.call(r);
|
| 363 |
+
}
|
| 364 |
+
return !1;
|
| 365 |
+
}
|
| 366 |
+
var qe = 1, Ye = Object.prototype, Ze = Ye.hasOwnProperty;
|
| 367 |
+
function Qe(n, r, e, t, f, i) {
|
| 368 |
+
var a = e & qe, s = G(n), u = s.length, b = G(r), l = b.length;
|
| 369 |
+
if (u != l && !a)
|
| 370 |
+
return !1;
|
| 371 |
+
for (var o = u; o--; ) {
|
| 372 |
+
var c = s[o];
|
| 373 |
+
if (!(a ? c in r : Ze.call(r, c)))
|
| 374 |
+
return !1;
|
| 375 |
+
}
|
| 376 |
+
var h = i.get(n), A = i.get(r);
|
| 377 |
+
if (h && A)
|
| 378 |
+
return h == r && A == n;
|
| 379 |
+
var y = !0;
|
| 380 |
+
i.set(n, r), i.set(r, n);
|
| 381 |
+
for (var d = a; ++o < u; ) {
|
| 382 |
+
c = s[o];
|
| 383 |
+
var p = n[c], O = r[c];
|
| 384 |
+
if (t)
|
| 385 |
+
var Z = a ? t(O, p, c, r, n, i) : t(p, O, c, n, r, i);
|
| 386 |
+
if (!(Z === void 0 ? p === O || f(p, O, e, t, i) : Z)) {
|
| 387 |
+
y = !1;
|
| 388 |
+
break;
|
| 389 |
+
}
|
| 390 |
+
d || (d = c == "constructor");
|
| 391 |
+
}
|
| 392 |
+
if (y && !d) {
|
| 393 |
+
var I = n.constructor, v = r.constructor;
|
| 394 |
+
I != v && "constructor" in n && "constructor" in r && !(typeof I == "function" && I instanceof I && typeof v == "function" && v instanceof v) && (y = !1);
|
| 395 |
+
}
|
| 396 |
+
return i.delete(n), i.delete(r), y;
|
| 397 |
+
}
|
| 398 |
+
var Xe = 1, tn = "[object Arguments]", fn = "[object Array]", L = "[object Object]", Je = Object.prototype, an = Je.hasOwnProperty;
|
| 399 |
+
function We(n, r, e, t, f, i) {
|
| 400 |
+
var a = T(n), s = T(r), u = a ? fn : E(n), b = s ? fn : E(r);
|
| 401 |
+
u = u == tn ? L : u, b = b == tn ? L : b;
|
| 402 |
+
var l = u == L, o = b == L, c = u == b;
|
| 403 |
+
if (c && D(n)) {
|
| 404 |
+
if (!D(r))
|
| 405 |
+
return !1;
|
| 406 |
+
a = !0, l = !1;
|
| 407 |
+
}
|
| 408 |
+
if (c && !l)
|
| 409 |
+
return i || (i = new _()), a || jn(n) ? Pn(n, r, e, t, f, i) : He(n, r, u, e, t, f, i);
|
| 410 |
+
if (!(e & Xe)) {
|
| 411 |
+
var h = l && an.call(n, "__wrapped__"), A = o && an.call(r, "__wrapped__");
|
| 412 |
+
if (h || A) {
|
| 413 |
+
var y = h ? n.value() : n, d = A ? r.value() : r;
|
| 414 |
+
return i || (i = new _()), f(y, d, e, t, i);
|
| 415 |
+
}
|
| 416 |
+
}
|
| 417 |
+
return c ? (i || (i = new _()), Qe(n, r, e, t, f, i)) : !1;
|
| 418 |
+
}
|
| 419 |
+
function q(n, r, e, t, f) {
|
| 420 |
+
return n === r ? !0 : n == null || r == null || !S(n) && !S(r) ? n !== n && r !== r : We(n, r, e, t, q, f);
|
| 421 |
+
}
|
| 422 |
+
var ze = 1, Ve = 2;
|
| 423 |
+
function ke(n, r, e, t) {
|
| 424 |
+
var f = e.length, i = f;
|
| 425 |
+
if (n == null)
|
| 426 |
+
return !i;
|
| 427 |
+
for (n = Object(n); f--; ) {
|
| 428 |
+
var a = e[f];
|
| 429 |
+
if (a[2] ? a[1] !== n[a[0]] : !(a[0] in n))
|
| 430 |
+
return !1;
|
| 431 |
+
}
|
| 432 |
+
for (; ++f < i; ) {
|
| 433 |
+
a = e[f];
|
| 434 |
+
var s = a[0], u = n[s], b = a[1];
|
| 435 |
+
if (a[2]) {
|
| 436 |
+
if (u === void 0 && !(s in n))
|
| 437 |
+
return !1;
|
| 438 |
+
} else {
|
| 439 |
+
var l = new _(), o;
|
| 440 |
+
if (!(o === void 0 ? q(b, u, ze | Ve, t, l) : o))
|
| 441 |
+
return !1;
|
| 442 |
+
}
|
| 443 |
+
}
|
| 444 |
+
return !0;
|
| 445 |
+
}
|
| 446 |
+
function In(n) {
|
| 447 |
+
return n === n && !ln(n);
|
| 448 |
+
}
|
| 449 |
+
function nt(n) {
|
| 450 |
+
for (var r = $(n), e = r.length; e--; ) {
|
| 451 |
+
var t = r[e], f = n[t];
|
| 452 |
+
r[e] = [t, f, In(f)];
|
| 453 |
+
}
|
| 454 |
+
return r;
|
| 455 |
+
}
|
| 456 |
+
function vn(n, r) {
|
| 457 |
+
return function(e) {
|
| 458 |
+
return e == null ? !1 : e[n] === r && (r !== void 0 || n in Object(e));
|
| 459 |
+
};
|
| 460 |
+
}
|
| 461 |
+
function rt(n) {
|
| 462 |
+
var r = nt(n);
|
| 463 |
+
return r.length == 1 && r[0][2] ? vn(r[0][0], r[0][1]) : function(e) {
|
| 464 |
+
return e === n || ke(e, n, r);
|
| 465 |
+
};
|
| 466 |
+
}
|
| 467 |
+
function et(n, r) {
|
| 468 |
+
return n != null && r in Object(n);
|
| 469 |
+
}
|
| 470 |
+
function tt(n, r, e) {
|
| 471 |
+
r = An(r, n);
|
| 472 |
+
for (var t = -1, f = r.length, i = !1; ++t < f; ) {
|
| 473 |
+
var a = M(r[t]);
|
| 474 |
+
if (!(i = n != null && e(n, a)))
|
| 475 |
+
break;
|
| 476 |
+
n = n[a];
|
| 477 |
+
}
|
| 478 |
+
return i || ++t != f ? i : (f = n == null ? 0 : n.length, !!f && Hn(f) && qn(a, f) && (T(n) || un(n)));
|
| 479 |
+
}
|
| 480 |
+
function it(n, r) {
|
| 481 |
+
return n != null && tt(n, r, et);
|
| 482 |
+
}
|
| 483 |
+
var ft = 1, at = 2;
|
| 484 |
+
function st(n, r) {
|
| 485 |
+
return B(n) && In(r) ? vn(M(n), r) : function(e) {
|
| 486 |
+
var t = sr(e, n);
|
| 487 |
+
return t === void 0 && t === r ? it(e, n) : q(r, t, ft | at);
|
| 488 |
+
};
|
| 489 |
+
}
|
| 490 |
+
function ut(n) {
|
| 491 |
+
return function(r) {
|
| 492 |
+
return r == null ? void 0 : r[n];
|
| 493 |
+
};
|
| 494 |
+
}
|
| 495 |
+
function ot(n) {
|
| 496 |
+
return function(r) {
|
| 497 |
+
return yn(r, n);
|
| 498 |
+
};
|
| 499 |
+
}
|
| 500 |
+
function gt(n) {
|
| 501 |
+
return B(n) ? ut(M(n)) : ot(n);
|
| 502 |
+
}
|
| 503 |
+
function Ln(n) {
|
| 504 |
+
return typeof n == "function" ? n : n == null ? cn : typeof n == "object" ? T(n) ? st(n[0], n[1]) : rt(n) : gt(n);
|
| 505 |
+
}
|
| 506 |
+
function lt(n, r) {
|
| 507 |
+
return n && Yn(n, r, $);
|
| 508 |
+
}
|
| 509 |
+
function ct(n, r) {
|
| 510 |
+
return function(e, t) {
|
| 511 |
+
if (e == null)
|
| 512 |
+
return e;
|
| 513 |
+
if (!sn(e))
|
| 514 |
+
return n(e, t);
|
| 515 |
+
for (var f = e.length, i = -1, a = Object(e); ++i < f && t(a[i], i, a) !== !1; )
|
| 516 |
+
;
|
| 517 |
+
return e;
|
| 518 |
+
};
|
| 519 |
+
}
|
| 520 |
+
var Y = ct(lt);
|
| 521 |
+
function bt(n) {
|
| 522 |
+
return typeof n == "function" ? n : cn;
|
| 523 |
+
}
|
| 524 |
+
function $t(n, r) {
|
| 525 |
+
var e = T(n) ? pn : Y;
|
| 526 |
+
return e(n, bt(r));
|
| 527 |
+
}
|
| 528 |
+
function dt(n, r) {
|
| 529 |
+
var e = [];
|
| 530 |
+
return Y(n, function(t, f, i) {
|
| 531 |
+
r(t, f, i) && e.push(t);
|
| 532 |
+
}), e;
|
| 533 |
+
}
|
| 534 |
+
function _t(n, r) {
|
| 535 |
+
var e = T(n) ? Tn : dt;
|
| 536 |
+
return e(n, Ln(r));
|
| 537 |
+
}
|
| 538 |
+
function pt(n, r) {
|
| 539 |
+
return bn(r, function(e) {
|
| 540 |
+
return n[e];
|
| 541 |
+
});
|
| 542 |
+
}
|
| 543 |
+
function St(n) {
|
| 544 |
+
return n == null ? [] : pt(n, $(n));
|
| 545 |
+
}
|
| 546 |
+
function Et(n) {
|
| 547 |
+
return n === void 0;
|
| 548 |
+
}
|
| 549 |
+
function At(n, r, e, t, f) {
|
| 550 |
+
return f(n, function(i, a, s) {
|
| 551 |
+
e = t ? (t = !1, i) : r(e, i, a, s);
|
| 552 |
+
}), e;
|
| 553 |
+
}
|
| 554 |
+
function Pt(n, r, e) {
|
| 555 |
+
var t = T(n) ? or : At, f = arguments.length < 3;
|
| 556 |
+
return t(n, Ln(r), e, f, Y);
|
| 557 |
+
}
|
| 558 |
+
var yt = 1 / 0, Tt = m && 1 / H(new m([, -0]))[1] == yt ? function(n) {
|
| 559 |
+
return new m(n);
|
| 560 |
+
} : Qn, ht = 200;
|
| 561 |
+
function It(n, r, e) {
|
| 562 |
+
var t = -1, f = Vn, i = n.length, a = !0, s = [], u = s;
|
| 563 |
+
if (i >= ht) {
|
| 564 |
+
var b = r ? null : Tt(n);
|
| 565 |
+
if (b)
|
| 566 |
+
return H(b);
|
| 567 |
+
a = !1, f = En, u = new P();
|
| 568 |
+
} else
|
| 569 |
+
u = r ? [] : s;
|
| 570 |
+
n:
|
| 571 |
+
for (; ++t < i; ) {
|
| 572 |
+
var l = n[t], o = r ? r(l) : l;
|
| 573 |
+
if (l = l !== 0 ? l : 0, a && o === o) {
|
| 574 |
+
for (var c = u.length; c--; )
|
| 575 |
+
if (u[c] === o)
|
| 576 |
+
continue n;
|
| 577 |
+
r && u.push(o), s.push(l);
|
| 578 |
+
} else f(u, o, e) || (u !== s && u.push(o), s.push(l));
|
| 579 |
+
}
|
| 580 |
+
return s;
|
| 581 |
+
}
|
| 582 |
+
export {
|
| 583 |
+
Tn as A,
|
| 584 |
+
dt as B,
|
| 585 |
+
Pe as C,
|
| 586 |
+
Qn as D,
|
| 587 |
+
P as S,
|
| 588 |
+
It as a,
|
| 589 |
+
C as b,
|
| 590 |
+
Ot as c,
|
| 591 |
+
$t as d,
|
| 592 |
+
U as e,
|
| 593 |
+
_t as f,
|
| 594 |
+
Ln as g,
|
| 595 |
+
Xn as h,
|
| 596 |
+
Et as i,
|
| 597 |
+
Y as j,
|
| 598 |
+
$ as k,
|
| 599 |
+
bn as l,
|
| 600 |
+
tt as m,
|
| 601 |
+
An as n,
|
| 602 |
+
yn as o,
|
| 603 |
+
bt as p,
|
| 604 |
+
lt as q,
|
| 605 |
+
Pt as r,
|
| 606 |
+
it as s,
|
| 607 |
+
M as t,
|
| 608 |
+
ar as u,
|
| 609 |
+
St as v,
|
| 610 |
+
Vn as w,
|
| 611 |
+
En as x,
|
| 612 |
+
zn as y,
|
| 613 |
+
yr as z
|
| 614 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/arc-CD-swOK-.js
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { a0 as ln, a1 as an, a2 as H, a3 as q, a4 as B, a5 as un, a6 as y, a7 as tn, a8 as L, a9 as _, aa as rn, ab as o, ac as sn, ad as on, ae as fn } from "./mermaid.core-CfPtPiLZ.js";
|
| 2 |
+
function cn(l) {
|
| 3 |
+
return l.innerRadius;
|
| 4 |
+
}
|
| 5 |
+
function yn(l) {
|
| 6 |
+
return l.outerRadius;
|
| 7 |
+
}
|
| 8 |
+
function gn(l) {
|
| 9 |
+
return l.startAngle;
|
| 10 |
+
}
|
| 11 |
+
function dn(l) {
|
| 12 |
+
return l.endAngle;
|
| 13 |
+
}
|
| 14 |
+
function mn(l) {
|
| 15 |
+
return l && l.padAngle;
|
| 16 |
+
}
|
| 17 |
+
function pn(l, h, I, D, v, A, C, a) {
|
| 18 |
+
var O = I - l, i = D - h, n = C - v, d = a - A, u = d * O - n * i;
|
| 19 |
+
if (!(u * u < y))
|
| 20 |
+
return u = (n * (h - A) - d * (l - v)) / u, [l + u * O, h + u * i];
|
| 21 |
+
}
|
| 22 |
+
function W(l, h, I, D, v, A, C) {
|
| 23 |
+
var a = l - I, O = h - D, i = (C ? A : -A) / L(a * a + O * O), n = i * O, d = -i * a, u = l + n, s = h + d, f = I + n, c = D + d, F = (u + f) / 2, t = (s + c) / 2, m = f - u, g = c - s, R = m * m + g * g, T = v - A, P = u * c - f * s, S = (g < 0 ? -1 : 1) * L(on(0, T * T * R - P * P)), j = (P * g - m * S) / R, z = (-P * m - g * S) / R, w = (P * g + m * S) / R, p = (-P * m + g * S) / R, x = j - F, e = z - t, r = w - F, G = p - t;
|
| 24 |
+
return x * x + e * e > r * r + G * G && (j = w, z = p), {
|
| 25 |
+
cx: j,
|
| 26 |
+
cy: z,
|
| 27 |
+
x01: -n,
|
| 28 |
+
y01: -d,
|
| 29 |
+
x11: j * (v / T - 1),
|
| 30 |
+
y11: z * (v / T - 1)
|
| 31 |
+
};
|
| 32 |
+
}
|
| 33 |
+
function hn() {
|
| 34 |
+
var l = cn, h = yn, I = B(0), D = null, v = gn, A = dn, C = mn, a = null, O = ln(i);
|
| 35 |
+
function i() {
|
| 36 |
+
var n, d, u = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - un, c = A.apply(this, arguments) - un, F = rn(c - f), t = c > f;
|
| 37 |
+
if (a || (a = n = O()), s < u && (d = s, s = u, u = d), !(s > y)) a.moveTo(0, 0);
|
| 38 |
+
else if (F > tn - y)
|
| 39 |
+
a.moveTo(s * H(f), s * q(f)), a.arc(0, 0, s, f, c, !t), u > y && (a.moveTo(u * H(c), u * q(c)), a.arc(0, 0, u, c, f, t));
|
| 40 |
+
else {
|
| 41 |
+
var m = f, g = c, R = f, T = c, P = F, S = F, j = C.apply(this, arguments) / 2, z = j > y && (D ? +D.apply(this, arguments) : L(u * u + s * s)), w = _(rn(s - u) / 2, +I.apply(this, arguments)), p = w, x = w, e, r;
|
| 42 |
+
if (z > y) {
|
| 43 |
+
var G = sn(z / u * q(j)), M = sn(z / s * q(j));
|
| 44 |
+
(P -= G * 2) > y ? (G *= t ? 1 : -1, R += G, T -= G) : (P = 0, R = T = (f + c) / 2), (S -= M * 2) > y ? (M *= t ? 1 : -1, m += M, g -= M) : (S = 0, m = g = (f + c) / 2);
|
| 45 |
+
}
|
| 46 |
+
var J = s * H(m), K = s * q(m), N = u * H(T), Q = u * q(T);
|
| 47 |
+
if (w > y) {
|
| 48 |
+
var U = s * H(g), V = s * q(g), X = u * H(R), Y = u * q(R), E;
|
| 49 |
+
if (F < an)
|
| 50 |
+
if (E = pn(J, K, X, Y, U, V, N, Q)) {
|
| 51 |
+
var Z = J - E[0], $ = K - E[1], b = U - E[0], k = V - E[1], nn = 1 / q(fn((Z * b + $ * k) / (L(Z * Z + $ * $) * L(b * b + k * k))) / 2), en = L(E[0] * E[0] + E[1] * E[1]);
|
| 52 |
+
p = _(w, (u - en) / (nn - 1)), x = _(w, (s - en) / (nn + 1));
|
| 53 |
+
} else
|
| 54 |
+
p = x = 0;
|
| 55 |
+
}
|
| 56 |
+
S > y ? x > y ? (e = W(X, Y, J, K, s, x, t), r = W(U, V, N, Q, s, x, t), a.moveTo(e.cx + e.x01, e.cy + e.y01), x < w ? a.arc(e.cx, e.cy, x, o(e.y01, e.x01), o(r.y01, r.x01), !t) : (a.arc(e.cx, e.cy, x, o(e.y01, e.x01), o(e.y11, e.x11), !t), a.arc(0, 0, s, o(e.cy + e.y11, e.cx + e.x11), o(r.cy + r.y11, r.cx + r.x11), !t), a.arc(r.cx, r.cy, x, o(r.y11, r.x11), o(r.y01, r.x01), !t))) : (a.moveTo(J, K), a.arc(0, 0, s, m, g, !t)) : a.moveTo(J, K), !(u > y) || !(P > y) ? a.lineTo(N, Q) : p > y ? (e = W(N, Q, U, V, u, -p, t), r = W(J, K, X, Y, u, -p, t), a.lineTo(e.cx + e.x01, e.cy + e.y01), p < w ? a.arc(e.cx, e.cy, p, o(e.y01, e.x01), o(r.y01, r.x01), !t) : (a.arc(e.cx, e.cy, p, o(e.y01, e.x01), o(e.y11, e.x11), !t), a.arc(0, 0, u, o(e.cy + e.y11, e.cx + e.x11), o(r.cy + r.y11, r.cx + r.x11), t), a.arc(r.cx, r.cy, p, o(r.y11, r.x11), o(r.y01, r.x01), !t))) : a.arc(0, 0, u, T, R, t);
|
| 57 |
+
}
|
| 58 |
+
if (a.closePath(), n) return a = null, n + "" || null;
|
| 59 |
+
}
|
| 60 |
+
return i.centroid = function() {
|
| 61 |
+
var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, d = (+v.apply(this, arguments) + +A.apply(this, arguments)) / 2 - an / 2;
|
| 62 |
+
return [H(d) * n, q(d) * n];
|
| 63 |
+
}, i.innerRadius = function(n) {
|
| 64 |
+
return arguments.length ? (l = typeof n == "function" ? n : B(+n), i) : l;
|
| 65 |
+
}, i.outerRadius = function(n) {
|
| 66 |
+
return arguments.length ? (h = typeof n == "function" ? n : B(+n), i) : h;
|
| 67 |
+
}, i.cornerRadius = function(n) {
|
| 68 |
+
return arguments.length ? (I = typeof n == "function" ? n : B(+n), i) : I;
|
| 69 |
+
}, i.padRadius = function(n) {
|
| 70 |
+
return arguments.length ? (D = n == null ? null : typeof n == "function" ? n : B(+n), i) : D;
|
| 71 |
+
}, i.startAngle = function(n) {
|
| 72 |
+
return arguments.length ? (v = typeof n == "function" ? n : B(+n), i) : v;
|
| 73 |
+
}, i.endAngle = function(n) {
|
| 74 |
+
return arguments.length ? (A = typeof n == "function" ? n : B(+n), i) : A;
|
| 75 |
+
}, i.padAngle = function(n) {
|
| 76 |
+
return arguments.length ? (C = typeof n == "function" ? n : B(+n), i) : C;
|
| 77 |
+
}, i.context = function(n) {
|
| 78 |
+
return arguments.length ? (a = n ?? null, i) : a;
|
| 79 |
+
}, i;
|
| 80 |
+
}
|
| 81 |
+
export {
|
| 82 |
+
hn as d
|
| 83 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/architectureDiagram-KYWUMXXP-DfMVYVBl.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
src/backend/gradio_tokenizertextbox/templates/component/blockDiagram-ZUX3OVTL-DdsqIV7C.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
src/backend/gradio_tokenizertextbox/templates/component/c4Diagram-E5VUS4TQ-RzspGqYz.js
ADDED
|
@@ -0,0 +1,1581 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { g as Se, d as De } from "./chunk-WZLT4MVT-Cpjjsmu7.js";
|
| 2 |
+
import { _ as g, s as Pe, g as Be, a as Ie, b as Me, c as Bt, d as jt, l as de, e as Le, f as Ne, h as Tt, i as ge, j as Ye, w as je, k as $t, m as fe } from "./mermaid.core-CfPtPiLZ.js";
|
| 3 |
+
var Ft = function() {
|
| 4 |
+
var e = /* @__PURE__ */ g(function(_t, x, m, v) {
|
| 5 |
+
for (m = m || {}, v = _t.length; v--; m[_t[v]] = x) ;
|
| 6 |
+
return m;
|
| 7 |
+
}, "o"), t = [1, 24], s = [1, 25], o = [1, 26], l = [1, 27], a = [1, 28], r = [1, 63], n = [1, 64], i = [1, 65], u = [1, 66], d = [1, 67], f = [1, 68], y = [1, 69], E = [1, 29], O = [1, 30], S = [1, 31], P = [1, 32], M = [1, 33], U = [1, 34], H = [1, 35], q = [1, 36], G = [1, 37], K = [1, 38], J = [1, 39], Z = [1, 40], $ = [1, 41], tt = [1, 42], et = [1, 43], at = [1, 44], it = [1, 45], nt = [1, 46], rt = [1, 47], st = [1, 48], lt = [1, 50], ot = [1, 51], ct = [1, 52], ht = [1, 53], ut = [1, 54], dt = [1, 55], ft = [1, 56], pt = [1, 57], yt = [1, 58], gt = [1, 59], bt = [1, 60], Ct = [14, 42], Qt = [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], St = [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], k = [1, 82], A = [1, 83], C = [1, 84], w = [1, 85], T = [12, 14, 42], le = [12, 14, 33, 42], Mt = [12, 14, 33, 42, 76, 77, 79, 80], vt = [12, 33], Ht = [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], qt = {
|
| 8 |
+
trace: /* @__PURE__ */ g(function() {
|
| 9 |
+
}, "trace"),
|
| 10 |
+
yy: {},
|
| 11 |
+
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 },
|
| 12 |
+
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" },
|
| 13 |
+
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]],
|
| 14 |
+
performAction: /* @__PURE__ */ g(function(x, m, v, b, R, h, Dt) {
|
| 15 |
+
var p = h.length - 1;
|
| 16 |
+
switch (R) {
|
| 17 |
+
case 3:
|
| 18 |
+
b.setDirection("TB");
|
| 19 |
+
break;
|
| 20 |
+
case 4:
|
| 21 |
+
b.setDirection("BT");
|
| 22 |
+
break;
|
| 23 |
+
case 5:
|
| 24 |
+
b.setDirection("RL");
|
| 25 |
+
break;
|
| 26 |
+
case 6:
|
| 27 |
+
b.setDirection("LR");
|
| 28 |
+
break;
|
| 29 |
+
case 8:
|
| 30 |
+
case 9:
|
| 31 |
+
case 10:
|
| 32 |
+
case 11:
|
| 33 |
+
case 12:
|
| 34 |
+
b.setC4Type(h[p - 3]);
|
| 35 |
+
break;
|
| 36 |
+
case 19:
|
| 37 |
+
b.setTitle(h[p].substring(6)), this.$ = h[p].substring(6);
|
| 38 |
+
break;
|
| 39 |
+
case 20:
|
| 40 |
+
b.setAccDescription(h[p].substring(15)), this.$ = h[p].substring(15);
|
| 41 |
+
break;
|
| 42 |
+
case 21:
|
| 43 |
+
this.$ = h[p].trim(), b.setTitle(this.$);
|
| 44 |
+
break;
|
| 45 |
+
case 22:
|
| 46 |
+
case 23:
|
| 47 |
+
this.$ = h[p].trim(), b.setAccDescription(this.$);
|
| 48 |
+
break;
|
| 49 |
+
case 28:
|
| 50 |
+
h[p].splice(2, 0, "ENTERPRISE"), b.addPersonOrSystemBoundary(...h[p]), this.$ = h[p];
|
| 51 |
+
break;
|
| 52 |
+
case 29:
|
| 53 |
+
h[p].splice(2, 0, "SYSTEM"), b.addPersonOrSystemBoundary(...h[p]), this.$ = h[p];
|
| 54 |
+
break;
|
| 55 |
+
case 30:
|
| 56 |
+
b.addPersonOrSystemBoundary(...h[p]), this.$ = h[p];
|
| 57 |
+
break;
|
| 58 |
+
case 31:
|
| 59 |
+
h[p].splice(2, 0, "CONTAINER"), b.addContainerBoundary(...h[p]), this.$ = h[p];
|
| 60 |
+
break;
|
| 61 |
+
case 32:
|
| 62 |
+
b.addDeploymentNode("node", ...h[p]), this.$ = h[p];
|
| 63 |
+
break;
|
| 64 |
+
case 33:
|
| 65 |
+
b.addDeploymentNode("nodeL", ...h[p]), this.$ = h[p];
|
| 66 |
+
break;
|
| 67 |
+
case 34:
|
| 68 |
+
b.addDeploymentNode("nodeR", ...h[p]), this.$ = h[p];
|
| 69 |
+
break;
|
| 70 |
+
case 35:
|
| 71 |
+
b.popBoundaryParseStack();
|
| 72 |
+
break;
|
| 73 |
+
case 39:
|
| 74 |
+
b.addPersonOrSystem("person", ...h[p]), this.$ = h[p];
|
| 75 |
+
break;
|
| 76 |
+
case 40:
|
| 77 |
+
b.addPersonOrSystem("external_person", ...h[p]), this.$ = h[p];
|
| 78 |
+
break;
|
| 79 |
+
case 41:
|
| 80 |
+
b.addPersonOrSystem("system", ...h[p]), this.$ = h[p];
|
| 81 |
+
break;
|
| 82 |
+
case 42:
|
| 83 |
+
b.addPersonOrSystem("system_db", ...h[p]), this.$ = h[p];
|
| 84 |
+
break;
|
| 85 |
+
case 43:
|
| 86 |
+
b.addPersonOrSystem("system_queue", ...h[p]), this.$ = h[p];
|
| 87 |
+
break;
|
| 88 |
+
case 44:
|
| 89 |
+
b.addPersonOrSystem("external_system", ...h[p]), this.$ = h[p];
|
| 90 |
+
break;
|
| 91 |
+
case 45:
|
| 92 |
+
b.addPersonOrSystem("external_system_db", ...h[p]), this.$ = h[p];
|
| 93 |
+
break;
|
| 94 |
+
case 46:
|
| 95 |
+
b.addPersonOrSystem("external_system_queue", ...h[p]), this.$ = h[p];
|
| 96 |
+
break;
|
| 97 |
+
case 47:
|
| 98 |
+
b.addContainer("container", ...h[p]), this.$ = h[p];
|
| 99 |
+
break;
|
| 100 |
+
case 48:
|
| 101 |
+
b.addContainer("container_db", ...h[p]), this.$ = h[p];
|
| 102 |
+
break;
|
| 103 |
+
case 49:
|
| 104 |
+
b.addContainer("container_queue", ...h[p]), this.$ = h[p];
|
| 105 |
+
break;
|
| 106 |
+
case 50:
|
| 107 |
+
b.addContainer("external_container", ...h[p]), this.$ = h[p];
|
| 108 |
+
break;
|
| 109 |
+
case 51:
|
| 110 |
+
b.addContainer("external_container_db", ...h[p]), this.$ = h[p];
|
| 111 |
+
break;
|
| 112 |
+
case 52:
|
| 113 |
+
b.addContainer("external_container_queue", ...h[p]), this.$ = h[p];
|
| 114 |
+
break;
|
| 115 |
+
case 53:
|
| 116 |
+
b.addComponent("component", ...h[p]), this.$ = h[p];
|
| 117 |
+
break;
|
| 118 |
+
case 54:
|
| 119 |
+
b.addComponent("component_db", ...h[p]), this.$ = h[p];
|
| 120 |
+
break;
|
| 121 |
+
case 55:
|
| 122 |
+
b.addComponent("component_queue", ...h[p]), this.$ = h[p];
|
| 123 |
+
break;
|
| 124 |
+
case 56:
|
| 125 |
+
b.addComponent("external_component", ...h[p]), this.$ = h[p];
|
| 126 |
+
break;
|
| 127 |
+
case 57:
|
| 128 |
+
b.addComponent("external_component_db", ...h[p]), this.$ = h[p];
|
| 129 |
+
break;
|
| 130 |
+
case 58:
|
| 131 |
+
b.addComponent("external_component_queue", ...h[p]), this.$ = h[p];
|
| 132 |
+
break;
|
| 133 |
+
case 60:
|
| 134 |
+
b.addRel("rel", ...h[p]), this.$ = h[p];
|
| 135 |
+
break;
|
| 136 |
+
case 61:
|
| 137 |
+
b.addRel("birel", ...h[p]), this.$ = h[p];
|
| 138 |
+
break;
|
| 139 |
+
case 62:
|
| 140 |
+
b.addRel("rel_u", ...h[p]), this.$ = h[p];
|
| 141 |
+
break;
|
| 142 |
+
case 63:
|
| 143 |
+
b.addRel("rel_d", ...h[p]), this.$ = h[p];
|
| 144 |
+
break;
|
| 145 |
+
case 64:
|
| 146 |
+
b.addRel("rel_l", ...h[p]), this.$ = h[p];
|
| 147 |
+
break;
|
| 148 |
+
case 65:
|
| 149 |
+
b.addRel("rel_r", ...h[p]), this.$ = h[p];
|
| 150 |
+
break;
|
| 151 |
+
case 66:
|
| 152 |
+
b.addRel("rel_b", ...h[p]), this.$ = h[p];
|
| 153 |
+
break;
|
| 154 |
+
case 67:
|
| 155 |
+
h[p].splice(0, 1), b.addRel("rel", ...h[p]), this.$ = h[p];
|
| 156 |
+
break;
|
| 157 |
+
case 68:
|
| 158 |
+
b.updateElStyle("update_el_style", ...h[p]), this.$ = h[p];
|
| 159 |
+
break;
|
| 160 |
+
case 69:
|
| 161 |
+
b.updateRelStyle("update_rel_style", ...h[p]), this.$ = h[p];
|
| 162 |
+
break;
|
| 163 |
+
case 70:
|
| 164 |
+
b.updateLayoutConfig("update_layout_config", ...h[p]), this.$ = h[p];
|
| 165 |
+
break;
|
| 166 |
+
case 71:
|
| 167 |
+
this.$ = [h[p]];
|
| 168 |
+
break;
|
| 169 |
+
case 72:
|
| 170 |
+
h[p].unshift(h[p - 1]), this.$ = h[p];
|
| 171 |
+
break;
|
| 172 |
+
case 73:
|
| 173 |
+
case 75:
|
| 174 |
+
this.$ = h[p].trim();
|
| 175 |
+
break;
|
| 176 |
+
case 74:
|
| 177 |
+
let Et = {};
|
| 178 |
+
Et[h[p - 1].trim()] = h[p].trim(), this.$ = Et;
|
| 179 |
+
break;
|
| 180 |
+
case 76:
|
| 181 |
+
this.$ = "";
|
| 182 |
+
break;
|
| 183 |
+
}
|
| 184 |
+
}, "anonymous"),
|
| 185 |
+
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: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 13: 70, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 13: 71, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 13: 72, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 13: 73, 19: 20, 20: 21, 21: 22, 22: t, 23: s, 24: o, 26: l, 28: a, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 14: [1, 74] }, e(Ct, [2, 13], { 43: 23, 29: 49, 30: 61, 32: 62, 20: 75, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }), e(Ct, [2, 14]), e(Qt, [2, 16], { 12: [1, 76] }), e(Ct, [2, 36], { 12: [1, 77] }), e(St, [2, 19]), e(St, [2, 20]), { 25: [1, 78] }, { 27: [1, 79] }, e(St, [2, 23]), { 35: 80, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 86, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 87, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 88, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 89, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 90, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 91, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 92, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 93, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 94, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 95, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 96, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 97, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 98, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 99, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 100, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 101, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 102, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 103, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 104, 75: 81, 76: k, 77: A, 79: C, 80: w }, e(T, [2, 59]), { 35: 105, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 106, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 107, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 108, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 109, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 110, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 111, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 112, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 113, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 114, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 115, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 20: 116, 29: 49, 30: 61, 32: 62, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 43: 23, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }, { 12: [1, 118], 33: [1, 117] }, { 35: 119, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 120, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 121, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 122, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 123, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 124, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 35: 125, 75: 81, 76: k, 77: A, 79: C, 80: w }, { 14: [1, 126] }, { 14: [1, 127] }, { 14: [1, 128] }, { 14: [1, 129] }, { 1: [2, 8] }, e(Ct, [2, 15]), e(Qt, [2, 17], { 21: 22, 19: 130, 22: t, 23: s, 24: o, 26: l, 28: a }), e(Ct, [2, 37], { 19: 20, 20: 21, 21: 22, 43: 23, 29: 49, 30: 61, 32: 62, 13: 131, 22: t, 23: s, 24: o, 26: l, 28: a, 34: r, 36: n, 37: i, 38: u, 39: d, 40: f, 41: y, 44: E, 45: O, 46: S, 47: P, 48: M, 49: U, 50: H, 51: q, 52: G, 53: K, 54: J, 55: Z, 56: $, 57: tt, 58: et, 59: at, 60: it, 61: nt, 62: rt, 63: st, 64: lt, 65: ot, 66: ct, 67: ht, 68: ut, 69: dt, 70: ft, 71: pt, 72: yt, 73: gt, 74: bt }), e(St, [2, 21]), e(St, [2, 22]), e(T, [2, 39]), e(le, [2, 71], { 75: 81, 35: 132, 76: k, 77: A, 79: C, 80: w }), e(Mt, [2, 73]), { 78: [1, 133] }, e(Mt, [2, 75]), e(Mt, [2, 76]), e(T, [2, 40]), e(T, [2, 41]), e(T, [2, 42]), e(T, [2, 43]), e(T, [2, 44]), e(T, [2, 45]), e(T, [2, 46]), e(T, [2, 47]), e(T, [2, 48]), e(T, [2, 49]), e(T, [2, 50]), e(T, [2, 51]), e(T, [2, 52]), e(T, [2, 53]), e(T, [2, 54]), e(T, [2, 55]), e(T, [2, 56]), e(T, [2, 57]), e(T, [2, 58]), e(T, [2, 60]), e(T, [2, 61]), e(T, [2, 62]), e(T, [2, 63]), e(T, [2, 64]), e(T, [2, 65]), e(T, [2, 66]), e(T, [2, 67]), e(T, [2, 68]), e(T, [2, 69]), e(T, [2, 70]), { 31: 134, 42: [1, 135] }, { 12: [1, 136] }, { 33: [1, 137] }, e(vt, [2, 28]), e(vt, [2, 29]), e(vt, [2, 30]), e(vt, [2, 31]), e(vt, [2, 32]), e(vt, [2, 33]), e(vt, [2, 34]), { 1: [2, 9] }, { 1: [2, 10] }, { 1: [2, 11] }, { 1: [2, 12] }, e(Qt, [2, 18]), e(Ct, [2, 38]), e(le, [2, 72]), e(Mt, [2, 74]), e(T, [2, 24]), e(T, [2, 35]), e(Ht, [2, 25]), e(Ht, [2, 26], { 12: [1, 138] }), e(Ht, [2, 27])],
|
| 186 |
+
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] },
|
| 187 |
+
parseError: /* @__PURE__ */ g(function(x, m) {
|
| 188 |
+
if (m.recoverable)
|
| 189 |
+
this.trace(x);
|
| 190 |
+
else {
|
| 191 |
+
var v = new Error(x);
|
| 192 |
+
throw v.hash = m, v;
|
| 193 |
+
}
|
| 194 |
+
}, "parseError"),
|
| 195 |
+
parse: /* @__PURE__ */ g(function(x) {
|
| 196 |
+
var m = this, v = [0], b = [], R = [null], h = [], Dt = this.table, p = "", Et = 0, oe = 0, we = 2, ce = 1, Te = h.slice.call(arguments, 1), D = Object.create(this.lexer), kt = { yy: {} };
|
| 197 |
+
for (var Gt in this.yy)
|
| 198 |
+
Object.prototype.hasOwnProperty.call(this.yy, Gt) && (kt.yy[Gt] = this.yy[Gt]);
|
| 199 |
+
D.setInput(x, kt.yy), kt.yy.lexer = D, kt.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
|
| 200 |
+
var Kt = D.yylloc;
|
| 201 |
+
h.push(Kt);
|
| 202 |
+
var Oe = D.options && D.options.ranges;
|
| 203 |
+
typeof kt.yy.parseError == "function" ? this.parseError = kt.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
| 204 |
+
function Re(L) {
|
| 205 |
+
v.length = v.length - 2 * L, R.length = R.length - L, h.length = h.length - L;
|
| 206 |
+
}
|
| 207 |
+
g(Re, "popStack");
|
| 208 |
+
function he() {
|
| 209 |
+
var L;
|
| 210 |
+
return L = b.pop() || D.lex() || ce, typeof L != "number" && (L instanceof Array && (b = L, L = b.pop()), L = m.symbols_[L] || L), L;
|
| 211 |
+
}
|
| 212 |
+
g(he, "lex");
|
| 213 |
+
for (var I, At, N, Jt, wt = {}, Nt, W, ue, Yt; ; ) {
|
| 214 |
+
if (At = v[v.length - 1], this.defaultActions[At] ? N = this.defaultActions[At] : ((I === null || typeof I > "u") && (I = he()), N = Dt[At] && Dt[At][I]), typeof N > "u" || !N.length || !N[0]) {
|
| 215 |
+
var Zt = "";
|
| 216 |
+
Yt = [];
|
| 217 |
+
for (Nt in Dt[At])
|
| 218 |
+
this.terminals_[Nt] && Nt > we && Yt.push("'" + this.terminals_[Nt] + "'");
|
| 219 |
+
D.showPosition ? Zt = "Parse error on line " + (Et + 1) + `:
|
| 220 |
+
` + D.showPosition() + `
|
| 221 |
+
Expecting ` + Yt.join(", ") + ", got '" + (this.terminals_[I] || I) + "'" : Zt = "Parse error on line " + (Et + 1) + ": Unexpected " + (I == ce ? "end of input" : "'" + (this.terminals_[I] || I) + "'"), this.parseError(Zt, {
|
| 222 |
+
text: D.match,
|
| 223 |
+
token: this.terminals_[I] || I,
|
| 224 |
+
line: D.yylineno,
|
| 225 |
+
loc: Kt,
|
| 226 |
+
expected: Yt
|
| 227 |
+
});
|
| 228 |
+
}
|
| 229 |
+
if (N[0] instanceof Array && N.length > 1)
|
| 230 |
+
throw new Error("Parse Error: multiple actions possible at state: " + At + ", token: " + I);
|
| 231 |
+
switch (N[0]) {
|
| 232 |
+
case 1:
|
| 233 |
+
v.push(I), R.push(D.yytext), h.push(D.yylloc), v.push(N[1]), I = null, oe = D.yyleng, p = D.yytext, Et = D.yylineno, Kt = D.yylloc;
|
| 234 |
+
break;
|
| 235 |
+
case 2:
|
| 236 |
+
if (W = this.productions_[N[1]][1], wt.$ = R[R.length - W], wt._$ = {
|
| 237 |
+
first_line: h[h.length - (W || 1)].first_line,
|
| 238 |
+
last_line: h[h.length - 1].last_line,
|
| 239 |
+
first_column: h[h.length - (W || 1)].first_column,
|
| 240 |
+
last_column: h[h.length - 1].last_column
|
| 241 |
+
}, Oe && (wt._$.range = [
|
| 242 |
+
h[h.length - (W || 1)].range[0],
|
| 243 |
+
h[h.length - 1].range[1]
|
| 244 |
+
]), Jt = this.performAction.apply(wt, [
|
| 245 |
+
p,
|
| 246 |
+
oe,
|
| 247 |
+
Et,
|
| 248 |
+
kt.yy,
|
| 249 |
+
N[1],
|
| 250 |
+
R,
|
| 251 |
+
h
|
| 252 |
+
].concat(Te)), typeof Jt < "u")
|
| 253 |
+
return Jt;
|
| 254 |
+
W && (v = v.slice(0, -1 * W * 2), R = R.slice(0, -1 * W), h = h.slice(0, -1 * W)), v.push(this.productions_[N[1]][0]), R.push(wt.$), h.push(wt._$), ue = Dt[v[v.length - 2]][v[v.length - 1]], v.push(ue);
|
| 255 |
+
break;
|
| 256 |
+
case 3:
|
| 257 |
+
return !0;
|
| 258 |
+
}
|
| 259 |
+
}
|
| 260 |
+
return !0;
|
| 261 |
+
}, "parse")
|
| 262 |
+
}, Ce = /* @__PURE__ */ function() {
|
| 263 |
+
var _t = {
|
| 264 |
+
EOF: 1,
|
| 265 |
+
parseError: /* @__PURE__ */ g(function(m, v) {
|
| 266 |
+
if (this.yy.parser)
|
| 267 |
+
this.yy.parser.parseError(m, v);
|
| 268 |
+
else
|
| 269 |
+
throw new Error(m);
|
| 270 |
+
}, "parseError"),
|
| 271 |
+
// resets the lexer, sets new input
|
| 272 |
+
setInput: /* @__PURE__ */ g(function(x, m) {
|
| 273 |
+
return this.yy = m || this.yy || {}, this._input = x, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
| 274 |
+
first_line: 1,
|
| 275 |
+
first_column: 0,
|
| 276 |
+
last_line: 1,
|
| 277 |
+
last_column: 0
|
| 278 |
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
| 279 |
+
}, "setInput"),
|
| 280 |
+
// consumes and returns one char from the input
|
| 281 |
+
input: /* @__PURE__ */ g(function() {
|
| 282 |
+
var x = this._input[0];
|
| 283 |
+
this.yytext += x, this.yyleng++, this.offset++, this.match += x, this.matched += x;
|
| 284 |
+
var m = x.match(/(?:\r\n?|\n).*/g);
|
| 285 |
+
return m ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), x;
|
| 286 |
+
}, "input"),
|
| 287 |
+
// unshifts one char (or a string) into the input
|
| 288 |
+
unput: /* @__PURE__ */ g(function(x) {
|
| 289 |
+
var m = x.length, v = x.split(/(?:\r\n?|\n)/g);
|
| 290 |
+
this._input = x + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - m), this.offset -= m;
|
| 291 |
+
var b = this.match.split(/(?:\r\n?|\n)/g);
|
| 292 |
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), v.length - 1 && (this.yylineno -= v.length - 1);
|
| 293 |
+
var R = this.yylloc.range;
|
| 294 |
+
return this.yylloc = {
|
| 295 |
+
first_line: this.yylloc.first_line,
|
| 296 |
+
last_line: this.yylineno + 1,
|
| 297 |
+
first_column: this.yylloc.first_column,
|
| 298 |
+
last_column: v ? (v.length === b.length ? this.yylloc.first_column : 0) + b[b.length - v.length].length - v[0].length : this.yylloc.first_column - m
|
| 299 |
+
}, this.options.ranges && (this.yylloc.range = [R[0], R[0] + this.yyleng - m]), this.yyleng = this.yytext.length, this;
|
| 300 |
+
}, "unput"),
|
| 301 |
+
// When called from action, caches matched text and appends it on next action
|
| 302 |
+
more: /* @__PURE__ */ g(function() {
|
| 303 |
+
return this._more = !0, this;
|
| 304 |
+
}, "more"),
|
| 305 |
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
| 306 |
+
reject: /* @__PURE__ */ g(function() {
|
| 307 |
+
if (this.options.backtrack_lexer)
|
| 308 |
+
this._backtrack = !0;
|
| 309 |
+
else
|
| 310 |
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
| 311 |
+
` + this.showPosition(), {
|
| 312 |
+
text: "",
|
| 313 |
+
token: null,
|
| 314 |
+
line: this.yylineno
|
| 315 |
+
});
|
| 316 |
+
return this;
|
| 317 |
+
}, "reject"),
|
| 318 |
+
// retain first n characters of the match
|
| 319 |
+
less: /* @__PURE__ */ g(function(x) {
|
| 320 |
+
this.unput(this.match.slice(x));
|
| 321 |
+
}, "less"),
|
| 322 |
+
// displays already matched input, i.e. for error messages
|
| 323 |
+
pastInput: /* @__PURE__ */ g(function() {
|
| 324 |
+
var x = this.matched.substr(0, this.matched.length - this.match.length);
|
| 325 |
+
return (x.length > 20 ? "..." : "") + x.substr(-20).replace(/\n/g, "");
|
| 326 |
+
}, "pastInput"),
|
| 327 |
+
// displays upcoming input, i.e. for error messages
|
| 328 |
+
upcomingInput: /* @__PURE__ */ g(function() {
|
| 329 |
+
var x = this.match;
|
| 330 |
+
return x.length < 20 && (x += this._input.substr(0, 20 - x.length)), (x.substr(0, 20) + (x.length > 20 ? "..." : "")).replace(/\n/g, "");
|
| 331 |
+
}, "upcomingInput"),
|
| 332 |
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
| 333 |
+
showPosition: /* @__PURE__ */ g(function() {
|
| 334 |
+
var x = this.pastInput(), m = new Array(x.length + 1).join("-");
|
| 335 |
+
return x + this.upcomingInput() + `
|
| 336 |
+
` + m + "^";
|
| 337 |
+
}, "showPosition"),
|
| 338 |
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
| 339 |
+
test_match: /* @__PURE__ */ g(function(x, m) {
|
| 340 |
+
var v, b, R;
|
| 341 |
+
if (this.options.backtrack_lexer && (R = {
|
| 342 |
+
yylineno: this.yylineno,
|
| 343 |
+
yylloc: {
|
| 344 |
+
first_line: this.yylloc.first_line,
|
| 345 |
+
last_line: this.last_line,
|
| 346 |
+
first_column: this.yylloc.first_column,
|
| 347 |
+
last_column: this.yylloc.last_column
|
| 348 |
+
},
|
| 349 |
+
yytext: this.yytext,
|
| 350 |
+
match: this.match,
|
| 351 |
+
matches: this.matches,
|
| 352 |
+
matched: this.matched,
|
| 353 |
+
yyleng: this.yyleng,
|
| 354 |
+
offset: this.offset,
|
| 355 |
+
_more: this._more,
|
| 356 |
+
_input: this._input,
|
| 357 |
+
yy: this.yy,
|
| 358 |
+
conditionStack: this.conditionStack.slice(0),
|
| 359 |
+
done: this.done
|
| 360 |
+
}, this.options.ranges && (R.yylloc.range = this.yylloc.range.slice(0))), b = x[0].match(/(?:\r\n?|\n).*/g), b && (this.yylineno += b.length), this.yylloc = {
|
| 361 |
+
first_line: this.yylloc.last_line,
|
| 362 |
+
last_line: this.yylineno + 1,
|
| 363 |
+
first_column: this.yylloc.last_column,
|
| 364 |
+
last_column: b ? b[b.length - 1].length - b[b.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + x[0].length
|
| 365 |
+
}, this.yytext += x[0], this.match += x[0], this.matches = x, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(x[0].length), this.matched += x[0], v = this.performAction.call(this, this.yy, this, m, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), v)
|
| 366 |
+
return v;
|
| 367 |
+
if (this._backtrack) {
|
| 368 |
+
for (var h in R)
|
| 369 |
+
this[h] = R[h];
|
| 370 |
+
return !1;
|
| 371 |
+
}
|
| 372 |
+
return !1;
|
| 373 |
+
}, "test_match"),
|
| 374 |
+
// return next match in input
|
| 375 |
+
next: /* @__PURE__ */ g(function() {
|
| 376 |
+
if (this.done)
|
| 377 |
+
return this.EOF;
|
| 378 |
+
this._input || (this.done = !0);
|
| 379 |
+
var x, m, v, b;
|
| 380 |
+
this._more || (this.yytext = "", this.match = "");
|
| 381 |
+
for (var R = this._currentRules(), h = 0; h < R.length; h++)
|
| 382 |
+
if (v = this._input.match(this.rules[R[h]]), v && (!m || v[0].length > m[0].length)) {
|
| 383 |
+
if (m = v, b = h, this.options.backtrack_lexer) {
|
| 384 |
+
if (x = this.test_match(v, R[h]), x !== !1)
|
| 385 |
+
return x;
|
| 386 |
+
if (this._backtrack) {
|
| 387 |
+
m = !1;
|
| 388 |
+
continue;
|
| 389 |
+
} else
|
| 390 |
+
return !1;
|
| 391 |
+
} else if (!this.options.flex)
|
| 392 |
+
break;
|
| 393 |
+
}
|
| 394 |
+
return m ? (x = this.test_match(m, R[b]), x !== !1 ? x : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
| 395 |
+
` + this.showPosition(), {
|
| 396 |
+
text: "",
|
| 397 |
+
token: null,
|
| 398 |
+
line: this.yylineno
|
| 399 |
+
});
|
| 400 |
+
}, "next"),
|
| 401 |
+
// return next match that has a token
|
| 402 |
+
lex: /* @__PURE__ */ g(function() {
|
| 403 |
+
var m = this.next();
|
| 404 |
+
return m || this.lex();
|
| 405 |
+
}, "lex"),
|
| 406 |
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
| 407 |
+
begin: /* @__PURE__ */ g(function(m) {
|
| 408 |
+
this.conditionStack.push(m);
|
| 409 |
+
}, "begin"),
|
| 410 |
+
// pop the previously active lexer condition state off the condition stack
|
| 411 |
+
popState: /* @__PURE__ */ g(function() {
|
| 412 |
+
var m = this.conditionStack.length - 1;
|
| 413 |
+
return m > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
| 414 |
+
}, "popState"),
|
| 415 |
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
| 416 |
+
_currentRules: /* @__PURE__ */ g(function() {
|
| 417 |
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
| 418 |
+
}, "_currentRules"),
|
| 419 |
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
| 420 |
+
topState: /* @__PURE__ */ g(function(m) {
|
| 421 |
+
return m = this.conditionStack.length - 1 - Math.abs(m || 0), m >= 0 ? this.conditionStack[m] : "INITIAL";
|
| 422 |
+
}, "topState"),
|
| 423 |
+
// alias for begin(condition)
|
| 424 |
+
pushState: /* @__PURE__ */ g(function(m) {
|
| 425 |
+
this.begin(m);
|
| 426 |
+
}, "pushState"),
|
| 427 |
+
// return the number of states currently on the stack
|
| 428 |
+
stateStackSize: /* @__PURE__ */ g(function() {
|
| 429 |
+
return this.conditionStack.length;
|
| 430 |
+
}, "stateStackSize"),
|
| 431 |
+
options: {},
|
| 432 |
+
performAction: /* @__PURE__ */ g(function(m, v, b, R) {
|
| 433 |
+
switch (b) {
|
| 434 |
+
case 0:
|
| 435 |
+
return 6;
|
| 436 |
+
case 1:
|
| 437 |
+
return 7;
|
| 438 |
+
case 2:
|
| 439 |
+
return 8;
|
| 440 |
+
case 3:
|
| 441 |
+
return 9;
|
| 442 |
+
case 4:
|
| 443 |
+
return 22;
|
| 444 |
+
case 5:
|
| 445 |
+
return 23;
|
| 446 |
+
case 6:
|
| 447 |
+
return this.begin("acc_title"), 24;
|
| 448 |
+
case 7:
|
| 449 |
+
return this.popState(), "acc_title_value";
|
| 450 |
+
case 8:
|
| 451 |
+
return this.begin("acc_descr"), 26;
|
| 452 |
+
case 9:
|
| 453 |
+
return this.popState(), "acc_descr_value";
|
| 454 |
+
case 10:
|
| 455 |
+
this.begin("acc_descr_multiline");
|
| 456 |
+
break;
|
| 457 |
+
case 11:
|
| 458 |
+
this.popState();
|
| 459 |
+
break;
|
| 460 |
+
case 12:
|
| 461 |
+
return "acc_descr_multiline_value";
|
| 462 |
+
case 13:
|
| 463 |
+
break;
|
| 464 |
+
case 14:
|
| 465 |
+
c;
|
| 466 |
+
break;
|
| 467 |
+
case 15:
|
| 468 |
+
return 12;
|
| 469 |
+
case 16:
|
| 470 |
+
break;
|
| 471 |
+
case 17:
|
| 472 |
+
return 11;
|
| 473 |
+
case 18:
|
| 474 |
+
return 15;
|
| 475 |
+
case 19:
|
| 476 |
+
return 16;
|
| 477 |
+
case 20:
|
| 478 |
+
return 17;
|
| 479 |
+
case 21:
|
| 480 |
+
return 18;
|
| 481 |
+
case 22:
|
| 482 |
+
return this.begin("person_ext"), 45;
|
| 483 |
+
case 23:
|
| 484 |
+
return this.begin("person"), 44;
|
| 485 |
+
case 24:
|
| 486 |
+
return this.begin("system_ext_queue"), 51;
|
| 487 |
+
case 25:
|
| 488 |
+
return this.begin("system_ext_db"), 50;
|
| 489 |
+
case 26:
|
| 490 |
+
return this.begin("system_ext"), 49;
|
| 491 |
+
case 27:
|
| 492 |
+
return this.begin("system_queue"), 48;
|
| 493 |
+
case 28:
|
| 494 |
+
return this.begin("system_db"), 47;
|
| 495 |
+
case 29:
|
| 496 |
+
return this.begin("system"), 46;
|
| 497 |
+
case 30:
|
| 498 |
+
return this.begin("boundary"), 37;
|
| 499 |
+
case 31:
|
| 500 |
+
return this.begin("enterprise_boundary"), 34;
|
| 501 |
+
case 32:
|
| 502 |
+
return this.begin("system_boundary"), 36;
|
| 503 |
+
case 33:
|
| 504 |
+
return this.begin("container_ext_queue"), 57;
|
| 505 |
+
case 34:
|
| 506 |
+
return this.begin("container_ext_db"), 56;
|
| 507 |
+
case 35:
|
| 508 |
+
return this.begin("container_ext"), 55;
|
| 509 |
+
case 36:
|
| 510 |
+
return this.begin("container_queue"), 54;
|
| 511 |
+
case 37:
|
| 512 |
+
return this.begin("container_db"), 53;
|
| 513 |
+
case 38:
|
| 514 |
+
return this.begin("container"), 52;
|
| 515 |
+
case 39:
|
| 516 |
+
return this.begin("container_boundary"), 38;
|
| 517 |
+
case 40:
|
| 518 |
+
return this.begin("component_ext_queue"), 63;
|
| 519 |
+
case 41:
|
| 520 |
+
return this.begin("component_ext_db"), 62;
|
| 521 |
+
case 42:
|
| 522 |
+
return this.begin("component_ext"), 61;
|
| 523 |
+
case 43:
|
| 524 |
+
return this.begin("component_queue"), 60;
|
| 525 |
+
case 44:
|
| 526 |
+
return this.begin("component_db"), 59;
|
| 527 |
+
case 45:
|
| 528 |
+
return this.begin("component"), 58;
|
| 529 |
+
case 46:
|
| 530 |
+
return this.begin("node"), 39;
|
| 531 |
+
case 47:
|
| 532 |
+
return this.begin("node"), 39;
|
| 533 |
+
case 48:
|
| 534 |
+
return this.begin("node_l"), 40;
|
| 535 |
+
case 49:
|
| 536 |
+
return this.begin("node_r"), 41;
|
| 537 |
+
case 50:
|
| 538 |
+
return this.begin("rel"), 64;
|
| 539 |
+
case 51:
|
| 540 |
+
return this.begin("birel"), 65;
|
| 541 |
+
case 52:
|
| 542 |
+
return this.begin("rel_u"), 66;
|
| 543 |
+
case 53:
|
| 544 |
+
return this.begin("rel_u"), 66;
|
| 545 |
+
case 54:
|
| 546 |
+
return this.begin("rel_d"), 67;
|
| 547 |
+
case 55:
|
| 548 |
+
return this.begin("rel_d"), 67;
|
| 549 |
+
case 56:
|
| 550 |
+
return this.begin("rel_l"), 68;
|
| 551 |
+
case 57:
|
| 552 |
+
return this.begin("rel_l"), 68;
|
| 553 |
+
case 58:
|
| 554 |
+
return this.begin("rel_r"), 69;
|
| 555 |
+
case 59:
|
| 556 |
+
return this.begin("rel_r"), 69;
|
| 557 |
+
case 60:
|
| 558 |
+
return this.begin("rel_b"), 70;
|
| 559 |
+
case 61:
|
| 560 |
+
return this.begin("rel_index"), 71;
|
| 561 |
+
case 62:
|
| 562 |
+
return this.begin("update_el_style"), 72;
|
| 563 |
+
case 63:
|
| 564 |
+
return this.begin("update_rel_style"), 73;
|
| 565 |
+
case 64:
|
| 566 |
+
return this.begin("update_layout_config"), 74;
|
| 567 |
+
case 65:
|
| 568 |
+
return "EOF_IN_STRUCT";
|
| 569 |
+
case 66:
|
| 570 |
+
return this.begin("attribute"), "ATTRIBUTE_EMPTY";
|
| 571 |
+
case 67:
|
| 572 |
+
this.begin("attribute");
|
| 573 |
+
break;
|
| 574 |
+
case 68:
|
| 575 |
+
this.popState(), this.popState();
|
| 576 |
+
break;
|
| 577 |
+
case 69:
|
| 578 |
+
return 80;
|
| 579 |
+
case 70:
|
| 580 |
+
break;
|
| 581 |
+
case 71:
|
| 582 |
+
return 80;
|
| 583 |
+
case 72:
|
| 584 |
+
this.begin("string");
|
| 585 |
+
break;
|
| 586 |
+
case 73:
|
| 587 |
+
this.popState();
|
| 588 |
+
break;
|
| 589 |
+
case 74:
|
| 590 |
+
return "STR";
|
| 591 |
+
case 75:
|
| 592 |
+
this.begin("string_kv");
|
| 593 |
+
break;
|
| 594 |
+
case 76:
|
| 595 |
+
return this.begin("string_kv_key"), "STR_KEY";
|
| 596 |
+
case 77:
|
| 597 |
+
this.popState(), this.begin("string_kv_value");
|
| 598 |
+
break;
|
| 599 |
+
case 78:
|
| 600 |
+
return "STR_VALUE";
|
| 601 |
+
case 79:
|
| 602 |
+
this.popState(), this.popState();
|
| 603 |
+
break;
|
| 604 |
+
case 80:
|
| 605 |
+
return "STR";
|
| 606 |
+
case 81:
|
| 607 |
+
return "LBRACE";
|
| 608 |
+
case 82:
|
| 609 |
+
return "RBRACE";
|
| 610 |
+
case 83:
|
| 611 |
+
return "SPACE";
|
| 612 |
+
case 84:
|
| 613 |
+
return "EOL";
|
| 614 |
+
case 85:
|
| 615 |
+
return 14;
|
| 616 |
+
}
|
| 617 |
+
}, "anonymous"),
|
| 618 |
+
rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:title\s[^#\n;]+)/, /^(?:accDescription\s[^#\n;]+)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:C4Context\b)/, /^(?:C4Container\b)/, /^(?:C4Component\b)/, /^(?:C4Dynamic\b)/, /^(?:C4Deployment\b)/, /^(?:Person_Ext\b)/, /^(?:Person\b)/, /^(?:SystemQueue_Ext\b)/, /^(?:SystemDb_Ext\b)/, /^(?:System_Ext\b)/, /^(?:SystemQueue\b)/, /^(?:SystemDb\b)/, /^(?:System\b)/, /^(?:Boundary\b)/, /^(?:Enterprise_Boundary\b)/, /^(?:System_Boundary\b)/, /^(?:ContainerQueue_Ext\b)/, /^(?:ContainerDb_Ext\b)/, /^(?:Container_Ext\b)/, /^(?:ContainerQueue\b)/, /^(?:ContainerDb\b)/, /^(?:Container\b)/, /^(?:Container_Boundary\b)/, /^(?:ComponentQueue_Ext\b)/, /^(?:ComponentDb_Ext\b)/, /^(?:Component_Ext\b)/, /^(?:ComponentQueue\b)/, /^(?:ComponentDb\b)/, /^(?:Component\b)/, /^(?:Deployment_Node\b)/, /^(?:Node\b)/, /^(?:Node_L\b)/, /^(?:Node_R\b)/, /^(?:Rel\b)/, /^(?:BiRel\b)/, /^(?:Rel_Up\b)/, /^(?:Rel_U\b)/, /^(?:Rel_Down\b)/, /^(?:Rel_D\b)/, /^(?:Rel_Left\b)/, /^(?:Rel_L\b)/, /^(?:Rel_Right\b)/, /^(?:Rel_R\b)/, /^(?:Rel_Back\b)/, /^(?:RelIndex\b)/, /^(?:UpdateElementStyle\b)/, /^(?:UpdateRelStyle\b)/, /^(?:UpdateLayoutConfig\b)/, /^(?:$)/, /^(?:[(][ ]*[,])/, /^(?:[(])/, /^(?:[)])/, /^(?:,,)/, /^(?:,)/, /^(?:[ ]*["]["])/, /^(?:[ ]*["])/, /^(?:["])/, /^(?:[^"]*)/, /^(?:[ ]*[\$])/, /^(?:[^=]*)/, /^(?:[=][ ]*["])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:[^,]+)/, /^(?:\{)/, /^(?:\})/, /^(?:[\s]+)/, /^(?:[\n\r]+)/, /^(?:$)/],
|
| 619 |
+
conditions: { acc_descr_multiline: { rules: [11, 12], inclusive: !1 }, acc_descr: { rules: [9], inclusive: !1 }, acc_title: { rules: [7], inclusive: !1 }, string_kv_value: { rules: [78, 79], inclusive: !1 }, string_kv_key: { rules: [77], inclusive: !1 }, string_kv: { rules: [76], inclusive: !1 }, string: { rules: [73, 74], inclusive: !1 }, attribute: { rules: [68, 69, 70, 71, 72, 75, 80], inclusive: !1 }, update_layout_config: { rules: [65, 66, 67, 68], inclusive: !1 }, update_rel_style: { rules: [65, 66, 67, 68], inclusive: !1 }, update_el_style: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_b: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_r: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_l: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_d: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_u: { rules: [65, 66, 67, 68], inclusive: !1 }, rel_bi: { rules: [], inclusive: !1 }, rel: { rules: [65, 66, 67, 68], inclusive: !1 }, node_r: { rules: [65, 66, 67, 68], inclusive: !1 }, node_l: { rules: [65, 66, 67, 68], inclusive: !1 }, node: { rules: [65, 66, 67, 68], inclusive: !1 }, index: { rules: [], inclusive: !1 }, rel_index: { rules: [65, 66, 67, 68], inclusive: !1 }, component_ext_queue: { rules: [], inclusive: !1 }, component_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, component_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, component_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, component_db: { rules: [65, 66, 67, 68], inclusive: !1 }, component: { rules: [65, 66, 67, 68], inclusive: !1 }, container_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, container_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, container_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, container_db: { rules: [65, 66, 67, 68], inclusive: !1 }, container: { rules: [65, 66, 67, 68], inclusive: !1 }, birel: { rules: [65, 66, 67, 68], inclusive: !1 }, system_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, enterprise_boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, boundary: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext_db: { rules: [65, 66, 67, 68], inclusive: !1 }, system_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, system_queue: { rules: [65, 66, 67, 68], inclusive: !1 }, system_db: { rules: [65, 66, 67, 68], inclusive: !1 }, system: { rules: [65, 66, 67, 68], inclusive: !1 }, person_ext: { rules: [65, 66, 67, 68], inclusive: !1 }, person: { rules: [65, 66, 67, 68], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 8, 10, 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, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 81, 82, 83, 84, 85], inclusive: !0 } }
|
| 620 |
+
};
|
| 621 |
+
return _t;
|
| 622 |
+
}();
|
| 623 |
+
qt.lexer = Ce;
|
| 624 |
+
function Lt() {
|
| 625 |
+
this.yy = {};
|
| 626 |
+
}
|
| 627 |
+
return g(Lt, "Parser"), Lt.prototype = qt, qt.Parser = Lt, new Lt();
|
| 628 |
+
}();
|
| 629 |
+
Ft.parser = Ft;
|
| 630 |
+
var Ue = Ft, V = [], xt = [""], B = "global", F = "", X = [
|
| 631 |
+
{
|
| 632 |
+
alias: "global",
|
| 633 |
+
label: { text: "global" },
|
| 634 |
+
type: { text: "global" },
|
| 635 |
+
tags: null,
|
| 636 |
+
link: null,
|
| 637 |
+
parentBoundary: ""
|
| 638 |
+
}
|
| 639 |
+
], It = [], ie = "", ne = !1, Vt = 4, zt = 2, be, Fe = /* @__PURE__ */ g(function() {
|
| 640 |
+
return be;
|
| 641 |
+
}, "getC4Type"), Ve = /* @__PURE__ */ g(function(e) {
|
| 642 |
+
be = ge(e, Bt());
|
| 643 |
+
}, "setC4Type"), ze = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n, i) {
|
| 644 |
+
if (e == null || t === void 0 || t === null || s === void 0 || s === null || o === void 0 || o === null)
|
| 645 |
+
return;
|
| 646 |
+
let u = {};
|
| 647 |
+
const d = It.find((f) => f.from === t && f.to === s);
|
| 648 |
+
if (d ? u = d : It.push(u), u.type = e, u.from = t, u.to = s, u.label = { text: o }, l == null)
|
| 649 |
+
u.techn = { text: "" };
|
| 650 |
+
else if (typeof l == "object") {
|
| 651 |
+
let [f, y] = Object.entries(l)[0];
|
| 652 |
+
u[f] = { text: y };
|
| 653 |
+
} else
|
| 654 |
+
u.techn = { text: l };
|
| 655 |
+
if (a == null)
|
| 656 |
+
u.descr = { text: "" };
|
| 657 |
+
else if (typeof a == "object") {
|
| 658 |
+
let [f, y] = Object.entries(a)[0];
|
| 659 |
+
u[f] = { text: y };
|
| 660 |
+
} else
|
| 661 |
+
u.descr = { text: a };
|
| 662 |
+
if (typeof r == "object") {
|
| 663 |
+
let [f, y] = Object.entries(r)[0];
|
| 664 |
+
u[f] = y;
|
| 665 |
+
} else
|
| 666 |
+
u.sprite = r;
|
| 667 |
+
if (typeof n == "object") {
|
| 668 |
+
let [f, y] = Object.entries(n)[0];
|
| 669 |
+
u[f] = y;
|
| 670 |
+
} else
|
| 671 |
+
u.tags = n;
|
| 672 |
+
if (typeof i == "object") {
|
| 673 |
+
let [f, y] = Object.entries(i)[0];
|
| 674 |
+
u[f] = y;
|
| 675 |
+
} else
|
| 676 |
+
u.link = i;
|
| 677 |
+
u.wrap = mt();
|
| 678 |
+
}, "addRel"), Xe = /* @__PURE__ */ g(function(e, t, s, o, l, a, r) {
|
| 679 |
+
if (t === null || s === null)
|
| 680 |
+
return;
|
| 681 |
+
let n = {};
|
| 682 |
+
const i = V.find((u) => u.alias === t);
|
| 683 |
+
if (i && t === i.alias ? n = i : (n.alias = t, V.push(n)), s == null ? n.label = { text: "" } : n.label = { text: s }, o == null)
|
| 684 |
+
n.descr = { text: "" };
|
| 685 |
+
else if (typeof o == "object") {
|
| 686 |
+
let [u, d] = Object.entries(o)[0];
|
| 687 |
+
n[u] = { text: d };
|
| 688 |
+
} else
|
| 689 |
+
n.descr = { text: o };
|
| 690 |
+
if (typeof l == "object") {
|
| 691 |
+
let [u, d] = Object.entries(l)[0];
|
| 692 |
+
n[u] = d;
|
| 693 |
+
} else
|
| 694 |
+
n.sprite = l;
|
| 695 |
+
if (typeof a == "object") {
|
| 696 |
+
let [u, d] = Object.entries(a)[0];
|
| 697 |
+
n[u] = d;
|
| 698 |
+
} else
|
| 699 |
+
n.tags = a;
|
| 700 |
+
if (typeof r == "object") {
|
| 701 |
+
let [u, d] = Object.entries(r)[0];
|
| 702 |
+
n[u] = d;
|
| 703 |
+
} else
|
| 704 |
+
n.link = r;
|
| 705 |
+
n.typeC4Shape = { text: e }, n.parentBoundary = B, n.wrap = mt();
|
| 706 |
+
}, "addPersonOrSystem"), We = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n) {
|
| 707 |
+
if (t === null || s === null)
|
| 708 |
+
return;
|
| 709 |
+
let i = {};
|
| 710 |
+
const u = V.find((d) => d.alias === t);
|
| 711 |
+
if (u && t === u.alias ? i = u : (i.alias = t, V.push(i)), s == null ? i.label = { text: "" } : i.label = { text: s }, o == null)
|
| 712 |
+
i.techn = { text: "" };
|
| 713 |
+
else if (typeof o == "object") {
|
| 714 |
+
let [d, f] = Object.entries(o)[0];
|
| 715 |
+
i[d] = { text: f };
|
| 716 |
+
} else
|
| 717 |
+
i.techn = { text: o };
|
| 718 |
+
if (l == null)
|
| 719 |
+
i.descr = { text: "" };
|
| 720 |
+
else if (typeof l == "object") {
|
| 721 |
+
let [d, f] = Object.entries(l)[0];
|
| 722 |
+
i[d] = { text: f };
|
| 723 |
+
} else
|
| 724 |
+
i.descr = { text: l };
|
| 725 |
+
if (typeof a == "object") {
|
| 726 |
+
let [d, f] = Object.entries(a)[0];
|
| 727 |
+
i[d] = f;
|
| 728 |
+
} else
|
| 729 |
+
i.sprite = a;
|
| 730 |
+
if (typeof r == "object") {
|
| 731 |
+
let [d, f] = Object.entries(r)[0];
|
| 732 |
+
i[d] = f;
|
| 733 |
+
} else
|
| 734 |
+
i.tags = r;
|
| 735 |
+
if (typeof n == "object") {
|
| 736 |
+
let [d, f] = Object.entries(n)[0];
|
| 737 |
+
i[d] = f;
|
| 738 |
+
} else
|
| 739 |
+
i.link = n;
|
| 740 |
+
i.wrap = mt(), i.typeC4Shape = { text: e }, i.parentBoundary = B;
|
| 741 |
+
}, "addContainer"), Qe = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n) {
|
| 742 |
+
if (t === null || s === null)
|
| 743 |
+
return;
|
| 744 |
+
let i = {};
|
| 745 |
+
const u = V.find((d) => d.alias === t);
|
| 746 |
+
if (u && t === u.alias ? i = u : (i.alias = t, V.push(i)), s == null ? i.label = { text: "" } : i.label = { text: s }, o == null)
|
| 747 |
+
i.techn = { text: "" };
|
| 748 |
+
else if (typeof o == "object") {
|
| 749 |
+
let [d, f] = Object.entries(o)[0];
|
| 750 |
+
i[d] = { text: f };
|
| 751 |
+
} else
|
| 752 |
+
i.techn = { text: o };
|
| 753 |
+
if (l == null)
|
| 754 |
+
i.descr = { text: "" };
|
| 755 |
+
else if (typeof l == "object") {
|
| 756 |
+
let [d, f] = Object.entries(l)[0];
|
| 757 |
+
i[d] = { text: f };
|
| 758 |
+
} else
|
| 759 |
+
i.descr = { text: l };
|
| 760 |
+
if (typeof a == "object") {
|
| 761 |
+
let [d, f] = Object.entries(a)[0];
|
| 762 |
+
i[d] = f;
|
| 763 |
+
} else
|
| 764 |
+
i.sprite = a;
|
| 765 |
+
if (typeof r == "object") {
|
| 766 |
+
let [d, f] = Object.entries(r)[0];
|
| 767 |
+
i[d] = f;
|
| 768 |
+
} else
|
| 769 |
+
i.tags = r;
|
| 770 |
+
if (typeof n == "object") {
|
| 771 |
+
let [d, f] = Object.entries(n)[0];
|
| 772 |
+
i[d] = f;
|
| 773 |
+
} else
|
| 774 |
+
i.link = n;
|
| 775 |
+
i.wrap = mt(), i.typeC4Shape = { text: e }, i.parentBoundary = B;
|
| 776 |
+
}, "addComponent"), He = /* @__PURE__ */ g(function(e, t, s, o, l) {
|
| 777 |
+
if (e === null || t === null)
|
| 778 |
+
return;
|
| 779 |
+
let a = {};
|
| 780 |
+
const r = X.find((n) => n.alias === e);
|
| 781 |
+
if (r && e === r.alias ? a = r : (a.alias = e, X.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, s == null)
|
| 782 |
+
a.type = { text: "system" };
|
| 783 |
+
else if (typeof s == "object") {
|
| 784 |
+
let [n, i] = Object.entries(s)[0];
|
| 785 |
+
a[n] = { text: i };
|
| 786 |
+
} else
|
| 787 |
+
a.type = { text: s };
|
| 788 |
+
if (typeof o == "object") {
|
| 789 |
+
let [n, i] = Object.entries(o)[0];
|
| 790 |
+
a[n] = i;
|
| 791 |
+
} else
|
| 792 |
+
a.tags = o;
|
| 793 |
+
if (typeof l == "object") {
|
| 794 |
+
let [n, i] = Object.entries(l)[0];
|
| 795 |
+
a[n] = i;
|
| 796 |
+
} else
|
| 797 |
+
a.link = l;
|
| 798 |
+
a.parentBoundary = B, a.wrap = mt(), F = B, B = e, xt.push(F);
|
| 799 |
+
}, "addPersonOrSystemBoundary"), qe = /* @__PURE__ */ g(function(e, t, s, o, l) {
|
| 800 |
+
if (e === null || t === null)
|
| 801 |
+
return;
|
| 802 |
+
let a = {};
|
| 803 |
+
const r = X.find((n) => n.alias === e);
|
| 804 |
+
if (r && e === r.alias ? a = r : (a.alias = e, X.push(a)), t == null ? a.label = { text: "" } : a.label = { text: t }, s == null)
|
| 805 |
+
a.type = { text: "container" };
|
| 806 |
+
else if (typeof s == "object") {
|
| 807 |
+
let [n, i] = Object.entries(s)[0];
|
| 808 |
+
a[n] = { text: i };
|
| 809 |
+
} else
|
| 810 |
+
a.type = { text: s };
|
| 811 |
+
if (typeof o == "object") {
|
| 812 |
+
let [n, i] = Object.entries(o)[0];
|
| 813 |
+
a[n] = i;
|
| 814 |
+
} else
|
| 815 |
+
a.tags = o;
|
| 816 |
+
if (typeof l == "object") {
|
| 817 |
+
let [n, i] = Object.entries(l)[0];
|
| 818 |
+
a[n] = i;
|
| 819 |
+
} else
|
| 820 |
+
a.link = l;
|
| 821 |
+
a.parentBoundary = B, a.wrap = mt(), F = B, B = e, xt.push(F);
|
| 822 |
+
}, "addContainerBoundary"), Ge = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n) {
|
| 823 |
+
if (t === null || s === null)
|
| 824 |
+
return;
|
| 825 |
+
let i = {};
|
| 826 |
+
const u = X.find((d) => d.alias === t);
|
| 827 |
+
if (u && t === u.alias ? i = u : (i.alias = t, X.push(i)), s == null ? i.label = { text: "" } : i.label = { text: s }, o == null)
|
| 828 |
+
i.type = { text: "node" };
|
| 829 |
+
else if (typeof o == "object") {
|
| 830 |
+
let [d, f] = Object.entries(o)[0];
|
| 831 |
+
i[d] = { text: f };
|
| 832 |
+
} else
|
| 833 |
+
i.type = { text: o };
|
| 834 |
+
if (l == null)
|
| 835 |
+
i.descr = { text: "" };
|
| 836 |
+
else if (typeof l == "object") {
|
| 837 |
+
let [d, f] = Object.entries(l)[0];
|
| 838 |
+
i[d] = { text: f };
|
| 839 |
+
} else
|
| 840 |
+
i.descr = { text: l };
|
| 841 |
+
if (typeof r == "object") {
|
| 842 |
+
let [d, f] = Object.entries(r)[0];
|
| 843 |
+
i[d] = f;
|
| 844 |
+
} else
|
| 845 |
+
i.tags = r;
|
| 846 |
+
if (typeof n == "object") {
|
| 847 |
+
let [d, f] = Object.entries(n)[0];
|
| 848 |
+
i[d] = f;
|
| 849 |
+
} else
|
| 850 |
+
i.link = n;
|
| 851 |
+
i.nodeType = e, i.parentBoundary = B, i.wrap = mt(), F = B, B = t, xt.push(F);
|
| 852 |
+
}, "addDeploymentNode"), Ke = /* @__PURE__ */ g(function() {
|
| 853 |
+
B = F, xt.pop(), F = xt.pop(), xt.push(F);
|
| 854 |
+
}, "popBoundaryParseStack"), Je = /* @__PURE__ */ g(function(e, t, s, o, l, a, r, n, i, u, d) {
|
| 855 |
+
let f = V.find((y) => y.alias === t);
|
| 856 |
+
if (!(f === void 0 && (f = X.find((y) => y.alias === t), f === void 0))) {
|
| 857 |
+
if (s != null)
|
| 858 |
+
if (typeof s == "object") {
|
| 859 |
+
let [y, E] = Object.entries(s)[0];
|
| 860 |
+
f[y] = E;
|
| 861 |
+
} else
|
| 862 |
+
f.bgColor = s;
|
| 863 |
+
if (o != null)
|
| 864 |
+
if (typeof o == "object") {
|
| 865 |
+
let [y, E] = Object.entries(o)[0];
|
| 866 |
+
f[y] = E;
|
| 867 |
+
} else
|
| 868 |
+
f.fontColor = o;
|
| 869 |
+
if (l != null)
|
| 870 |
+
if (typeof l == "object") {
|
| 871 |
+
let [y, E] = Object.entries(l)[0];
|
| 872 |
+
f[y] = E;
|
| 873 |
+
} else
|
| 874 |
+
f.borderColor = l;
|
| 875 |
+
if (a != null)
|
| 876 |
+
if (typeof a == "object") {
|
| 877 |
+
let [y, E] = Object.entries(a)[0];
|
| 878 |
+
f[y] = E;
|
| 879 |
+
} else
|
| 880 |
+
f.shadowing = a;
|
| 881 |
+
if (r != null)
|
| 882 |
+
if (typeof r == "object") {
|
| 883 |
+
let [y, E] = Object.entries(r)[0];
|
| 884 |
+
f[y] = E;
|
| 885 |
+
} else
|
| 886 |
+
f.shape = r;
|
| 887 |
+
if (n != null)
|
| 888 |
+
if (typeof n == "object") {
|
| 889 |
+
let [y, E] = Object.entries(n)[0];
|
| 890 |
+
f[y] = E;
|
| 891 |
+
} else
|
| 892 |
+
f.sprite = n;
|
| 893 |
+
if (i != null)
|
| 894 |
+
if (typeof i == "object") {
|
| 895 |
+
let [y, E] = Object.entries(i)[0];
|
| 896 |
+
f[y] = E;
|
| 897 |
+
} else
|
| 898 |
+
f.techn = i;
|
| 899 |
+
if (u != null)
|
| 900 |
+
if (typeof u == "object") {
|
| 901 |
+
let [y, E] = Object.entries(u)[0];
|
| 902 |
+
f[y] = E;
|
| 903 |
+
} else
|
| 904 |
+
f.legendText = u;
|
| 905 |
+
if (d != null)
|
| 906 |
+
if (typeof d == "object") {
|
| 907 |
+
let [y, E] = Object.entries(d)[0];
|
| 908 |
+
f[y] = E;
|
| 909 |
+
} else
|
| 910 |
+
f.legendSprite = d;
|
| 911 |
+
}
|
| 912 |
+
}, "updateElStyle"), Ze = /* @__PURE__ */ g(function(e, t, s, o, l, a, r) {
|
| 913 |
+
const n = It.find((i) => i.from === t && i.to === s);
|
| 914 |
+
if (n !== void 0) {
|
| 915 |
+
if (o != null)
|
| 916 |
+
if (typeof o == "object") {
|
| 917 |
+
let [i, u] = Object.entries(o)[0];
|
| 918 |
+
n[i] = u;
|
| 919 |
+
} else
|
| 920 |
+
n.textColor = o;
|
| 921 |
+
if (l != null)
|
| 922 |
+
if (typeof l == "object") {
|
| 923 |
+
let [i, u] = Object.entries(l)[0];
|
| 924 |
+
n[i] = u;
|
| 925 |
+
} else
|
| 926 |
+
n.lineColor = l;
|
| 927 |
+
if (a != null)
|
| 928 |
+
if (typeof a == "object") {
|
| 929 |
+
let [i, u] = Object.entries(a)[0];
|
| 930 |
+
n[i] = parseInt(u);
|
| 931 |
+
} else
|
| 932 |
+
n.offsetX = parseInt(a);
|
| 933 |
+
if (r != null)
|
| 934 |
+
if (typeof r == "object") {
|
| 935 |
+
let [i, u] = Object.entries(r)[0];
|
| 936 |
+
n[i] = parseInt(u);
|
| 937 |
+
} else
|
| 938 |
+
n.offsetY = parseInt(r);
|
| 939 |
+
}
|
| 940 |
+
}, "updateRelStyle"), $e = /* @__PURE__ */ g(function(e, t, s) {
|
| 941 |
+
let o = Vt, l = zt;
|
| 942 |
+
if (typeof t == "object") {
|
| 943 |
+
const a = Object.values(t)[0];
|
| 944 |
+
o = parseInt(a);
|
| 945 |
+
} else
|
| 946 |
+
o = parseInt(t);
|
| 947 |
+
if (typeof s == "object") {
|
| 948 |
+
const a = Object.values(s)[0];
|
| 949 |
+
l = parseInt(a);
|
| 950 |
+
} else
|
| 951 |
+
l = parseInt(s);
|
| 952 |
+
o >= 1 && (Vt = o), l >= 1 && (zt = l);
|
| 953 |
+
}, "updateLayoutConfig"), t0 = /* @__PURE__ */ g(function() {
|
| 954 |
+
return Vt;
|
| 955 |
+
}, "getC4ShapeInRow"), e0 = /* @__PURE__ */ g(function() {
|
| 956 |
+
return zt;
|
| 957 |
+
}, "getC4BoundaryInRow"), a0 = /* @__PURE__ */ g(function() {
|
| 958 |
+
return B;
|
| 959 |
+
}, "getCurrentBoundaryParse"), i0 = /* @__PURE__ */ g(function() {
|
| 960 |
+
return F;
|
| 961 |
+
}, "getParentBoundaryParse"), _e = /* @__PURE__ */ g(function(e) {
|
| 962 |
+
return e == null ? V : V.filter((t) => t.parentBoundary === e);
|
| 963 |
+
}, "getC4ShapeArray"), n0 = /* @__PURE__ */ g(function(e) {
|
| 964 |
+
return V.find((t) => t.alias === e);
|
| 965 |
+
}, "getC4Shape"), r0 = /* @__PURE__ */ g(function(e) {
|
| 966 |
+
return Object.keys(_e(e));
|
| 967 |
+
}, "getC4ShapeKeys"), xe = /* @__PURE__ */ g(function(e) {
|
| 968 |
+
return e == null ? X : X.filter((t) => t.parentBoundary === e);
|
| 969 |
+
}, "getBoundaries"), s0 = xe, l0 = /* @__PURE__ */ g(function() {
|
| 970 |
+
return It;
|
| 971 |
+
}, "getRels"), o0 = /* @__PURE__ */ g(function() {
|
| 972 |
+
return ie;
|
| 973 |
+
}, "getTitle"), c0 = /* @__PURE__ */ g(function(e) {
|
| 974 |
+
ne = e;
|
| 975 |
+
}, "setWrap"), mt = /* @__PURE__ */ g(function() {
|
| 976 |
+
return ne;
|
| 977 |
+
}, "autoWrap"), h0 = /* @__PURE__ */ g(function() {
|
| 978 |
+
V = [], X = [
|
| 979 |
+
{
|
| 980 |
+
alias: "global",
|
| 981 |
+
label: { text: "global" },
|
| 982 |
+
type: { text: "global" },
|
| 983 |
+
tags: null,
|
| 984 |
+
link: null,
|
| 985 |
+
parentBoundary: ""
|
| 986 |
+
}
|
| 987 |
+
], F = "", B = "global", xt = [""], It = [], xt = [""], ie = "", ne = !1, Vt = 4, zt = 2;
|
| 988 |
+
}, "clear"), u0 = {
|
| 989 |
+
SOLID: 0,
|
| 990 |
+
DOTTED: 1,
|
| 991 |
+
NOTE: 2,
|
| 992 |
+
SOLID_CROSS: 3,
|
| 993 |
+
DOTTED_CROSS: 4,
|
| 994 |
+
SOLID_OPEN: 5,
|
| 995 |
+
DOTTED_OPEN: 6,
|
| 996 |
+
LOOP_START: 10,
|
| 997 |
+
LOOP_END: 11,
|
| 998 |
+
ALT_START: 12,
|
| 999 |
+
ALT_ELSE: 13,
|
| 1000 |
+
ALT_END: 14,
|
| 1001 |
+
OPT_START: 15,
|
| 1002 |
+
OPT_END: 16,
|
| 1003 |
+
ACTIVE_START: 17,
|
| 1004 |
+
ACTIVE_END: 18,
|
| 1005 |
+
PAR_START: 19,
|
| 1006 |
+
PAR_AND: 20,
|
| 1007 |
+
PAR_END: 21,
|
| 1008 |
+
RECT_START: 22,
|
| 1009 |
+
RECT_END: 23,
|
| 1010 |
+
SOLID_POINT: 24,
|
| 1011 |
+
DOTTED_POINT: 25
|
| 1012 |
+
}, d0 = {
|
| 1013 |
+
FILLED: 0,
|
| 1014 |
+
OPEN: 1
|
| 1015 |
+
}, f0 = {
|
| 1016 |
+
LEFTOF: 0,
|
| 1017 |
+
RIGHTOF: 1,
|
| 1018 |
+
OVER: 2
|
| 1019 |
+
}, p0 = /* @__PURE__ */ g(function(e) {
|
| 1020 |
+
ie = ge(e, Bt());
|
| 1021 |
+
}, "setTitle"), te = {
|
| 1022 |
+
addPersonOrSystem: Xe,
|
| 1023 |
+
addPersonOrSystemBoundary: He,
|
| 1024 |
+
addContainer: We,
|
| 1025 |
+
addContainerBoundary: qe,
|
| 1026 |
+
addComponent: Qe,
|
| 1027 |
+
addDeploymentNode: Ge,
|
| 1028 |
+
popBoundaryParseStack: Ke,
|
| 1029 |
+
addRel: ze,
|
| 1030 |
+
updateElStyle: Je,
|
| 1031 |
+
updateRelStyle: Ze,
|
| 1032 |
+
updateLayoutConfig: $e,
|
| 1033 |
+
autoWrap: mt,
|
| 1034 |
+
setWrap: c0,
|
| 1035 |
+
getC4ShapeArray: _e,
|
| 1036 |
+
getC4Shape: n0,
|
| 1037 |
+
getC4ShapeKeys: r0,
|
| 1038 |
+
getBoundaries: xe,
|
| 1039 |
+
getBoundarys: s0,
|
| 1040 |
+
getCurrentBoundaryParse: a0,
|
| 1041 |
+
getParentBoundaryParse: i0,
|
| 1042 |
+
getRels: l0,
|
| 1043 |
+
getTitle: o0,
|
| 1044 |
+
getC4Type: Fe,
|
| 1045 |
+
getC4ShapeInRow: t0,
|
| 1046 |
+
getC4BoundaryInRow: e0,
|
| 1047 |
+
setAccTitle: Me,
|
| 1048 |
+
getAccTitle: Ie,
|
| 1049 |
+
getAccDescription: Be,
|
| 1050 |
+
setAccDescription: Pe,
|
| 1051 |
+
getConfig: /* @__PURE__ */ g(() => Bt().c4, "getConfig"),
|
| 1052 |
+
clear: h0,
|
| 1053 |
+
LINETYPE: u0,
|
| 1054 |
+
ARROWTYPE: d0,
|
| 1055 |
+
PLACEMENT: f0,
|
| 1056 |
+
setTitle: p0,
|
| 1057 |
+
setC4Type: Ve
|
| 1058 |
+
// apply,
|
| 1059 |
+
}, re = /* @__PURE__ */ g(function(e, t) {
|
| 1060 |
+
return De(e, t);
|
| 1061 |
+
}, "drawRect"), me = /* @__PURE__ */ g(function(e, t, s, o, l, a) {
|
| 1062 |
+
const r = e.append("image");
|
| 1063 |
+
r.attr("width", t), r.attr("height", s), r.attr("x", o), r.attr("y", l);
|
| 1064 |
+
let n = a.startsWith("data:image/png;base64") ? a : Ye(a);
|
| 1065 |
+
r.attr("xlink:href", n);
|
| 1066 |
+
}, "drawImage"), y0 = /* @__PURE__ */ g((e, t, s) => {
|
| 1067 |
+
const o = e.append("g");
|
| 1068 |
+
let l = 0;
|
| 1069 |
+
for (let a of t) {
|
| 1070 |
+
let r = a.textColor ? a.textColor : "#444444", n = a.lineColor ? a.lineColor : "#444444", i = a.offsetX ? parseInt(a.offsetX) : 0, u = a.offsetY ? parseInt(a.offsetY) : 0, d = "";
|
| 1071 |
+
if (l === 0) {
|
| 1072 |
+
let y = o.append("line");
|
| 1073 |
+
y.attr("x1", a.startPoint.x), y.attr("y1", a.startPoint.y), y.attr("x2", a.endPoint.x), y.attr("y2", a.endPoint.y), y.attr("stroke-width", "1"), y.attr("stroke", n), y.style("fill", "none"), a.type !== "rel_b" && y.attr("marker-end", "url(" + d + "#arrowhead)"), (a.type === "birel" || a.type === "rel_b") && y.attr("marker-start", "url(" + d + "#arrowend)"), l = -1;
|
| 1074 |
+
} else {
|
| 1075 |
+
let y = o.append("path");
|
| 1076 |
+
y.attr("fill", "none").attr("stroke-width", "1").attr("stroke", n).attr(
|
| 1077 |
+
"d",
|
| 1078 |
+
"Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx", a.startPoint.x).replaceAll("starty", a.startPoint.y).replaceAll(
|
| 1079 |
+
"controlx",
|
| 1080 |
+
a.startPoint.x + (a.endPoint.x - a.startPoint.x) / 2 - (a.endPoint.x - a.startPoint.x) / 4
|
| 1081 |
+
).replaceAll("controly", a.startPoint.y + (a.endPoint.y - a.startPoint.y) / 2).replaceAll("stopx", a.endPoint.x).replaceAll("stopy", a.endPoint.y)
|
| 1082 |
+
), a.type !== "rel_b" && y.attr("marker-end", "url(" + d + "#arrowhead)"), (a.type === "birel" || a.type === "rel_b") && y.attr("marker-start", "url(" + d + "#arrowend)");
|
| 1083 |
+
}
|
| 1084 |
+
let f = s.messageFont();
|
| 1085 |
+
Q(s)(
|
| 1086 |
+
a.label.text,
|
| 1087 |
+
o,
|
| 1088 |
+
Math.min(a.startPoint.x, a.endPoint.x) + Math.abs(a.endPoint.x - a.startPoint.x) / 2 + i,
|
| 1089 |
+
Math.min(a.startPoint.y, a.endPoint.y) + Math.abs(a.endPoint.y - a.startPoint.y) / 2 + u,
|
| 1090 |
+
a.label.width,
|
| 1091 |
+
a.label.height,
|
| 1092 |
+
{ fill: r },
|
| 1093 |
+
f
|
| 1094 |
+
), a.techn && a.techn.text !== "" && (f = s.messageFont(), Q(s)(
|
| 1095 |
+
"[" + a.techn.text + "]",
|
| 1096 |
+
o,
|
| 1097 |
+
Math.min(a.startPoint.x, a.endPoint.x) + Math.abs(a.endPoint.x - a.startPoint.x) / 2 + i,
|
| 1098 |
+
Math.min(a.startPoint.y, a.endPoint.y) + Math.abs(a.endPoint.y - a.startPoint.y) / 2 + s.messageFontSize + 5 + u,
|
| 1099 |
+
Math.max(a.label.width, a.techn.width),
|
| 1100 |
+
a.techn.height,
|
| 1101 |
+
{ fill: r, "font-style": "italic" },
|
| 1102 |
+
f
|
| 1103 |
+
));
|
| 1104 |
+
}
|
| 1105 |
+
}, "drawRels"), g0 = /* @__PURE__ */ g(function(e, t, s) {
|
| 1106 |
+
const o = e.append("g");
|
| 1107 |
+
let l = t.bgColor ? t.bgColor : "none", a = t.borderColor ? t.borderColor : "#444444", r = t.fontColor ? t.fontColor : "black", n = { "stroke-width": 1, "stroke-dasharray": "7.0,7.0" };
|
| 1108 |
+
t.nodeType && (n = { "stroke-width": 1 });
|
| 1109 |
+
let i = {
|
| 1110 |
+
x: t.x,
|
| 1111 |
+
y: t.y,
|
| 1112 |
+
fill: l,
|
| 1113 |
+
stroke: a,
|
| 1114 |
+
width: t.width,
|
| 1115 |
+
height: t.height,
|
| 1116 |
+
rx: 2.5,
|
| 1117 |
+
ry: 2.5,
|
| 1118 |
+
attrs: n
|
| 1119 |
+
};
|
| 1120 |
+
re(o, i);
|
| 1121 |
+
let u = s.boundaryFont();
|
| 1122 |
+
u.fontWeight = "bold", u.fontSize = u.fontSize + 2, u.fontColor = r, Q(s)(
|
| 1123 |
+
t.label.text,
|
| 1124 |
+
o,
|
| 1125 |
+
t.x,
|
| 1126 |
+
t.y + t.label.Y,
|
| 1127 |
+
t.width,
|
| 1128 |
+
t.height,
|
| 1129 |
+
{ fill: "#444444" },
|
| 1130 |
+
u
|
| 1131 |
+
), t.type && t.type.text !== "" && (u = s.boundaryFont(), u.fontColor = r, Q(s)(
|
| 1132 |
+
t.type.text,
|
| 1133 |
+
o,
|
| 1134 |
+
t.x,
|
| 1135 |
+
t.y + t.type.Y,
|
| 1136 |
+
t.width,
|
| 1137 |
+
t.height,
|
| 1138 |
+
{ fill: "#444444" },
|
| 1139 |
+
u
|
| 1140 |
+
)), t.descr && t.descr.text !== "" && (u = s.boundaryFont(), u.fontSize = u.fontSize - 2, u.fontColor = r, Q(s)(
|
| 1141 |
+
t.descr.text,
|
| 1142 |
+
o,
|
| 1143 |
+
t.x,
|
| 1144 |
+
t.y + t.descr.Y,
|
| 1145 |
+
t.width,
|
| 1146 |
+
t.height,
|
| 1147 |
+
{ fill: "#444444" },
|
| 1148 |
+
u
|
| 1149 |
+
));
|
| 1150 |
+
}, "drawBoundary"), b0 = /* @__PURE__ */ g(function(e, t, s) {
|
| 1151 |
+
var f;
|
| 1152 |
+
let o = t.bgColor ? t.bgColor : s[t.typeC4Shape.text + "_bg_color"], l = t.borderColor ? t.borderColor : s[t.typeC4Shape.text + "_border_color"], a = t.fontColor ? t.fontColor : "#FFFFFF", r = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQ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YlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";
|
| 1159 |
+
break;
|
| 1160 |
+
}
|
| 1161 |
+
const n = e.append("g");
|
| 1162 |
+
n.attr("class", "person-man");
|
| 1163 |
+
const i = Se();
|
| 1164 |
+
switch (t.typeC4Shape.text) {
|
| 1165 |
+
case "person":
|
| 1166 |
+
case "external_person":
|
| 1167 |
+
case "system":
|
| 1168 |
+
case "external_system":
|
| 1169 |
+
case "container":
|
| 1170 |
+
case "external_container":
|
| 1171 |
+
case "component":
|
| 1172 |
+
case "external_component":
|
| 1173 |
+
i.x = t.x, i.y = t.y, i.fill = o, i.width = t.width, i.height = t.height, i.stroke = l, i.rx = 2.5, i.ry = 2.5, i.attrs = { "stroke-width": 0.5 }, re(n, i);
|
| 1174 |
+
break;
|
| 1175 |
+
case "system_db":
|
| 1176 |
+
case "external_system_db":
|
| 1177 |
+
case "container_db":
|
| 1178 |
+
case "external_container_db":
|
| 1179 |
+
case "component_db":
|
| 1180 |
+
case "external_component_db":
|
| 1181 |
+
n.append("path").attr("fill", o).attr("stroke-width", "0.5").attr("stroke", l).attr(
|
| 1182 |
+
"d",
|
| 1183 |
+
"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", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2).replaceAll("height", t.height)
|
| 1184 |
+
), n.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", l).attr(
|
| 1185 |
+
"d",
|
| 1186 |
+
"Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx", t.x).replaceAll("starty", t.y).replaceAll("half", t.width / 2)
|
| 1187 |
+
);
|
| 1188 |
+
break;
|
| 1189 |
+
case "system_queue":
|
| 1190 |
+
case "external_system_queue":
|
| 1191 |
+
case "container_queue":
|
| 1192 |
+
case "external_container_queue":
|
| 1193 |
+
case "component_queue":
|
| 1194 |
+
case "external_component_queue":
|
| 1195 |
+
n.append("path").attr("fill", o).attr("stroke-width", "0.5").attr("stroke", l).attr(
|
| 1196 |
+
"d",
|
| 1197 |
+
"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", t.x).replaceAll("starty", t.y).replaceAll("width", t.width).replaceAll("half", t.height / 2)
|
| 1198 |
+
), n.append("path").attr("fill", "none").attr("stroke-width", "0.5").attr("stroke", l).attr(
|
| 1199 |
+
"d",
|
| 1200 |
+
"Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx", t.x + t.width).replaceAll("starty", t.y).replaceAll("half", t.height / 2)
|
| 1201 |
+
);
|
| 1202 |
+
break;
|
| 1203 |
+
}
|
| 1204 |
+
let u = w0(s, t.typeC4Shape.text);
|
| 1205 |
+
switch (n.append("text").attr("fill", a).attr("font-family", u.fontFamily).attr("font-size", u.fontSize - 2).attr("font-style", "italic").attr("lengthAdjust", "spacing").attr("textLength", t.typeC4Shape.width).attr("x", t.x + t.width / 2 - t.typeC4Shape.width / 2).attr("y", t.y + t.typeC4Shape.Y).text("<<" + t.typeC4Shape.text + ">>"), t.typeC4Shape.text) {
|
| 1206 |
+
case "person":
|
| 1207 |
+
case "external_person":
|
| 1208 |
+
me(
|
| 1209 |
+
n,
|
| 1210 |
+
48,
|
| 1211 |
+
48,
|
| 1212 |
+
t.x + t.width / 2 - 24,
|
| 1213 |
+
t.y + t.image.Y,
|
| 1214 |
+
r
|
| 1215 |
+
);
|
| 1216 |
+
break;
|
| 1217 |
+
}
|
| 1218 |
+
let d = s[t.typeC4Shape.text + "Font"]();
|
| 1219 |
+
return d.fontWeight = "bold", d.fontSize = d.fontSize + 2, d.fontColor = a, Q(s)(
|
| 1220 |
+
t.label.text,
|
| 1221 |
+
n,
|
| 1222 |
+
t.x,
|
| 1223 |
+
t.y + t.label.Y,
|
| 1224 |
+
t.width,
|
| 1225 |
+
t.height,
|
| 1226 |
+
{ fill: a },
|
| 1227 |
+
d
|
| 1228 |
+
), d = s[t.typeC4Shape.text + "Font"](), d.fontColor = a, t.techn && ((f = t.techn) == null ? void 0 : f.text) !== "" ? Q(s)(
|
| 1229 |
+
t.techn.text,
|
| 1230 |
+
n,
|
| 1231 |
+
t.x,
|
| 1232 |
+
t.y + t.techn.Y,
|
| 1233 |
+
t.width,
|
| 1234 |
+
t.height,
|
| 1235 |
+
{ fill: a, "font-style": "italic" },
|
| 1236 |
+
d
|
| 1237 |
+
) : t.type && t.type.text !== "" && Q(s)(
|
| 1238 |
+
t.type.text,
|
| 1239 |
+
n,
|
| 1240 |
+
t.x,
|
| 1241 |
+
t.y + t.type.Y,
|
| 1242 |
+
t.width,
|
| 1243 |
+
t.height,
|
| 1244 |
+
{ fill: a, "font-style": "italic" },
|
| 1245 |
+
d
|
| 1246 |
+
), t.descr && t.descr.text !== "" && (d = s.personFont(), d.fontColor = a, Q(s)(
|
| 1247 |
+
t.descr.text,
|
| 1248 |
+
n,
|
| 1249 |
+
t.x,
|
| 1250 |
+
t.y + t.descr.Y,
|
| 1251 |
+
t.width,
|
| 1252 |
+
t.height,
|
| 1253 |
+
{ fill: a },
|
| 1254 |
+
d
|
| 1255 |
+
)), t.height;
|
| 1256 |
+
}, "drawC4Shape"), _0 = /* @__PURE__ */ g(function(e) {
|
| 1257 |
+
e.append("defs").append("symbol").attr("id", "database").attr("fill-rule", "evenodd").attr("clip-rule", "evenodd").append("path").attr("transform", "scale(.5)").attr(
|
| 1258 |
+
"d",
|
| 1259 |
+
"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"
|
| 1260 |
+
);
|
| 1261 |
+
}, "insertDatabaseIcon"), x0 = /* @__PURE__ */ g(function(e) {
|
| 1262 |
+
e.append("defs").append("symbol").attr("id", "computer").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
| 1263 |
+
"d",
|
| 1264 |
+
"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"
|
| 1265 |
+
);
|
| 1266 |
+
}, "insertComputerIcon"), m0 = /* @__PURE__ */ g(function(e) {
|
| 1267 |
+
e.append("defs").append("symbol").attr("id", "clock").attr("width", "24").attr("height", "24").append("path").attr("transform", "scale(.5)").attr(
|
| 1268 |
+
"d",
|
| 1269 |
+
"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"
|
| 1270 |
+
);
|
| 1271 |
+
}, "insertClockIcon"), v0 = /* @__PURE__ */ g(function(e) {
|
| 1272 |
+
e.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");
|
| 1273 |
+
}, "insertArrowHead"), E0 = /* @__PURE__ */ g(function(e) {
|
| 1274 |
+
e.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");
|
| 1275 |
+
}, "insertArrowEnd"), k0 = /* @__PURE__ */ g(function(e) {
|
| 1276 |
+
e.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");
|
| 1277 |
+
}, "insertArrowFilledHead"), A0 = /* @__PURE__ */ g(function(e) {
|
| 1278 |
+
e.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);
|
| 1279 |
+
}, "insertDynamicNumber"), C0 = /* @__PURE__ */ g(function(e) {
|
| 1280 |
+
const s = e.append("defs").append("marker").attr("id", "crosshead").attr("markerWidth", 15).attr("markerHeight", 8).attr("orient", "auto").attr("refX", 16).attr("refY", 4);
|
| 1281 |
+
s.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"), s.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");
|
| 1282 |
+
}, "insertArrowCrossHead"), w0 = /* @__PURE__ */ g((e, t) => ({
|
| 1283 |
+
fontFamily: e[t + "FontFamily"],
|
| 1284 |
+
fontSize: e[t + "FontSize"],
|
| 1285 |
+
fontWeight: e[t + "FontWeight"]
|
| 1286 |
+
}), "getC4ShapeFont"), Q = /* @__PURE__ */ function() {
|
| 1287 |
+
function e(l, a, r, n, i, u, d) {
|
| 1288 |
+
const f = a.append("text").attr("x", r + i / 2).attr("y", n + u / 2 + 5).style("text-anchor", "middle").text(l);
|
| 1289 |
+
o(f, d);
|
| 1290 |
+
}
|
| 1291 |
+
g(e, "byText");
|
| 1292 |
+
function t(l, a, r, n, i, u, d, f) {
|
| 1293 |
+
const { fontSize: y, fontFamily: E, fontWeight: O } = f, S = l.split($t.lineBreakRegex);
|
| 1294 |
+
for (let P = 0; P < S.length; P++) {
|
| 1295 |
+
const M = P * y - y * (S.length - 1) / 2, U = a.append("text").attr("x", r + i / 2).attr("y", n).style("text-anchor", "middle").attr("dominant-baseline", "middle").style("font-size", y).style("font-weight", O).style("font-family", E);
|
| 1296 |
+
U.append("tspan").attr("dy", M).text(S[P]).attr("alignment-baseline", "mathematical"), o(U, d);
|
| 1297 |
+
}
|
| 1298 |
+
}
|
| 1299 |
+
g(t, "byTspan");
|
| 1300 |
+
function s(l, a, r, n, i, u, d, f) {
|
| 1301 |
+
const y = a.append("switch"), O = y.append("foreignObject").attr("x", r).attr("y", n).attr("width", i).attr("height", u).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
| 1302 |
+
O.append("div").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(l), t(l, y, r, n, i, u, d, f), o(O, d);
|
| 1303 |
+
}
|
| 1304 |
+
g(s, "byFo");
|
| 1305 |
+
function o(l, a) {
|
| 1306 |
+
for (const r in a)
|
| 1307 |
+
a.hasOwnProperty(r) && l.attr(r, a[r]);
|
| 1308 |
+
}
|
| 1309 |
+
return g(o, "_setTextAttrs"), function(l) {
|
| 1310 |
+
return l.textPlacement === "fo" ? s : l.textPlacement === "old" ? e : t;
|
| 1311 |
+
};
|
| 1312 |
+
}(), z = {
|
| 1313 |
+
drawRect: re,
|
| 1314 |
+
drawBoundary: g0,
|
| 1315 |
+
drawC4Shape: b0,
|
| 1316 |
+
drawRels: y0,
|
| 1317 |
+
drawImage: me,
|
| 1318 |
+
insertArrowHead: v0,
|
| 1319 |
+
insertArrowEnd: E0,
|
| 1320 |
+
insertArrowFilledHead: k0,
|
| 1321 |
+
insertDynamicNumber: A0,
|
| 1322 |
+
insertArrowCrossHead: C0,
|
| 1323 |
+
insertDatabaseIcon: _0,
|
| 1324 |
+
insertComputerIcon: x0,
|
| 1325 |
+
insertClockIcon: m0
|
| 1326 |
+
}, Xt = 0, Wt = 0, ve = 4, ee = 2;
|
| 1327 |
+
Ft.yy = te;
|
| 1328 |
+
var _ = {}, Ot, Ee = (Ot = class {
|
| 1329 |
+
constructor(t) {
|
| 1330 |
+
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, ae(t.db.getConfig());
|
| 1331 |
+
}
|
| 1332 |
+
setData(t, s, o, l) {
|
| 1333 |
+
this.nextData.startx = this.data.startx = t, this.nextData.stopx = this.data.stopx = s, this.nextData.starty = this.data.starty = o, this.nextData.stopy = this.data.stopy = l;
|
| 1334 |
+
}
|
| 1335 |
+
updateVal(t, s, o, l) {
|
| 1336 |
+
t[s] === void 0 ? t[s] = o : t[s] = l(o, t[s]);
|
| 1337 |
+
}
|
| 1338 |
+
insert(t) {
|
| 1339 |
+
this.nextData.cnt = this.nextData.cnt + 1;
|
| 1340 |
+
let s = this.nextData.startx === this.nextData.stopx ? this.nextData.stopx + t.margin : this.nextData.stopx + t.margin * 2, o = s + t.width, l = this.nextData.starty + t.margin * 2, a = l + t.height;
|
| 1341 |
+
(s >= this.data.widthLimit || o >= this.data.widthLimit || this.nextData.cnt > ve) && (s = this.nextData.startx + t.margin + _.nextLinePaddingX, l = this.nextData.stopy + t.margin * 2, this.nextData.stopx = o = s + t.width, this.nextData.starty = this.nextData.stopy, this.nextData.stopy = a = l + t.height, this.nextData.cnt = 1), t.x = s, t.y = l, this.updateVal(this.data, "startx", s, Math.min), this.updateVal(this.data, "starty", l, Math.min), this.updateVal(this.data, "stopx", o, Math.max), this.updateVal(this.data, "stopy", a, Math.max), this.updateVal(this.nextData, "startx", s, Math.min), this.updateVal(this.nextData, "starty", l, Math.min), this.updateVal(this.nextData, "stopx", o, Math.max), this.updateVal(this.nextData, "stopy", a, Math.max);
|
| 1342 |
+
}
|
| 1343 |
+
init(t) {
|
| 1344 |
+
this.name = "", this.data = {
|
| 1345 |
+
startx: void 0,
|
| 1346 |
+
stopx: void 0,
|
| 1347 |
+
starty: void 0,
|
| 1348 |
+
stopy: void 0,
|
| 1349 |
+
widthLimit: void 0
|
| 1350 |
+
}, this.nextData = {
|
| 1351 |
+
startx: void 0,
|
| 1352 |
+
stopx: void 0,
|
| 1353 |
+
starty: void 0,
|
| 1354 |
+
stopy: void 0,
|
| 1355 |
+
cnt: 0
|
| 1356 |
+
}, ae(t.db.getConfig());
|
| 1357 |
+
}
|
| 1358 |
+
bumpLastMargin(t) {
|
| 1359 |
+
this.data.stopx += t, this.data.stopy += t;
|
| 1360 |
+
}
|
| 1361 |
+
}, g(Ot, "Bounds"), Ot), ae = /* @__PURE__ */ g(function(e) {
|
| 1362 |
+
Ne(_, e), e.fontFamily && (_.personFontFamily = _.systemFontFamily = _.messageFontFamily = e.fontFamily), e.fontSize && (_.personFontSize = _.systemFontSize = _.messageFontSize = e.fontSize), e.fontWeight && (_.personFontWeight = _.systemFontWeight = _.messageFontWeight = e.fontWeight);
|
| 1363 |
+
}, "setConf"), Pt = /* @__PURE__ */ g((e, t) => ({
|
| 1364 |
+
fontFamily: e[t + "FontFamily"],
|
| 1365 |
+
fontSize: e[t + "FontSize"],
|
| 1366 |
+
fontWeight: e[t + "FontWeight"]
|
| 1367 |
+
}), "c4ShapeFont"), Ut = /* @__PURE__ */ g((e) => ({
|
| 1368 |
+
fontFamily: e.boundaryFontFamily,
|
| 1369 |
+
fontSize: e.boundaryFontSize,
|
| 1370 |
+
fontWeight: e.boundaryFontWeight
|
| 1371 |
+
}), "boundaryFont"), T0 = /* @__PURE__ */ g((e) => ({
|
| 1372 |
+
fontFamily: e.messageFontFamily,
|
| 1373 |
+
fontSize: e.messageFontSize,
|
| 1374 |
+
fontWeight: e.messageFontWeight
|
| 1375 |
+
}), "messageFont");
|
| 1376 |
+
function j(e, t, s, o, l) {
|
| 1377 |
+
if (!t[e].width)
|
| 1378 |
+
if (s)
|
| 1379 |
+
t[e].text = je(t[e].text, l, o), t[e].textLines = t[e].text.split($t.lineBreakRegex).length, t[e].width = l, t[e].height = fe(t[e].text, o);
|
| 1380 |
+
else {
|
| 1381 |
+
let a = t[e].text.split($t.lineBreakRegex);
|
| 1382 |
+
t[e].textLines = a.length;
|
| 1383 |
+
let r = 0;
|
| 1384 |
+
t[e].height = 0, t[e].width = 0;
|
| 1385 |
+
for (const n of a)
|
| 1386 |
+
t[e].width = Math.max(
|
| 1387 |
+
Tt(n, o),
|
| 1388 |
+
t[e].width
|
| 1389 |
+
), r = fe(n, o), t[e].height = t[e].height + r;
|
| 1390 |
+
}
|
| 1391 |
+
}
|
| 1392 |
+
g(j, "calcC4ShapeTextWH");
|
| 1393 |
+
var ke = /* @__PURE__ */ g(function(e, t, s) {
|
| 1394 |
+
t.x = s.data.startx, t.y = s.data.starty, t.width = s.data.stopx - s.data.startx, t.height = s.data.stopy - s.data.starty, t.label.y = _.c4ShapeMargin - 35;
|
| 1395 |
+
let o = t.wrap && _.wrap, l = Ut(_);
|
| 1396 |
+
l.fontSize = l.fontSize + 2, l.fontWeight = "bold";
|
| 1397 |
+
let a = Tt(t.label.text, l);
|
| 1398 |
+
j("label", t, o, l, a), z.drawBoundary(e, t, _);
|
| 1399 |
+
}, "drawBoundary"), Ae = /* @__PURE__ */ g(function(e, t, s, o) {
|
| 1400 |
+
let l = 0;
|
| 1401 |
+
for (const a of o) {
|
| 1402 |
+
l = 0;
|
| 1403 |
+
const r = s[a];
|
| 1404 |
+
let n = Pt(_, r.typeC4Shape.text);
|
| 1405 |
+
switch (n.fontSize = n.fontSize - 2, r.typeC4Shape.width = Tt(
|
| 1406 |
+
"«" + r.typeC4Shape.text + "»",
|
| 1407 |
+
n
|
| 1408 |
+
), r.typeC4Shape.height = n.fontSize + 2, r.typeC4Shape.Y = _.c4ShapePadding, l = r.typeC4Shape.Y + r.typeC4Shape.height - 4, r.image = { width: 0, height: 0, Y: 0 }, r.typeC4Shape.text) {
|
| 1409 |
+
case "person":
|
| 1410 |
+
case "external_person":
|
| 1411 |
+
r.image.width = 48, r.image.height = 48, r.image.Y = l, l = r.image.Y + r.image.height;
|
| 1412 |
+
break;
|
| 1413 |
+
}
|
| 1414 |
+
r.sprite && (r.image.width = 48, r.image.height = 48, r.image.Y = l, l = r.image.Y + r.image.height);
|
| 1415 |
+
let i = r.wrap && _.wrap, u = _.width - _.c4ShapePadding * 2, d = Pt(_, r.typeC4Shape.text);
|
| 1416 |
+
if (d.fontSize = d.fontSize + 2, d.fontWeight = "bold", j("label", r, i, d, u), r.label.Y = l + 8, l = r.label.Y + r.label.height, r.type && r.type.text !== "") {
|
| 1417 |
+
r.type.text = "[" + r.type.text + "]";
|
| 1418 |
+
let E = Pt(_, r.typeC4Shape.text);
|
| 1419 |
+
j("type", r, i, E, u), r.type.Y = l + 5, l = r.type.Y + r.type.height;
|
| 1420 |
+
} else if (r.techn && r.techn.text !== "") {
|
| 1421 |
+
r.techn.text = "[" + r.techn.text + "]";
|
| 1422 |
+
let E = Pt(_, r.techn.text);
|
| 1423 |
+
j("techn", r, i, E, u), r.techn.Y = l + 5, l = r.techn.Y + r.techn.height;
|
| 1424 |
+
}
|
| 1425 |
+
let f = l, y = r.label.width;
|
| 1426 |
+
if (r.descr && r.descr.text !== "") {
|
| 1427 |
+
let E = Pt(_, r.typeC4Shape.text);
|
| 1428 |
+
j("descr", r, i, E, u), r.descr.Y = l + 20, l = r.descr.Y + r.descr.height, y = Math.max(r.label.width, r.descr.width), f = l - r.descr.textLines * 5;
|
| 1429 |
+
}
|
| 1430 |
+
y = y + _.c4ShapePadding, r.width = Math.max(r.width || _.width, y, _.width), r.height = Math.max(r.height || _.height, f, _.height), r.margin = r.margin || _.c4ShapeMargin, e.insert(r), z.drawC4Shape(t, r, _);
|
| 1431 |
+
}
|
| 1432 |
+
e.bumpLastMargin(_.c4ShapeMargin);
|
| 1433 |
+
}, "drawC4ShapeArray"), Rt, Y = (Rt = class {
|
| 1434 |
+
constructor(t, s) {
|
| 1435 |
+
this.x = t, this.y = s;
|
| 1436 |
+
}
|
| 1437 |
+
}, g(Rt, "Point"), Rt), pe = /* @__PURE__ */ g(function(e, t) {
|
| 1438 |
+
let s = e.x, o = e.y, l = t.x, a = t.y, r = s + e.width / 2, n = o + e.height / 2, i = Math.abs(s - l), u = Math.abs(o - a), d = u / i, f = e.height / e.width, y = null;
|
| 1439 |
+
return o == a && s < l ? y = new Y(s + e.width, n) : o == a && s > l ? y = new Y(s, n) : s == l && o < a ? y = new Y(r, o + e.height) : s == l && o > a && (y = new Y(r, o)), s > l && o < a ? f >= d ? y = new Y(s, n + d * e.width / 2) : y = new Y(
|
| 1440 |
+
r - i / u * e.height / 2,
|
| 1441 |
+
o + e.height
|
| 1442 |
+
) : s < l && o < a ? f >= d ? y = new Y(s + e.width, n + d * e.width / 2) : y = new Y(
|
| 1443 |
+
r + i / u * e.height / 2,
|
| 1444 |
+
o + e.height
|
| 1445 |
+
) : s < l && o > a ? f >= d ? y = new Y(s + e.width, n - d * e.width / 2) : y = new Y(r + e.height / 2 * i / u, o) : s > l && o > a && (f >= d ? y = new Y(s, n - e.width / 2 * d) : y = new Y(r - e.height / 2 * i / u, o)), y;
|
| 1446 |
+
}, "getIntersectPoint"), O0 = /* @__PURE__ */ g(function(e, t) {
|
| 1447 |
+
let s = { x: 0, y: 0 };
|
| 1448 |
+
s.x = t.x + t.width / 2, s.y = t.y + t.height / 2;
|
| 1449 |
+
let o = pe(e, s);
|
| 1450 |
+
s.x = e.x + e.width / 2, s.y = e.y + e.height / 2;
|
| 1451 |
+
let l = pe(t, s);
|
| 1452 |
+
return { startPoint: o, endPoint: l };
|
| 1453 |
+
}, "getIntersectPoints"), R0 = /* @__PURE__ */ g(function(e, t, s, o) {
|
| 1454 |
+
let l = 0;
|
| 1455 |
+
for (let a of t) {
|
| 1456 |
+
l = l + 1;
|
| 1457 |
+
let r = a.wrap && _.wrap, n = T0(_);
|
| 1458 |
+
o.db.getC4Type() === "C4Dynamic" && (a.label.text = l + ": " + a.label.text);
|
| 1459 |
+
let u = Tt(a.label.text, n);
|
| 1460 |
+
j("label", a, r, n, u), a.techn && a.techn.text !== "" && (u = Tt(a.techn.text, n), j("techn", a, r, n, u)), a.descr && a.descr.text !== "" && (u = Tt(a.descr.text, n), j("descr", a, r, n, u));
|
| 1461 |
+
let d = s(a.from), f = s(a.to), y = O0(d, f);
|
| 1462 |
+
a.startPoint = y.startPoint, a.endPoint = y.endPoint;
|
| 1463 |
+
}
|
| 1464 |
+
z.drawRels(e, t, _);
|
| 1465 |
+
}, "drawRels");
|
| 1466 |
+
function se(e, t, s, o, l) {
|
| 1467 |
+
let a = new Ee(l);
|
| 1468 |
+
a.data.widthLimit = s.data.widthLimit / Math.min(ee, o.length);
|
| 1469 |
+
for (let [r, n] of o.entries()) {
|
| 1470 |
+
let i = 0;
|
| 1471 |
+
n.image = { width: 0, height: 0, Y: 0 }, n.sprite && (n.image.width = 48, n.image.height = 48, n.image.Y = i, i = n.image.Y + n.image.height);
|
| 1472 |
+
let u = n.wrap && _.wrap, d = Ut(_);
|
| 1473 |
+
if (d.fontSize = d.fontSize + 2, d.fontWeight = "bold", j(
|
| 1474 |
+
"label",
|
| 1475 |
+
n,
|
| 1476 |
+
u,
|
| 1477 |
+
d,
|
| 1478 |
+
a.data.widthLimit
|
| 1479 |
+
), n.label.Y = i + 8, i = n.label.Y + n.label.height, n.type && n.type.text !== "") {
|
| 1480 |
+
n.type.text = "[" + n.type.text + "]";
|
| 1481 |
+
let O = Ut(_);
|
| 1482 |
+
j(
|
| 1483 |
+
"type",
|
| 1484 |
+
n,
|
| 1485 |
+
u,
|
| 1486 |
+
O,
|
| 1487 |
+
a.data.widthLimit
|
| 1488 |
+
), n.type.Y = i + 5, i = n.type.Y + n.type.height;
|
| 1489 |
+
}
|
| 1490 |
+
if (n.descr && n.descr.text !== "") {
|
| 1491 |
+
let O = Ut(_);
|
| 1492 |
+
O.fontSize = O.fontSize - 2, j(
|
| 1493 |
+
"descr",
|
| 1494 |
+
n,
|
| 1495 |
+
u,
|
| 1496 |
+
O,
|
| 1497 |
+
a.data.widthLimit
|
| 1498 |
+
), n.descr.Y = i + 20, i = n.descr.Y + n.descr.height;
|
| 1499 |
+
}
|
| 1500 |
+
if (r == 0 || r % ee === 0) {
|
| 1501 |
+
let O = s.data.startx + _.diagramMarginX, S = s.data.stopy + _.diagramMarginY + i;
|
| 1502 |
+
a.setData(O, O, S, S);
|
| 1503 |
+
} else {
|
| 1504 |
+
let O = a.data.stopx !== a.data.startx ? a.data.stopx + _.diagramMarginX : a.data.startx, S = a.data.starty;
|
| 1505 |
+
a.setData(O, O, S, S);
|
| 1506 |
+
}
|
| 1507 |
+
a.name = n.alias;
|
| 1508 |
+
let f = l.db.getC4ShapeArray(n.alias), y = l.db.getC4ShapeKeys(n.alias);
|
| 1509 |
+
y.length > 0 && Ae(
|
| 1510 |
+
a,
|
| 1511 |
+
e,
|
| 1512 |
+
f,
|
| 1513 |
+
y
|
| 1514 |
+
), t = n.alias;
|
| 1515 |
+
let E = l.db.getBoundaries(t);
|
| 1516 |
+
E.length > 0 && se(
|
| 1517 |
+
e,
|
| 1518 |
+
t,
|
| 1519 |
+
a,
|
| 1520 |
+
E,
|
| 1521 |
+
l
|
| 1522 |
+
), n.alias !== "global" && ke(e, n, a), s.data.stopy = Math.max(
|
| 1523 |
+
a.data.stopy + _.c4ShapeMargin,
|
| 1524 |
+
s.data.stopy
|
| 1525 |
+
), s.data.stopx = Math.max(
|
| 1526 |
+
a.data.stopx + _.c4ShapeMargin,
|
| 1527 |
+
s.data.stopx
|
| 1528 |
+
), Xt = Math.max(Xt, s.data.stopx), Wt = Math.max(Wt, s.data.stopy);
|
| 1529 |
+
}
|
| 1530 |
+
}
|
| 1531 |
+
g(se, "drawInsideBoundary");
|
| 1532 |
+
var S0 = /* @__PURE__ */ g(function(e, t, s, o) {
|
| 1533 |
+
_ = Bt().c4;
|
| 1534 |
+
const l = Bt().securityLevel;
|
| 1535 |
+
let a;
|
| 1536 |
+
l === "sandbox" && (a = jt("#i" + t));
|
| 1537 |
+
const r = l === "sandbox" ? jt(a.nodes()[0].contentDocument.body) : jt("body");
|
| 1538 |
+
let n = o.db;
|
| 1539 |
+
o.db.setWrap(_.wrap), ve = n.getC4ShapeInRow(), ee = n.getC4BoundaryInRow(), de.debug(`C:${JSON.stringify(_, null, 2)}`);
|
| 1540 |
+
const i = l === "sandbox" ? r.select(`[id="${t}"]`) : jt(`[id="${t}"]`);
|
| 1541 |
+
z.insertComputerIcon(i), z.insertDatabaseIcon(i), z.insertClockIcon(i);
|
| 1542 |
+
let u = new Ee(o);
|
| 1543 |
+
u.setData(
|
| 1544 |
+
_.diagramMarginX,
|
| 1545 |
+
_.diagramMarginX,
|
| 1546 |
+
_.diagramMarginY,
|
| 1547 |
+
_.diagramMarginY
|
| 1548 |
+
), u.data.widthLimit = screen.availWidth, Xt = _.diagramMarginX, Wt = _.diagramMarginY;
|
| 1549 |
+
const d = o.db.getTitle();
|
| 1550 |
+
let f = o.db.getBoundaries("");
|
| 1551 |
+
se(i, "", u, f, o), z.insertArrowHead(i), z.insertArrowEnd(i), z.insertArrowCrossHead(i), z.insertArrowFilledHead(i), R0(i, o.db.getRels(), o.db.getC4Shape, o), u.data.stopx = Xt, u.data.stopy = Wt;
|
| 1552 |
+
const y = u.data;
|
| 1553 |
+
let O = y.stopy - y.starty + 2 * _.diagramMarginY;
|
| 1554 |
+
const P = y.stopx - y.startx + 2 * _.diagramMarginX;
|
| 1555 |
+
d && i.append("text").text(d).attr("x", (y.stopx - y.startx) / 2 - 4 * _.diagramMarginX).attr("y", y.starty + _.diagramMarginY), Le(i, O, P, _.useMaxWidth);
|
| 1556 |
+
const M = d ? 60 : 0;
|
| 1557 |
+
i.attr(
|
| 1558 |
+
"viewBox",
|
| 1559 |
+
y.startx - _.diagramMarginX + " -" + (_.diagramMarginY + M) + " " + P + " " + (O + M)
|
| 1560 |
+
), de.debug("models:", y);
|
| 1561 |
+
}, "draw"), ye = {
|
| 1562 |
+
drawPersonOrSystemArray: Ae,
|
| 1563 |
+
drawBoundary: ke,
|
| 1564 |
+
setConf: ae,
|
| 1565 |
+
draw: S0
|
| 1566 |
+
}, D0 = /* @__PURE__ */ g((e) => `.person {
|
| 1567 |
+
stroke: ${e.personBorder};
|
| 1568 |
+
fill: ${e.personBkg};
|
| 1569 |
+
}
|
| 1570 |
+
`, "getStyles"), P0 = D0, M0 = {
|
| 1571 |
+
parser: Ue,
|
| 1572 |
+
db: te,
|
| 1573 |
+
renderer: ye,
|
| 1574 |
+
styles: P0,
|
| 1575 |
+
init: /* @__PURE__ */ g(({ c4: e, wrap: t }) => {
|
| 1576 |
+
ye.setConf(e), te.setWrap(t);
|
| 1577 |
+
}, "init")
|
| 1578 |
+
};
|
| 1579 |
+
export {
|
| 1580 |
+
M0 as diagram
|
| 1581 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/channel-DO4s0fWC.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { ap as o, aq as n } from "./mermaid.core-CfPtPiLZ.js";
|
| 2 |
+
const t = (a, r) => o.lang.round(n.parse(a)[r]);
|
| 3 |
+
export {
|
| 4 |
+
t as c
|
| 5 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/chunk-44GW5IO5-I0mkHKCJ.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { _ as l } from "./mermaid.core-CfPtPiLZ.js";
|
| 2 |
+
function m(e, c) {
|
| 3 |
+
var i, t, o;
|
| 4 |
+
e.accDescr && ((i = c.setAccDescription) == null || i.call(c, e.accDescr)), e.accTitle && ((t = c.setAccTitle) == null || t.call(c, e.accTitle)), e.title && ((o = c.setDiagramTitle) == null || o.call(c, e.title));
|
| 5 |
+
}
|
| 6 |
+
l(m, "populateCommonDb");
|
| 7 |
+
export {
|
| 8 |
+
m as p
|
| 9 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/chunk-BQPDZTM5-BDSGaJp-.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { _ as s } from "./mermaid.core-CfPtPiLZ.js";
|
| 2 |
+
var t, e = (t = class {
|
| 3 |
+
/**
|
| 4 |
+
* @param init - Function that creates the default state.
|
| 5 |
+
*/
|
| 6 |
+
constructor(i) {
|
| 7 |
+
this.init = i, this.records = this.init();
|
| 8 |
+
}
|
| 9 |
+
reset() {
|
| 10 |
+
this.records = this.init();
|
| 11 |
+
}
|
| 12 |
+
}, s(t, "ImperativeState"), t);
|
| 13 |
+
export {
|
| 14 |
+
e as I
|
| 15 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/chunk-GOYUR5SG-5KV7imez.js
ADDED
|
@@ -0,0 +1,1381 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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-HPOVUXKZ-Dn5Xnpaz.js";
|
| 2 |
+
import { _ as f, l as D, c as F, r as se, u as ie, a as re, b as ae, g as ne, s as oe, p as le, q as ce, T as he, k as W, y as ue } from "./mermaid.core-CfPtPiLZ.js";
|
| 3 |
+
var vt = function() {
|
| 4 |
+
var e = /* @__PURE__ */ f(function(V, o, h, n) {
|
| 5 |
+
for (h = h || {}, n = V.length; n--; h[V[n]] = o) ;
|
| 6 |
+
return h;
|
| 7 |
+
}, "o"), t = [1, 2], s = [1, 3], a = [1, 4], i = [2, 4], l = [1, 9], d = [1, 11], S = [1, 16], p = [1, 17], T = [1, 18], _ = [1, 19], m = [1, 33], k = [1, 20], A = [1, 21], $ = [1, 22], x = [1, 23], R = [1, 24], u = [1, 26], L = [1, 27], I = [1, 28], N = [1, 29], G = [1, 30], P = [1, 31], B = [1, 32], at = [1, 35], nt = [1, 36], ot = [1, 37], lt = [1, 38], K = [1, 34], y = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], ct = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 39, 40, 41, 45, 48, 51, 52, 53, 54, 57], xt = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], gt = {
|
| 8 |
+
trace: /* @__PURE__ */ f(function() {
|
| 9 |
+
}, "trace"),
|
| 10 |
+
yy: {},
|
| 11 |
+
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, "-->": 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, CLICK: 38, STRING: 39, HREF: 40, classDef: 41, CLASSDEF_ID: 42, CLASSDEF_STYLEOPTS: 43, DEFAULT: 44, style: 45, STYLE_IDS: 46, STYLEDEF_STYLEOPTS: 47, class: 48, CLASSENTITY_IDS: 49, STYLECLASS: 50, direction_tb: 51, direction_bt: 52, direction_rl: 53, direction_lr: 54, eol: 55, ";": 56, EDGE_STATE: 57, STYLE_SEPARATOR: 58, left_of: 59, right_of: 60, $accept: 0, $end: 1 },
|
| 12 |
+
terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 14: "DESCR", 15: "-->", 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: "CLICK", 39: "STRING", 40: "HREF", 41: "classDef", 42: "CLASSDEF_ID", 43: "CLASSDEF_STYLEOPTS", 44: "DEFAULT", 45: "style", 46: "STYLE_IDS", 47: "STYLEDEF_STYLEOPTS", 48: "class", 49: "CLASSENTITY_IDS", 50: "STYLECLASS", 51: "direction_tb", 52: "direction_bt", 53: "direction_rl", 54: "direction_lr", 56: ";", 57: "EDGE_STATE", 58: "STYLE_SEPARATOR", 59: "left_of", 60: "right_of" },
|
| 13 |
+
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], [9, 5], [9, 5], [10, 3], [10, 3], [11, 3], [12, 3], [32, 1], [32, 1], [32, 1], [32, 1], [55, 1], [55, 1], [13, 1], [13, 1], [13, 3], [13, 3], [30, 1], [30, 1]],
|
| 14 |
+
performAction: /* @__PURE__ */ f(function(o, h, n, g, E, r, Z) {
|
| 15 |
+
var c = r.length - 1;
|
| 16 |
+
switch (E) {
|
| 17 |
+
case 3:
|
| 18 |
+
return g.setRootDoc(r[c]), r[c];
|
| 19 |
+
case 4:
|
| 20 |
+
this.$ = [];
|
| 21 |
+
break;
|
| 22 |
+
case 5:
|
| 23 |
+
r[c] != "nl" && (r[c - 1].push(r[c]), this.$ = r[c - 1]);
|
| 24 |
+
break;
|
| 25 |
+
case 6:
|
| 26 |
+
case 7:
|
| 27 |
+
this.$ = r[c];
|
| 28 |
+
break;
|
| 29 |
+
case 8:
|
| 30 |
+
this.$ = "nl";
|
| 31 |
+
break;
|
| 32 |
+
case 12:
|
| 33 |
+
this.$ = r[c];
|
| 34 |
+
break;
|
| 35 |
+
case 13:
|
| 36 |
+
const tt = r[c - 1];
|
| 37 |
+
tt.description = g.trimColon(r[c]), this.$ = tt;
|
| 38 |
+
break;
|
| 39 |
+
case 14:
|
| 40 |
+
this.$ = { stmt: "relation", state1: r[c - 2], state2: r[c] };
|
| 41 |
+
break;
|
| 42 |
+
case 15:
|
| 43 |
+
const Tt = g.trimColon(r[c]);
|
| 44 |
+
this.$ = { stmt: "relation", state1: r[c - 3], state2: r[c - 1], description: Tt };
|
| 45 |
+
break;
|
| 46 |
+
case 19:
|
| 47 |
+
this.$ = { stmt: "state", id: r[c - 3], type: "default", description: "", doc: r[c - 1] };
|
| 48 |
+
break;
|
| 49 |
+
case 20:
|
| 50 |
+
var U = r[c], X = r[c - 2].trim();
|
| 51 |
+
if (r[c].match(":")) {
|
| 52 |
+
var ut = r[c].split(":");
|
| 53 |
+
U = ut[0], X = [X, ut[1]];
|
| 54 |
+
}
|
| 55 |
+
this.$ = { stmt: "state", id: U, type: "default", description: X };
|
| 56 |
+
break;
|
| 57 |
+
case 21:
|
| 58 |
+
this.$ = { stmt: "state", id: r[c - 3], type: "default", description: r[c - 5], doc: r[c - 1] };
|
| 59 |
+
break;
|
| 60 |
+
case 22:
|
| 61 |
+
this.$ = { stmt: "state", id: r[c], type: "fork" };
|
| 62 |
+
break;
|
| 63 |
+
case 23:
|
| 64 |
+
this.$ = { stmt: "state", id: r[c], type: "join" };
|
| 65 |
+
break;
|
| 66 |
+
case 24:
|
| 67 |
+
this.$ = { stmt: "state", id: r[c], type: "choice" };
|
| 68 |
+
break;
|
| 69 |
+
case 25:
|
| 70 |
+
this.$ = { stmt: "state", id: g.getDividerId(), type: "divider" };
|
| 71 |
+
break;
|
| 72 |
+
case 26:
|
| 73 |
+
this.$ = { stmt: "state", id: r[c - 1].trim(), note: { position: r[c - 2].trim(), text: r[c].trim() } };
|
| 74 |
+
break;
|
| 75 |
+
case 29:
|
| 76 |
+
this.$ = r[c].trim(), g.setAccTitle(this.$);
|
| 77 |
+
break;
|
| 78 |
+
case 30:
|
| 79 |
+
case 31:
|
| 80 |
+
this.$ = r[c].trim(), g.setAccDescription(this.$);
|
| 81 |
+
break;
|
| 82 |
+
case 32:
|
| 83 |
+
this.$ = {
|
| 84 |
+
stmt: "click",
|
| 85 |
+
id: r[c - 3],
|
| 86 |
+
url: r[c - 2],
|
| 87 |
+
tooltip: r[c - 1]
|
| 88 |
+
};
|
| 89 |
+
break;
|
| 90 |
+
case 33:
|
| 91 |
+
this.$ = {
|
| 92 |
+
stmt: "click",
|
| 93 |
+
id: r[c - 3],
|
| 94 |
+
url: r[c - 1],
|
| 95 |
+
tooltip: ""
|
| 96 |
+
};
|
| 97 |
+
break;
|
| 98 |
+
case 34:
|
| 99 |
+
case 35:
|
| 100 |
+
this.$ = { stmt: "classDef", id: r[c - 1].trim(), classes: r[c].trim() };
|
| 101 |
+
break;
|
| 102 |
+
case 36:
|
| 103 |
+
this.$ = { stmt: "style", id: r[c - 1].trim(), styleClass: r[c].trim() };
|
| 104 |
+
break;
|
| 105 |
+
case 37:
|
| 106 |
+
this.$ = { stmt: "applyClass", id: r[c - 1].trim(), styleClass: r[c].trim() };
|
| 107 |
+
break;
|
| 108 |
+
case 38:
|
| 109 |
+
g.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
|
| 110 |
+
break;
|
| 111 |
+
case 39:
|
| 112 |
+
g.setDirection("BT"), this.$ = { stmt: "dir", value: "BT" };
|
| 113 |
+
break;
|
| 114 |
+
case 40:
|
| 115 |
+
g.setDirection("RL"), this.$ = { stmt: "dir", value: "RL" };
|
| 116 |
+
break;
|
| 117 |
+
case 41:
|
| 118 |
+
g.setDirection("LR"), this.$ = { stmt: "dir", value: "LR" };
|
| 119 |
+
break;
|
| 120 |
+
case 44:
|
| 121 |
+
case 45:
|
| 122 |
+
this.$ = { stmt: "state", id: r[c].trim(), type: "default", description: "" };
|
| 123 |
+
break;
|
| 124 |
+
case 46:
|
| 125 |
+
this.$ = { stmt: "state", id: r[c - 2].trim(), classes: [r[c].trim()], type: "default", description: "" };
|
| 126 |
+
break;
|
| 127 |
+
case 47:
|
| 128 |
+
this.$ = { stmt: "state", id: r[c - 2].trim(), classes: [r[c].trim()], type: "default", description: "" };
|
| 129 |
+
break;
|
| 130 |
+
}
|
| 131 |
+
}, "anonymous"),
|
| 132 |
+
table: [{ 3: 1, 4: t, 5: s, 6: a }, { 1: [3] }, { 3: 5, 4: t, 5: s, 6: a }, { 3: 6, 4: t, 5: s, 6: a }, e([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], i, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: l, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57: K }, e(y, [2, 5]), { 9: 39, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57: K }, e(y, [2, 7]), e(y, [2, 8]), e(y, [2, 9]), e(y, [2, 10]), e(y, [2, 11]), e(y, [2, 12], { 14: [1, 40], 15: [1, 41] }), e(y, [2, 16]), { 18: [1, 42] }, e(y, [2, 18], { 20: [1, 43] }), { 23: [1, 44] }, e(y, [2, 22]), e(y, [2, 23]), e(y, [2, 24]), e(y, [2, 25]), { 30: 45, 31: [1, 46], 59: [1, 47], 60: [1, 48] }, e(y, [2, 28]), { 34: [1, 49] }, { 36: [1, 50] }, e(y, [2, 31]), { 13: 51, 24: m, 57: K }, { 42: [1, 52], 44: [1, 53] }, { 46: [1, 54] }, { 49: [1, 55] }, e(ct, [2, 44], { 58: [1, 56] }), e(ct, [2, 45], { 58: [1, 57] }), e(y, [2, 38]), e(y, [2, 39]), e(y, [2, 40]), e(y, [2, 41]), e(y, [2, 6]), e(y, [2, 13]), { 13: 58, 24: m, 57: K }, e(y, [2, 17]), e(xt, i, { 7: 59 }), { 24: [1, 60] }, { 24: [1, 61] }, { 23: [1, 62] }, { 24: [2, 48] }, { 24: [2, 49] }, e(y, [2, 29]), e(y, [2, 30]), { 39: [1, 63], 40: [1, 64] }, { 43: [1, 65] }, { 43: [1, 66] }, { 47: [1, 67] }, { 50: [1, 68] }, { 24: [1, 69] }, { 24: [1, 70] }, e(y, [2, 14], { 14: [1, 71] }), { 4: l, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 21: [1, 72], 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57: K }, e(y, [2, 20], { 20: [1, 73] }), { 31: [1, 74] }, { 24: [1, 75] }, { 39: [1, 76] }, { 39: [1, 77] }, e(y, [2, 34]), e(y, [2, 35]), e(y, [2, 36]), e(y, [2, 37]), e(ct, [2, 46]), e(ct, [2, 47]), e(y, [2, 15]), e(y, [2, 19]), e(xt, i, { 7: 78 }), e(y, [2, 26]), e(y, [2, 27]), { 5: [1, 79] }, { 5: [1, 80] }, { 4: l, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: p, 19: T, 21: [1, 81], 22: _, 24: m, 25: k, 26: A, 27: $, 28: x, 29: R, 32: 25, 33: u, 35: L, 37: I, 38: N, 41: G, 45: P, 48: B, 51: at, 52: nt, 53: ot, 54: lt, 57: K }, e(y, [2, 32]), e(y, [2, 33]), e(y, [2, 21])],
|
| 133 |
+
defaultActions: { 5: [2, 1], 6: [2, 2], 47: [2, 48], 48: [2, 49] },
|
| 134 |
+
parseError: /* @__PURE__ */ f(function(o, h) {
|
| 135 |
+
if (h.recoverable)
|
| 136 |
+
this.trace(o);
|
| 137 |
+
else {
|
| 138 |
+
var n = new Error(o);
|
| 139 |
+
throw n.hash = h, n;
|
| 140 |
+
}
|
| 141 |
+
}, "parseError"),
|
| 142 |
+
parse: /* @__PURE__ */ f(function(o) {
|
| 143 |
+
var h = this, n = [0], g = [], E = [null], r = [], Z = this.table, c = "", U = 0, X = 0, ut = 2, tt = 1, Tt = r.slice.call(arguments, 1), b = Object.create(this.lexer), j = { yy: {} };
|
| 144 |
+
for (var Et in this.yy)
|
| 145 |
+
Object.prototype.hasOwnProperty.call(this.yy, Et) && (j.yy[Et] = this.yy[Et]);
|
| 146 |
+
b.setInput(o, j.yy), j.yy.lexer = b, j.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
|
| 147 |
+
var _t = b.yylloc;
|
| 148 |
+
r.push(_t);
|
| 149 |
+
var Qt = b.options && b.options.ranges;
|
| 150 |
+
typeof j.yy.parseError == "function" ? this.parseError = j.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
| 151 |
+
function Zt(O) {
|
| 152 |
+
n.length = n.length - 2 * O, E.length = E.length - O, r.length = r.length - O;
|
| 153 |
+
}
|
| 154 |
+
f(Zt, "popStack");
|
| 155 |
+
function Lt() {
|
| 156 |
+
var O;
|
| 157 |
+
return O = g.pop() || b.lex() || tt, typeof O != "number" && (O instanceof Array && (g = O, O = g.pop()), O = h.symbols_[O] || O), O;
|
| 158 |
+
}
|
| 159 |
+
f(Lt, "lex");
|
| 160 |
+
for (var C, H, w, mt, J = {}, dt, Y, Ot, ft; ; ) {
|
| 161 |
+
if (H = n[n.length - 1], this.defaultActions[H] ? w = this.defaultActions[H] : ((C === null || typeof C > "u") && (C = Lt()), w = Z[H] && Z[H][C]), typeof w > "u" || !w.length || !w[0]) {
|
| 162 |
+
var Dt = "";
|
| 163 |
+
ft = [];
|
| 164 |
+
for (dt in Z[H])
|
| 165 |
+
this.terminals_[dt] && dt > ut && ft.push("'" + this.terminals_[dt] + "'");
|
| 166 |
+
b.showPosition ? Dt = "Parse error on line " + (U + 1) + `:
|
| 167 |
+
` + b.showPosition() + `
|
| 168 |
+
Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[C] || C) + "'" : Dt = "Parse error on line " + (U + 1) + ": Unexpected " + (C == tt ? "end of input" : "'" + (this.terminals_[C] || C) + "'"), this.parseError(Dt, {
|
| 169 |
+
text: b.match,
|
| 170 |
+
token: this.terminals_[C] || C,
|
| 171 |
+
line: b.yylineno,
|
| 172 |
+
loc: _t,
|
| 173 |
+
expected: ft
|
| 174 |
+
});
|
| 175 |
+
}
|
| 176 |
+
if (w[0] instanceof Array && w.length > 1)
|
| 177 |
+
throw new Error("Parse Error: multiple actions possible at state: " + H + ", token: " + C);
|
| 178 |
+
switch (w[0]) {
|
| 179 |
+
case 1:
|
| 180 |
+
n.push(C), E.push(b.yytext), r.push(b.yylloc), n.push(w[1]), C = null, X = b.yyleng, c = b.yytext, U = b.yylineno, _t = b.yylloc;
|
| 181 |
+
break;
|
| 182 |
+
case 2:
|
| 183 |
+
if (Y = this.productions_[w[1]][1], J.$ = E[E.length - Y], J._$ = {
|
| 184 |
+
first_line: r[r.length - (Y || 1)].first_line,
|
| 185 |
+
last_line: r[r.length - 1].last_line,
|
| 186 |
+
first_column: r[r.length - (Y || 1)].first_column,
|
| 187 |
+
last_column: r[r.length - 1].last_column
|
| 188 |
+
}, Qt && (J._$.range = [
|
| 189 |
+
r[r.length - (Y || 1)].range[0],
|
| 190 |
+
r[r.length - 1].range[1]
|
| 191 |
+
]), mt = this.performAction.apply(J, [
|
| 192 |
+
c,
|
| 193 |
+
X,
|
| 194 |
+
U,
|
| 195 |
+
j.yy,
|
| 196 |
+
w[1],
|
| 197 |
+
E,
|
| 198 |
+
r
|
| 199 |
+
].concat(Tt)), typeof mt < "u")
|
| 200 |
+
return mt;
|
| 201 |
+
Y && (n = n.slice(0, -1 * Y * 2), E = E.slice(0, -1 * Y), r = r.slice(0, -1 * Y)), n.push(this.productions_[w[1]][0]), E.push(J.$), r.push(J._$), Ot = Z[n[n.length - 2]][n[n.length - 1]], n.push(Ot);
|
| 202 |
+
break;
|
| 203 |
+
case 3:
|
| 204 |
+
return !0;
|
| 205 |
+
}
|
| 206 |
+
}
|
| 207 |
+
return !0;
|
| 208 |
+
}, "parse")
|
| 209 |
+
}, qt = /* @__PURE__ */ function() {
|
| 210 |
+
var V = {
|
| 211 |
+
EOF: 1,
|
| 212 |
+
parseError: /* @__PURE__ */ f(function(h, n) {
|
| 213 |
+
if (this.yy.parser)
|
| 214 |
+
this.yy.parser.parseError(h, n);
|
| 215 |
+
else
|
| 216 |
+
throw new Error(h);
|
| 217 |
+
}, "parseError"),
|
| 218 |
+
// resets the lexer, sets new input
|
| 219 |
+
setInput: /* @__PURE__ */ f(function(o, h) {
|
| 220 |
+
return this.yy = h || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
| 221 |
+
first_line: 1,
|
| 222 |
+
first_column: 0,
|
| 223 |
+
last_line: 1,
|
| 224 |
+
last_column: 0
|
| 225 |
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
| 226 |
+
}, "setInput"),
|
| 227 |
+
// consumes and returns one char from the input
|
| 228 |
+
input: /* @__PURE__ */ f(function() {
|
| 229 |
+
var o = this._input[0];
|
| 230 |
+
this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
|
| 231 |
+
var h = o.match(/(?:\r\n?|\n).*/g);
|
| 232 |
+
return h ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
|
| 233 |
+
}, "input"),
|
| 234 |
+
// unshifts one char (or a string) into the input
|
| 235 |
+
unput: /* @__PURE__ */ f(function(o) {
|
| 236 |
+
var h = o.length, n = o.split(/(?:\r\n?|\n)/g);
|
| 237 |
+
this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - h), this.offset -= h;
|
| 238 |
+
var g = this.match.split(/(?:\r\n?|\n)/g);
|
| 239 |
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
|
| 240 |
+
var E = this.yylloc.range;
|
| 241 |
+
return this.yylloc = {
|
| 242 |
+
first_line: this.yylloc.first_line,
|
| 243 |
+
last_line: this.yylineno + 1,
|
| 244 |
+
first_column: this.yylloc.first_column,
|
| 245 |
+
last_column: n ? (n.length === g.length ? this.yylloc.first_column : 0) + g[g.length - n.length].length - n[0].length : this.yylloc.first_column - h
|
| 246 |
+
}, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - h]), this.yyleng = this.yytext.length, this;
|
| 247 |
+
}, "unput"),
|
| 248 |
+
// When called from action, caches matched text and appends it on next action
|
| 249 |
+
more: /* @__PURE__ */ f(function() {
|
| 250 |
+
return this._more = !0, this;
|
| 251 |
+
}, "more"),
|
| 252 |
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
| 253 |
+
reject: /* @__PURE__ */ f(function() {
|
| 254 |
+
if (this.options.backtrack_lexer)
|
| 255 |
+
this._backtrack = !0;
|
| 256 |
+
else
|
| 257 |
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
| 258 |
+
` + this.showPosition(), {
|
| 259 |
+
text: "",
|
| 260 |
+
token: null,
|
| 261 |
+
line: this.yylineno
|
| 262 |
+
});
|
| 263 |
+
return this;
|
| 264 |
+
}, "reject"),
|
| 265 |
+
// retain first n characters of the match
|
| 266 |
+
less: /* @__PURE__ */ f(function(o) {
|
| 267 |
+
this.unput(this.match.slice(o));
|
| 268 |
+
}, "less"),
|
| 269 |
+
// displays already matched input, i.e. for error messages
|
| 270 |
+
pastInput: /* @__PURE__ */ f(function() {
|
| 271 |
+
var o = this.matched.substr(0, this.matched.length - this.match.length);
|
| 272 |
+
return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
|
| 273 |
+
}, "pastInput"),
|
| 274 |
+
// displays upcoming input, i.e. for error messages
|
| 275 |
+
upcomingInput: /* @__PURE__ */ f(function() {
|
| 276 |
+
var o = this.match;
|
| 277 |
+
return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
|
| 278 |
+
}, "upcomingInput"),
|
| 279 |
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
| 280 |
+
showPosition: /* @__PURE__ */ f(function() {
|
| 281 |
+
var o = this.pastInput(), h = new Array(o.length + 1).join("-");
|
| 282 |
+
return o + this.upcomingInput() + `
|
| 283 |
+
` + h + "^";
|
| 284 |
+
}, "showPosition"),
|
| 285 |
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
| 286 |
+
test_match: /* @__PURE__ */ f(function(o, h) {
|
| 287 |
+
var n, g, E;
|
| 288 |
+
if (this.options.backtrack_lexer && (E = {
|
| 289 |
+
yylineno: this.yylineno,
|
| 290 |
+
yylloc: {
|
| 291 |
+
first_line: this.yylloc.first_line,
|
| 292 |
+
last_line: this.last_line,
|
| 293 |
+
first_column: this.yylloc.first_column,
|
| 294 |
+
last_column: this.yylloc.last_column
|
| 295 |
+
},
|
| 296 |
+
yytext: this.yytext,
|
| 297 |
+
match: this.match,
|
| 298 |
+
matches: this.matches,
|
| 299 |
+
matched: this.matched,
|
| 300 |
+
yyleng: this.yyleng,
|
| 301 |
+
offset: this.offset,
|
| 302 |
+
_more: this._more,
|
| 303 |
+
_input: this._input,
|
| 304 |
+
yy: this.yy,
|
| 305 |
+
conditionStack: this.conditionStack.slice(0),
|
| 306 |
+
done: this.done
|
| 307 |
+
}, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), g = o[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
|
| 308 |
+
first_line: this.yylloc.last_line,
|
| 309 |
+
last_line: this.yylineno + 1,
|
| 310 |
+
first_column: this.yylloc.last_column,
|
| 311 |
+
last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
|
| 312 |
+
}, this.yytext += o[0], this.match += o[0], this.matches = o, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(o[0].length), this.matched += o[0], n = this.performAction.call(this, this.yy, this, h, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
|
| 313 |
+
return n;
|
| 314 |
+
if (this._backtrack) {
|
| 315 |
+
for (var r in E)
|
| 316 |
+
this[r] = E[r];
|
| 317 |
+
return !1;
|
| 318 |
+
}
|
| 319 |
+
return !1;
|
| 320 |
+
}, "test_match"),
|
| 321 |
+
// return next match in input
|
| 322 |
+
next: /* @__PURE__ */ f(function() {
|
| 323 |
+
if (this.done)
|
| 324 |
+
return this.EOF;
|
| 325 |
+
this._input || (this.done = !0);
|
| 326 |
+
var o, h, n, g;
|
| 327 |
+
this._more || (this.yytext = "", this.match = "");
|
| 328 |
+
for (var E = this._currentRules(), r = 0; r < E.length; r++)
|
| 329 |
+
if (n = this._input.match(this.rules[E[r]]), n && (!h || n[0].length > h[0].length)) {
|
| 330 |
+
if (h = n, g = r, this.options.backtrack_lexer) {
|
| 331 |
+
if (o = this.test_match(n, E[r]), o !== !1)
|
| 332 |
+
return o;
|
| 333 |
+
if (this._backtrack) {
|
| 334 |
+
h = !1;
|
| 335 |
+
continue;
|
| 336 |
+
} else
|
| 337 |
+
return !1;
|
| 338 |
+
} else if (!this.options.flex)
|
| 339 |
+
break;
|
| 340 |
+
}
|
| 341 |
+
return h ? (o = this.test_match(h, E[g]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
| 342 |
+
` + this.showPosition(), {
|
| 343 |
+
text: "",
|
| 344 |
+
token: null,
|
| 345 |
+
line: this.yylineno
|
| 346 |
+
});
|
| 347 |
+
}, "next"),
|
| 348 |
+
// return next match that has a token
|
| 349 |
+
lex: /* @__PURE__ */ f(function() {
|
| 350 |
+
var h = this.next();
|
| 351 |
+
return h || this.lex();
|
| 352 |
+
}, "lex"),
|
| 353 |
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
| 354 |
+
begin: /* @__PURE__ */ f(function(h) {
|
| 355 |
+
this.conditionStack.push(h);
|
| 356 |
+
}, "begin"),
|
| 357 |
+
// pop the previously active lexer condition state off the condition stack
|
| 358 |
+
popState: /* @__PURE__ */ f(function() {
|
| 359 |
+
var h = this.conditionStack.length - 1;
|
| 360 |
+
return h > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
| 361 |
+
}, "popState"),
|
| 362 |
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
| 363 |
+
_currentRules: /* @__PURE__ */ f(function() {
|
| 364 |
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
| 365 |
+
}, "_currentRules"),
|
| 366 |
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
| 367 |
+
topState: /* @__PURE__ */ f(function(h) {
|
| 368 |
+
return h = this.conditionStack.length - 1 - Math.abs(h || 0), h >= 0 ? this.conditionStack[h] : "INITIAL";
|
| 369 |
+
}, "topState"),
|
| 370 |
+
// alias for begin(condition)
|
| 371 |
+
pushState: /* @__PURE__ */ f(function(h) {
|
| 372 |
+
this.begin(h);
|
| 373 |
+
}, "pushState"),
|
| 374 |
+
// return the number of states currently on the stack
|
| 375 |
+
stateStackSize: /* @__PURE__ */ f(function() {
|
| 376 |
+
return this.conditionStack.length;
|
| 377 |
+
}, "stateStackSize"),
|
| 378 |
+
options: { "case-insensitive": !0 },
|
| 379 |
+
performAction: /* @__PURE__ */ f(function(h, n, g, E) {
|
| 380 |
+
switch (g) {
|
| 381 |
+
case 0:
|
| 382 |
+
return 38;
|
| 383 |
+
case 1:
|
| 384 |
+
return 40;
|
| 385 |
+
case 2:
|
| 386 |
+
return 39;
|
| 387 |
+
case 3:
|
| 388 |
+
return 44;
|
| 389 |
+
case 4:
|
| 390 |
+
return 51;
|
| 391 |
+
case 5:
|
| 392 |
+
return 52;
|
| 393 |
+
case 6:
|
| 394 |
+
return 53;
|
| 395 |
+
case 7:
|
| 396 |
+
return 54;
|
| 397 |
+
case 8:
|
| 398 |
+
break;
|
| 399 |
+
case 9:
|
| 400 |
+
break;
|
| 401 |
+
case 10:
|
| 402 |
+
return 5;
|
| 403 |
+
case 11:
|
| 404 |
+
break;
|
| 405 |
+
case 12:
|
| 406 |
+
break;
|
| 407 |
+
case 13:
|
| 408 |
+
break;
|
| 409 |
+
case 14:
|
| 410 |
+
break;
|
| 411 |
+
case 15:
|
| 412 |
+
return this.pushState("SCALE"), 17;
|
| 413 |
+
case 16:
|
| 414 |
+
return 18;
|
| 415 |
+
case 17:
|
| 416 |
+
this.popState();
|
| 417 |
+
break;
|
| 418 |
+
case 18:
|
| 419 |
+
return this.begin("acc_title"), 33;
|
| 420 |
+
case 19:
|
| 421 |
+
return this.popState(), "acc_title_value";
|
| 422 |
+
case 20:
|
| 423 |
+
return this.begin("acc_descr"), 35;
|
| 424 |
+
case 21:
|
| 425 |
+
return this.popState(), "acc_descr_value";
|
| 426 |
+
case 22:
|
| 427 |
+
this.begin("acc_descr_multiline");
|
| 428 |
+
break;
|
| 429 |
+
case 23:
|
| 430 |
+
this.popState();
|
| 431 |
+
break;
|
| 432 |
+
case 24:
|
| 433 |
+
return "acc_descr_multiline_value";
|
| 434 |
+
case 25:
|
| 435 |
+
return this.pushState("CLASSDEF"), 41;
|
| 436 |
+
case 26:
|
| 437 |
+
return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
|
| 438 |
+
case 27:
|
| 439 |
+
return this.popState(), this.pushState("CLASSDEFID"), 42;
|
| 440 |
+
case 28:
|
| 441 |
+
return this.popState(), 43;
|
| 442 |
+
case 29:
|
| 443 |
+
return this.pushState("CLASS"), 48;
|
| 444 |
+
case 30:
|
| 445 |
+
return this.popState(), this.pushState("CLASS_STYLE"), 49;
|
| 446 |
+
case 31:
|
| 447 |
+
return this.popState(), 50;
|
| 448 |
+
case 32:
|
| 449 |
+
return this.pushState("STYLE"), 45;
|
| 450 |
+
case 33:
|
| 451 |
+
return this.popState(), this.pushState("STYLEDEF_STYLES"), 46;
|
| 452 |
+
case 34:
|
| 453 |
+
return this.popState(), 47;
|
| 454 |
+
case 35:
|
| 455 |
+
return this.pushState("SCALE"), 17;
|
| 456 |
+
case 36:
|
| 457 |
+
return 18;
|
| 458 |
+
case 37:
|
| 459 |
+
this.popState();
|
| 460 |
+
break;
|
| 461 |
+
case 38:
|
| 462 |
+
this.pushState("STATE");
|
| 463 |
+
break;
|
| 464 |
+
case 39:
|
| 465 |
+
return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 25;
|
| 466 |
+
case 40:
|
| 467 |
+
return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 26;
|
| 468 |
+
case 41:
|
| 469 |
+
return this.popState(), n.yytext = n.yytext.slice(0, -10).trim(), 27;
|
| 470 |
+
case 42:
|
| 471 |
+
return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 25;
|
| 472 |
+
case 43:
|
| 473 |
+
return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 26;
|
| 474 |
+
case 44:
|
| 475 |
+
return this.popState(), n.yytext = n.yytext.slice(0, -10).trim(), 27;
|
| 476 |
+
case 45:
|
| 477 |
+
return 51;
|
| 478 |
+
case 46:
|
| 479 |
+
return 52;
|
| 480 |
+
case 47:
|
| 481 |
+
return 53;
|
| 482 |
+
case 48:
|
| 483 |
+
return 54;
|
| 484 |
+
case 49:
|
| 485 |
+
this.pushState("STATE_STRING");
|
| 486 |
+
break;
|
| 487 |
+
case 50:
|
| 488 |
+
return this.pushState("STATE_ID"), "AS";
|
| 489 |
+
case 51:
|
| 490 |
+
return this.popState(), "ID";
|
| 491 |
+
case 52:
|
| 492 |
+
this.popState();
|
| 493 |
+
break;
|
| 494 |
+
case 53:
|
| 495 |
+
return "STATE_DESCR";
|
| 496 |
+
case 54:
|
| 497 |
+
return 19;
|
| 498 |
+
case 55:
|
| 499 |
+
this.popState();
|
| 500 |
+
break;
|
| 501 |
+
case 56:
|
| 502 |
+
return this.popState(), this.pushState("struct"), 20;
|
| 503 |
+
case 57:
|
| 504 |
+
break;
|
| 505 |
+
case 58:
|
| 506 |
+
return this.popState(), 21;
|
| 507 |
+
case 59:
|
| 508 |
+
break;
|
| 509 |
+
case 60:
|
| 510 |
+
return this.begin("NOTE"), 29;
|
| 511 |
+
case 61:
|
| 512 |
+
return this.popState(), this.pushState("NOTE_ID"), 59;
|
| 513 |
+
case 62:
|
| 514 |
+
return this.popState(), this.pushState("NOTE_ID"), 60;
|
| 515 |
+
case 63:
|
| 516 |
+
this.popState(), this.pushState("FLOATING_NOTE");
|
| 517 |
+
break;
|
| 518 |
+
case 64:
|
| 519 |
+
return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS";
|
| 520 |
+
case 65:
|
| 521 |
+
break;
|
| 522 |
+
case 66:
|
| 523 |
+
return "NOTE_TEXT";
|
| 524 |
+
case 67:
|
| 525 |
+
return this.popState(), "ID";
|
| 526 |
+
case 68:
|
| 527 |
+
return this.popState(), this.pushState("NOTE_TEXT"), 24;
|
| 528 |
+
case 69:
|
| 529 |
+
return this.popState(), n.yytext = n.yytext.substr(2).trim(), 31;
|
| 530 |
+
case 70:
|
| 531 |
+
return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 31;
|
| 532 |
+
case 71:
|
| 533 |
+
return 6;
|
| 534 |
+
case 72:
|
| 535 |
+
return 6;
|
| 536 |
+
case 73:
|
| 537 |
+
return 16;
|
| 538 |
+
case 74:
|
| 539 |
+
return 57;
|
| 540 |
+
case 75:
|
| 541 |
+
return 24;
|
| 542 |
+
case 76:
|
| 543 |
+
return n.yytext = n.yytext.trim(), 14;
|
| 544 |
+
case 77:
|
| 545 |
+
return 15;
|
| 546 |
+
case 78:
|
| 547 |
+
return 28;
|
| 548 |
+
case 79:
|
| 549 |
+
return 58;
|
| 550 |
+
case 80:
|
| 551 |
+
return 5;
|
| 552 |
+
case 81:
|
| 553 |
+
return "INVALID";
|
| 554 |
+
}
|
| 555 |
+
}, "anonymous"),
|
| 556 |
+
rules: [/^(?:click\b)/i, /^(?:href\b)/i, /^(?:"[^"]*")/i, /^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:style\s+)/i, /^(?:[\w,]+\s+)/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<<fork>>)/i, /^(?:.*<<join>>)/i, /^(?:.*<<choice>>)/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],
|
| 557 |
+
conditions: { LINE: { rules: [12, 13], inclusive: !1 }, struct: { rules: [12, 13, 25, 29, 32, 38, 45, 46, 47, 48, 57, 58, 59, 60, 74, 75, 76, 77, 78], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [67], inclusive: !1 }, FLOATING_NOTE: { rules: [64, 65, 66], inclusive: !1 }, NOTE_TEXT: { rules: [69, 70], inclusive: !1 }, NOTE_ID: { rules: [68], inclusive: !1 }, NOTE: { rules: [61, 62, 63], inclusive: !1 }, STYLEDEF_STYLEOPTS: { rules: [], inclusive: !1 }, STYLEDEF_STYLES: { rules: [34], inclusive: !1 }, STYLE_IDS: { rules: [], inclusive: !1 }, STYLE: { rules: [33], inclusive: !1 }, CLASS_STYLE: { rules: [31], inclusive: !1 }, CLASS: { rules: [30], inclusive: !1 }, CLASSDEFID: { rules: [28], inclusive: !1 }, CLASSDEF: { rules: [26, 27], inclusive: !1 }, acc_descr_multiline: { rules: [23, 24], inclusive: !1 }, acc_descr: { rules: [21], inclusive: !1 }, acc_title: { rules: [19], inclusive: !1 }, SCALE: { rules: [16, 17, 36, 37], inclusive: !1 }, ALIAS: { rules: [], inclusive: !1 }, STATE_ID: { rules: [51], inclusive: !1 }, STATE_STRING: { rules: [52, 53], inclusive: !1 }, FORK_STATE: { rules: [], inclusive: !1 }, STATE: { rules: [12, 13, 39, 40, 41, 42, 43, 44, 49, 50, 54, 55, 56], inclusive: !1 }, ID: { rules: [12, 13], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 18, 20, 22, 25, 29, 32, 35, 38, 56, 60, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81], inclusive: !0 } }
|
| 558 |
+
};
|
| 559 |
+
return V;
|
| 560 |
+
}();
|
| 561 |
+
gt.lexer = qt;
|
| 562 |
+
function ht() {
|
| 563 |
+
this.yy = {};
|
| 564 |
+
}
|
| 565 |
+
return f(ht, "Parser"), ht.prototype = gt, gt.Parser = ht, new ht();
|
| 566 |
+
}();
|
| 567 |
+
vt.parser = vt;
|
| 568 |
+
var Ge = vt, de = "TB", Yt = "TB", Rt = "dir", Q = "state", q = "root", Ct = "relation", fe = "classDef", pe = "style", Se = "applyClass", it = "default", Gt = "divider", Bt = "fill:none", Vt = "fill: #333", Mt = "c", Ut = "text", jt = "normal", bt = "rect", kt = "rectWithTitle", ye = "stateStart", ge = "stateEnd", It = "divider", Nt = "roundedWithTitle", Te = "note", Ee = "noteGroup", rt = "statediagram", _e = "state", me = `${rt}-${_e}`, Ht = "transition", De = "note", be = "note-edge", ke = `${Ht} ${be}`, ve = `${rt}-${De}`, Ce = "cluster", Ae = `${rt}-${Ce}`, xe = "cluster-alt", Le = `${rt}-${xe}`, Wt = "parent", zt = "note", Oe = "state", At = "----", Re = `${At}${zt}`, wt = `${At}${Wt}`, Kt = /* @__PURE__ */ f((e, t = Yt) => {
|
| 569 |
+
if (!e.doc)
|
| 570 |
+
return t;
|
| 571 |
+
let s = t;
|
| 572 |
+
for (const a of e.doc)
|
| 573 |
+
a.stmt === "dir" && (s = a.value);
|
| 574 |
+
return s;
|
| 575 |
+
}, "getDir"), Ie = /* @__PURE__ */ f(function(e, t) {
|
| 576 |
+
return t.db.getClasses();
|
| 577 |
+
}, "getClasses"), Ne = /* @__PURE__ */ f(async function(e, t, s, a) {
|
| 578 |
+
D.info("REF0:"), D.info("Drawing state diagram (v2)", t);
|
| 579 |
+
const { securityLevel: i, state: l, layout: d } = F();
|
| 580 |
+
a.db.extract(a.db.getRootDocV2());
|
| 581 |
+
const S = a.db.getData(), p = te(t, i);
|
| 582 |
+
S.type = a.type, S.layoutAlgorithm = d, S.nodeSpacing = (l == null ? void 0 : l.nodeSpacing) || 50, S.rankSpacing = (l == null ? void 0 : l.rankSpacing) || 50, S.markers = ["barb"], S.diagramId = t, await se(S, p);
|
| 583 |
+
const T = 8;
|
| 584 |
+
try {
|
| 585 |
+
(typeof a.db.getLinks == "function" ? a.db.getLinks() : /* @__PURE__ */ new Map()).forEach((m, k) => {
|
| 586 |
+
var I;
|
| 587 |
+
const A = typeof k == "string" ? k : typeof (k == null ? void 0 : k.id) == "string" ? k.id : "";
|
| 588 |
+
if (!A) {
|
| 589 |
+
D.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(k));
|
| 590 |
+
return;
|
| 591 |
+
}
|
| 592 |
+
const $ = (I = p.node()) == null ? void 0 : I.querySelectorAll("g");
|
| 593 |
+
let x;
|
| 594 |
+
if ($ == null || $.forEach((N) => {
|
| 595 |
+
var P;
|
| 596 |
+
((P = N.textContent) == null ? void 0 : P.trim()) === A && (x = N);
|
| 597 |
+
}), !x) {
|
| 598 |
+
D.warn("⚠️ Could not find node matching text:", A);
|
| 599 |
+
return;
|
| 600 |
+
}
|
| 601 |
+
const R = x.parentNode;
|
| 602 |
+
if (!R) {
|
| 603 |
+
D.warn("⚠️ Node has no parent, cannot wrap:", A);
|
| 604 |
+
return;
|
| 605 |
+
}
|
| 606 |
+
const u = document.createElementNS("http://www.w3.org/2000/svg", "a"), L = m.url.replace(/^"+|"+$/g, "");
|
| 607 |
+
if (u.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", L), u.setAttribute("target", "_blank"), m.tooltip) {
|
| 608 |
+
const N = m.tooltip.replace(/^"+|"+$/g, "");
|
| 609 |
+
u.setAttribute("title", N);
|
| 610 |
+
}
|
| 611 |
+
R.replaceChild(u, x), u.appendChild(x), D.info("🔗 Wrapped node in <a> tag for:", A, m.url);
|
| 612 |
+
});
|
| 613 |
+
} catch (_) {
|
| 614 |
+
D.error("❌ Error injecting clickable links:", _);
|
| 615 |
+
}
|
| 616 |
+
ie.insertTitle(
|
| 617 |
+
p,
|
| 618 |
+
"statediagramTitleText",
|
| 619 |
+
(l == null ? void 0 : l.titleTopMargin) ?? 25,
|
| 620 |
+
a.db.getDiagramTitle()
|
| 621 |
+
), ee(p, T, rt, (l == null ? void 0 : l.useMaxWidth) ?? !0);
|
| 622 |
+
}, "draw"), Be = {
|
| 623 |
+
getClasses: Ie,
|
| 624 |
+
draw: Ne,
|
| 625 |
+
getDir: Kt
|
| 626 |
+
}, St = /* @__PURE__ */ new Map(), M = 0;
|
| 627 |
+
function yt(e = "", t = 0, s = "", a = At) {
|
| 628 |
+
const i = s !== null && s.length > 0 ? `${a}${s}` : "";
|
| 629 |
+
return `${Oe}-${e}${i}-${t}`;
|
| 630 |
+
}
|
| 631 |
+
f(yt, "stateDomId");
|
| 632 |
+
var we = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
| 633 |
+
D.trace("items", t), t.forEach((p) => {
|
| 634 |
+
switch (p.stmt) {
|
| 635 |
+
case Q:
|
| 636 |
+
st(e, p, s, a, i, l, d, S);
|
| 637 |
+
break;
|
| 638 |
+
case it:
|
| 639 |
+
st(e, p, s, a, i, l, d, S);
|
| 640 |
+
break;
|
| 641 |
+
case Ct:
|
| 642 |
+
{
|
| 643 |
+
st(
|
| 644 |
+
e,
|
| 645 |
+
p.state1,
|
| 646 |
+
s,
|
| 647 |
+
a,
|
| 648 |
+
i,
|
| 649 |
+
l,
|
| 650 |
+
d,
|
| 651 |
+
S
|
| 652 |
+
), st(
|
| 653 |
+
e,
|
| 654 |
+
p.state2,
|
| 655 |
+
s,
|
| 656 |
+
a,
|
| 657 |
+
i,
|
| 658 |
+
l,
|
| 659 |
+
d,
|
| 660 |
+
S
|
| 661 |
+
);
|
| 662 |
+
const T = {
|
| 663 |
+
id: "edge" + M,
|
| 664 |
+
start: p.state1.id,
|
| 665 |
+
end: p.state2.id,
|
| 666 |
+
arrowhead: "normal",
|
| 667 |
+
arrowTypeEnd: "arrow_barb",
|
| 668 |
+
style: Bt,
|
| 669 |
+
labelStyle: "",
|
| 670 |
+
label: W.sanitizeText(p.description ?? "", F()),
|
| 671 |
+
arrowheadStyle: Vt,
|
| 672 |
+
labelpos: Mt,
|
| 673 |
+
labelType: Ut,
|
| 674 |
+
thickness: jt,
|
| 675 |
+
classes: Ht,
|
| 676 |
+
look: d
|
| 677 |
+
};
|
| 678 |
+
i.push(T), M++;
|
| 679 |
+
}
|
| 680 |
+
break;
|
| 681 |
+
}
|
| 682 |
+
});
|
| 683 |
+
}, "setupDoc"), $t = /* @__PURE__ */ f((e, t = Yt) => {
|
| 684 |
+
let s = t;
|
| 685 |
+
if (e.doc)
|
| 686 |
+
for (const a of e.doc)
|
| 687 |
+
a.stmt === "dir" && (s = a.value);
|
| 688 |
+
return s;
|
| 689 |
+
}, "getDir");
|
| 690 |
+
function et(e, t, s) {
|
| 691 |
+
if (!t.id || t.id === "</join></fork>" || t.id === "</choice>")
|
| 692 |
+
return;
|
| 693 |
+
t.cssClasses && (Array.isArray(t.cssCompiledStyles) || (t.cssCompiledStyles = []), t.cssClasses.split(" ").forEach((i) => {
|
| 694 |
+
const l = s.get(i);
|
| 695 |
+
l && (t.cssCompiledStyles = [...t.cssCompiledStyles ?? [], ...l.styles]);
|
| 696 |
+
}));
|
| 697 |
+
const a = e.find((i) => i.id === t.id);
|
| 698 |
+
a ? Object.assign(a, t) : e.push(t);
|
| 699 |
+
}
|
| 700 |
+
f(et, "insertOrUpdateNode");
|
| 701 |
+
function Xt(e) {
|
| 702 |
+
var t;
|
| 703 |
+
return ((t = e == null ? void 0 : e.classes) == null ? void 0 : t.join(" ")) ?? "";
|
| 704 |
+
}
|
| 705 |
+
f(Xt, "getClassesFromDbInfo");
|
| 706 |
+
function Jt(e) {
|
| 707 |
+
return (e == null ? void 0 : e.styles) ?? [];
|
| 708 |
+
}
|
| 709 |
+
f(Jt, "getStylesFromDbInfo");
|
| 710 |
+
var st = /* @__PURE__ */ f((e, t, s, a, i, l, d, S) => {
|
| 711 |
+
var A, $, x;
|
| 712 |
+
const p = t.id, T = s.get(p), _ = Xt(T), m = Jt(T), k = F();
|
| 713 |
+
if (D.info("dataFetcher parsedItem", t, T, m), p !== "root") {
|
| 714 |
+
let R = bt;
|
| 715 |
+
t.start === !0 ? R = ye : t.start === !1 && (R = ge), t.type !== it && (R = t.type), St.get(p) || St.set(p, {
|
| 716 |
+
id: p,
|
| 717 |
+
shape: R,
|
| 718 |
+
description: W.sanitizeText(p, k),
|
| 719 |
+
cssClasses: `${_} ${me}`,
|
| 720 |
+
cssStyles: m
|
| 721 |
+
});
|
| 722 |
+
const u = St.get(p);
|
| 723 |
+
t.description && (Array.isArray(u.description) ? (u.shape = kt, u.description.push(t.description)) : (A = u.description) != null && A.length && u.description.length > 0 ? (u.shape = kt, u.description === p ? u.description = [t.description] : u.description = [u.description, t.description]) : (u.shape = bt, u.description = t.description), u.description = W.sanitizeTextOrArray(u.description, k)), (($ = u.description) == null ? void 0 : $.length) === 1 && u.shape === kt && (u.type === "group" ? u.shape = Nt : u.shape = bt), !u.type && t.doc && (D.info("Setting cluster for XCX", p, $t(t)), u.type = "group", u.isGroup = !0, u.dir = $t(t), u.shape = t.type === Gt ? It : Nt, u.cssClasses = `${u.cssClasses} ${Ae} ${l ? Le : ""}`);
|
| 724 |
+
const L = {
|
| 725 |
+
labelStyle: "",
|
| 726 |
+
shape: u.shape,
|
| 727 |
+
label: u.description,
|
| 728 |
+
cssClasses: u.cssClasses,
|
| 729 |
+
cssCompiledStyles: [],
|
| 730 |
+
cssStyles: u.cssStyles,
|
| 731 |
+
id: p,
|
| 732 |
+
dir: u.dir,
|
| 733 |
+
domId: yt(p, M),
|
| 734 |
+
type: u.type,
|
| 735 |
+
isGroup: u.type === "group",
|
| 736 |
+
padding: 8,
|
| 737 |
+
rx: 10,
|
| 738 |
+
ry: 10,
|
| 739 |
+
look: d
|
| 740 |
+
};
|
| 741 |
+
if (L.shape === It && (L.label = ""), e && e.id !== "root" && (D.trace("Setting node ", p, " to be child of its parent ", e.id), L.parentId = e.id), L.centerLabel = !0, t.note) {
|
| 742 |
+
const I = {
|
| 743 |
+
labelStyle: "",
|
| 744 |
+
shape: Te,
|
| 745 |
+
label: t.note.text,
|
| 746 |
+
cssClasses: ve,
|
| 747 |
+
// useHtmlLabels: false,
|
| 748 |
+
cssStyles: [],
|
| 749 |
+
cssCompiledStyles: [],
|
| 750 |
+
id: p + Re + "-" + M,
|
| 751 |
+
domId: yt(p, M, zt),
|
| 752 |
+
type: u.type,
|
| 753 |
+
isGroup: u.type === "group",
|
| 754 |
+
padding: (x = k.flowchart) == null ? void 0 : x.padding,
|
| 755 |
+
look: d,
|
| 756 |
+
position: t.note.position
|
| 757 |
+
}, N = p + wt, G = {
|
| 758 |
+
labelStyle: "",
|
| 759 |
+
shape: Ee,
|
| 760 |
+
label: t.note.text,
|
| 761 |
+
cssClasses: u.cssClasses,
|
| 762 |
+
cssStyles: [],
|
| 763 |
+
id: p + wt,
|
| 764 |
+
domId: yt(p, M, Wt),
|
| 765 |
+
type: "group",
|
| 766 |
+
isGroup: !0,
|
| 767 |
+
padding: 16,
|
| 768 |
+
//getConfig().flowchart.padding
|
| 769 |
+
look: d,
|
| 770 |
+
position: t.note.position
|
| 771 |
+
};
|
| 772 |
+
M++, G.id = N, I.parentId = N, et(a, G, S), et(a, I, S), et(a, L, S);
|
| 773 |
+
let P = p, B = I.id;
|
| 774 |
+
t.note.position === "left of" && (P = I.id, B = p), i.push({
|
| 775 |
+
id: P + "-" + B,
|
| 776 |
+
start: P,
|
| 777 |
+
end: B,
|
| 778 |
+
arrowhead: "none",
|
| 779 |
+
arrowTypeEnd: "",
|
| 780 |
+
style: Bt,
|
| 781 |
+
labelStyle: "",
|
| 782 |
+
classes: ke,
|
| 783 |
+
arrowheadStyle: Vt,
|
| 784 |
+
labelpos: Mt,
|
| 785 |
+
labelType: Ut,
|
| 786 |
+
thickness: jt,
|
| 787 |
+
look: d
|
| 788 |
+
});
|
| 789 |
+
} else
|
| 790 |
+
et(a, L, S);
|
| 791 |
+
}
|
| 792 |
+
t.doc && (D.trace("Adding nodes children "), we(t, t.doc, s, a, i, !l, d, S));
|
| 793 |
+
}, "dataFetcher"), $e = /* @__PURE__ */ f(() => {
|
| 794 |
+
St.clear(), M = 0;
|
| 795 |
+
}, "reset"), v = {
|
| 796 |
+
START_NODE: "[*]",
|
| 797 |
+
START_TYPE: "start",
|
| 798 |
+
END_NODE: "[*]",
|
| 799 |
+
END_TYPE: "end",
|
| 800 |
+
COLOR_KEYWORD: "color",
|
| 801 |
+
FILL_KEYWORD: "fill",
|
| 802 |
+
BG_FILL: "bgFill",
|
| 803 |
+
STYLECLASS_SEP: ","
|
| 804 |
+
}, Pt = /* @__PURE__ */ f(() => /* @__PURE__ */ new Map(), "newClassesList"), Ft = /* @__PURE__ */ f(() => ({
|
| 805 |
+
relations: [],
|
| 806 |
+
states: /* @__PURE__ */ new Map(),
|
| 807 |
+
documents: {}
|
| 808 |
+
}), "newDoc"), pt = /* @__PURE__ */ f((e) => JSON.parse(JSON.stringify(e)), "clone"), z, Ve = (z = class {
|
| 809 |
+
constructor(t) {
|
| 810 |
+
this.version = t, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes = Pt(), this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.dividerCnt = 0, this.links = /* @__PURE__ */ new Map(), this.getAccTitle = re, this.setAccTitle = ae, this.getAccDescription = ne, this.setAccDescription = oe, this.setDiagramTitle = le, this.getDiagramTitle = ce, this.clear(), this.setRootDoc = this.setRootDoc.bind(this), this.getDividerId = this.getDividerId.bind(this), this.setDirection = this.setDirection.bind(this), this.trimColon = this.trimColon.bind(this);
|
| 811 |
+
}
|
| 812 |
+
/**
|
| 813 |
+
* Convert all of the statements (stmts) that were parsed into states and relationships.
|
| 814 |
+
* This is done because a state diagram may have nested sections,
|
| 815 |
+
* where each section is a 'document' and has its own set of statements.
|
| 816 |
+
* Ex: the section within a fork has its own statements, and incoming and outgoing statements
|
| 817 |
+
* refer to the fork as a whole (document).
|
| 818 |
+
* See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.
|
| 819 |
+
* This will push the statement into the list of statements for the current document.
|
| 820 |
+
*/
|
| 821 |
+
extract(t) {
|
| 822 |
+
this.clear(!0);
|
| 823 |
+
for (const i of Array.isArray(t) ? t : t.doc)
|
| 824 |
+
switch (i.stmt) {
|
| 825 |
+
case Q:
|
| 826 |
+
this.addState(i.id.trim(), i.type, i.doc, i.description, i.note);
|
| 827 |
+
break;
|
| 828 |
+
case Ct:
|
| 829 |
+
this.addRelation(i.state1, i.state2, i.description);
|
| 830 |
+
break;
|
| 831 |
+
case fe:
|
| 832 |
+
this.addStyleClass(i.id.trim(), i.classes);
|
| 833 |
+
break;
|
| 834 |
+
case pe:
|
| 835 |
+
this.handleStyleDef(i);
|
| 836 |
+
break;
|
| 837 |
+
case Se:
|
| 838 |
+
this.setCssClass(i.id.trim(), i.styleClass);
|
| 839 |
+
break;
|
| 840 |
+
case "click":
|
| 841 |
+
this.addLink(i.id, i.url, i.tooltip);
|
| 842 |
+
break;
|
| 843 |
+
}
|
| 844 |
+
const s = this.getStates(), a = F();
|
| 845 |
+
$e(), st(
|
| 846 |
+
void 0,
|
| 847 |
+
this.getRootDocV2(),
|
| 848 |
+
s,
|
| 849 |
+
this.nodes,
|
| 850 |
+
this.edges,
|
| 851 |
+
!0,
|
| 852 |
+
a.look,
|
| 853 |
+
this.classes
|
| 854 |
+
);
|
| 855 |
+
for (const i of this.nodes)
|
| 856 |
+
if (Array.isArray(i.label)) {
|
| 857 |
+
if (i.description = i.label.slice(1), i.isGroup && i.description.length > 0)
|
| 858 |
+
throw new Error(
|
| 859 |
+
`Group nodes can only have label. Remove the additional description for node [${i.id}]`
|
| 860 |
+
);
|
| 861 |
+
i.label = i.label[0];
|
| 862 |
+
}
|
| 863 |
+
}
|
| 864 |
+
handleStyleDef(t) {
|
| 865 |
+
const s = t.id.trim().split(","), a = t.styleClass.split(",");
|
| 866 |
+
for (const i of s) {
|
| 867 |
+
let l = this.getState(i);
|
| 868 |
+
if (!l) {
|
| 869 |
+
const d = i.trim();
|
| 870 |
+
this.addState(d), l = this.getState(d);
|
| 871 |
+
}
|
| 872 |
+
l && (l.styles = a.map((d) => {
|
| 873 |
+
var S;
|
| 874 |
+
return (S = d.replace(/;/g, "")) == null ? void 0 : S.trim();
|
| 875 |
+
}));
|
| 876 |
+
}
|
| 877 |
+
}
|
| 878 |
+
setRootDoc(t) {
|
| 879 |
+
D.info("Setting root doc", t), this.rootDoc = t, this.version === 1 ? this.extract(t) : this.extract(this.getRootDocV2());
|
| 880 |
+
}
|
| 881 |
+
docTranslator(t, s, a) {
|
| 882 |
+
if (s.stmt === Ct) {
|
| 883 |
+
this.docTranslator(t, s.state1, !0), this.docTranslator(t, s.state2, !1);
|
| 884 |
+
return;
|
| 885 |
+
}
|
| 886 |
+
if (s.stmt === Q && (s.id === v.START_NODE ? (s.id = t.id + (a ? "_start" : "_end"), s.start = a) : s.id = s.id.trim()), s.stmt !== q && s.stmt !== Q || !s.doc)
|
| 887 |
+
return;
|
| 888 |
+
const i = [];
|
| 889 |
+
let l = [];
|
| 890 |
+
for (const d of s.doc)
|
| 891 |
+
if (d.type === Gt) {
|
| 892 |
+
const S = pt(d);
|
| 893 |
+
S.doc = pt(l), i.push(S), l = [];
|
| 894 |
+
} else
|
| 895 |
+
l.push(d);
|
| 896 |
+
if (i.length > 0 && l.length > 0) {
|
| 897 |
+
const d = {
|
| 898 |
+
stmt: Q,
|
| 899 |
+
id: he(),
|
| 900 |
+
type: "divider",
|
| 901 |
+
doc: pt(l)
|
| 902 |
+
};
|
| 903 |
+
i.push(pt(d)), s.doc = i;
|
| 904 |
+
}
|
| 905 |
+
s.doc.forEach((d) => this.docTranslator(s, d, !0));
|
| 906 |
+
}
|
| 907 |
+
getRootDocV2() {
|
| 908 |
+
return this.docTranslator(
|
| 909 |
+
{ id: q, stmt: q },
|
| 910 |
+
{ id: q, stmt: q, doc: this.rootDoc },
|
| 911 |
+
!0
|
| 912 |
+
), { id: q, doc: this.rootDoc };
|
| 913 |
+
}
|
| 914 |
+
/**
|
| 915 |
+
* Function called by parser when a node definition has been found.
|
| 916 |
+
*
|
| 917 |
+
* @param descr - description for the state. Can be a string or a list or strings
|
| 918 |
+
* @param classes - class styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 class, convert it to an array of that 1 class.
|
| 919 |
+
* @param styles - styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 style, convert it to an array of that 1 style.
|
| 920 |
+
* @param textStyles - text styles to apply to this state. Can be a string (1 text test) or an array of text styles. If it's just 1 text style, convert it to an array of that 1 text style.
|
| 921 |
+
*/
|
| 922 |
+
addState(t, s = it, a = void 0, i = void 0, l = void 0, d = void 0, S = void 0, p = void 0) {
|
| 923 |
+
const T = t == null ? void 0 : t.trim();
|
| 924 |
+
if (!this.currentDocument.states.has(T))
|
| 925 |
+
D.info("Adding state ", T, i), this.currentDocument.states.set(T, {
|
| 926 |
+
stmt: Q,
|
| 927 |
+
id: T,
|
| 928 |
+
descriptions: [],
|
| 929 |
+
type: s,
|
| 930 |
+
doc: a,
|
| 931 |
+
note: l,
|
| 932 |
+
classes: [],
|
| 933 |
+
styles: [],
|
| 934 |
+
textStyles: []
|
| 935 |
+
});
|
| 936 |
+
else {
|
| 937 |
+
const _ = this.currentDocument.states.get(T);
|
| 938 |
+
if (!_)
|
| 939 |
+
throw new Error(`State not found: ${T}`);
|
| 940 |
+
_.doc || (_.doc = a), _.type || (_.type = s);
|
| 941 |
+
}
|
| 942 |
+
if (i && (D.info("Setting state description", T, i), (Array.isArray(i) ? i : [i]).forEach((m) => this.addDescription(T, m.trim()))), l) {
|
| 943 |
+
const _ = this.currentDocument.states.get(T);
|
| 944 |
+
if (!_)
|
| 945 |
+
throw new Error(`State not found: ${T}`);
|
| 946 |
+
_.note = l, _.note.text = W.sanitizeText(_.note.text, F());
|
| 947 |
+
}
|
| 948 |
+
d && (D.info("Setting state classes", T, d), (Array.isArray(d) ? d : [d]).forEach((m) => this.setCssClass(T, m.trim()))), S && (D.info("Setting state styles", T, S), (Array.isArray(S) ? S : [S]).forEach((m) => this.setStyle(T, m.trim()))), p && (D.info("Setting state styles", T, S), (Array.isArray(p) ? p : [p]).forEach((m) => this.setTextStyle(T, m.trim())));
|
| 949 |
+
}
|
| 950 |
+
clear(t) {
|
| 951 |
+
this.nodes = [], this.edges = [], this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Pt(), t || (this.links = /* @__PURE__ */ new Map(), ue());
|
| 952 |
+
}
|
| 953 |
+
getState(t) {
|
| 954 |
+
return this.currentDocument.states.get(t);
|
| 955 |
+
}
|
| 956 |
+
getStates() {
|
| 957 |
+
return this.currentDocument.states;
|
| 958 |
+
}
|
| 959 |
+
logDocuments() {
|
| 960 |
+
D.info("Documents = ", this.documents);
|
| 961 |
+
}
|
| 962 |
+
getRelations() {
|
| 963 |
+
return this.currentDocument.relations;
|
| 964 |
+
}
|
| 965 |
+
/**
|
| 966 |
+
* Adds a clickable link to a state.
|
| 967 |
+
*/
|
| 968 |
+
addLink(t, s, a) {
|
| 969 |
+
this.links.set(t, { url: s, tooltip: a }), D.warn("Adding link", t, s, a);
|
| 970 |
+
}
|
| 971 |
+
/**
|
| 972 |
+
* Get all registered links.
|
| 973 |
+
*/
|
| 974 |
+
getLinks() {
|
| 975 |
+
return this.links;
|
| 976 |
+
}
|
| 977 |
+
/**
|
| 978 |
+
* If the id is a start node ( [*] ), then return a new id constructed from
|
| 979 |
+
* the start node name and the current start node count.
|
| 980 |
+
* else return the given id
|
| 981 |
+
*/
|
| 982 |
+
startIdIfNeeded(t = "") {
|
| 983 |
+
return t === v.START_NODE ? (this.startEndCount++, `${v.START_TYPE}${this.startEndCount}`) : t;
|
| 984 |
+
}
|
| 985 |
+
/**
|
| 986 |
+
* If the id is a start node ( [*] ), then return the start type ('start')
|
| 987 |
+
* else return the given type
|
| 988 |
+
*/
|
| 989 |
+
startTypeIfNeeded(t = "", s = it) {
|
| 990 |
+
return t === v.START_NODE ? v.START_TYPE : s;
|
| 991 |
+
}
|
| 992 |
+
/**
|
| 993 |
+
* If the id is an end node ( [*] ), then return a new id constructed from
|
| 994 |
+
* the end node name and the current start_end node count.
|
| 995 |
+
* else return the given id
|
| 996 |
+
*/
|
| 997 |
+
endIdIfNeeded(t = "") {
|
| 998 |
+
return t === v.END_NODE ? (this.startEndCount++, `${v.END_TYPE}${this.startEndCount}`) : t;
|
| 999 |
+
}
|
| 1000 |
+
/**
|
| 1001 |
+
* If the id is an end node ( [*] ), then return the end type
|
| 1002 |
+
* else return the given type
|
| 1003 |
+
*
|
| 1004 |
+
*/
|
| 1005 |
+
endTypeIfNeeded(t = "", s = it) {
|
| 1006 |
+
return t === v.END_NODE ? v.END_TYPE : s;
|
| 1007 |
+
}
|
| 1008 |
+
addRelationObjs(t, s, a = "") {
|
| 1009 |
+
const i = this.startIdIfNeeded(t.id.trim()), l = this.startTypeIfNeeded(t.id.trim(), t.type), d = this.startIdIfNeeded(s.id.trim()), S = this.startTypeIfNeeded(s.id.trim(), s.type);
|
| 1010 |
+
this.addState(
|
| 1011 |
+
i,
|
| 1012 |
+
l,
|
| 1013 |
+
t.doc,
|
| 1014 |
+
t.description,
|
| 1015 |
+
t.note,
|
| 1016 |
+
t.classes,
|
| 1017 |
+
t.styles,
|
| 1018 |
+
t.textStyles
|
| 1019 |
+
), this.addState(
|
| 1020 |
+
d,
|
| 1021 |
+
S,
|
| 1022 |
+
s.doc,
|
| 1023 |
+
s.description,
|
| 1024 |
+
s.note,
|
| 1025 |
+
s.classes,
|
| 1026 |
+
s.styles,
|
| 1027 |
+
s.textStyles
|
| 1028 |
+
), this.currentDocument.relations.push({
|
| 1029 |
+
id1: i,
|
| 1030 |
+
id2: d,
|
| 1031 |
+
relationTitle: W.sanitizeText(a, F())
|
| 1032 |
+
});
|
| 1033 |
+
}
|
| 1034 |
+
/**
|
| 1035 |
+
* Add a relation between two items. The items may be full objects or just the string id of a state.
|
| 1036 |
+
*/
|
| 1037 |
+
addRelation(t, s, a) {
|
| 1038 |
+
if (typeof t == "object" && typeof s == "object")
|
| 1039 |
+
this.addRelationObjs(t, s, a);
|
| 1040 |
+
else if (typeof t == "string" && typeof s == "string") {
|
| 1041 |
+
const i = this.startIdIfNeeded(t.trim()), l = this.startTypeIfNeeded(t), d = this.endIdIfNeeded(s.trim()), S = this.endTypeIfNeeded(s);
|
| 1042 |
+
this.addState(i, l), this.addState(d, S), this.currentDocument.relations.push({
|
| 1043 |
+
id1: i,
|
| 1044 |
+
id2: d,
|
| 1045 |
+
relationTitle: a ? W.sanitizeText(a, F()) : void 0
|
| 1046 |
+
});
|
| 1047 |
+
}
|
| 1048 |
+
}
|
| 1049 |
+
addDescription(t, s) {
|
| 1050 |
+
var l;
|
| 1051 |
+
const a = this.currentDocument.states.get(t), i = s.startsWith(":") ? s.replace(":", "").trim() : s;
|
| 1052 |
+
(l = a == null ? void 0 : a.descriptions) == null || l.push(W.sanitizeText(i, F()));
|
| 1053 |
+
}
|
| 1054 |
+
cleanupLabel(t) {
|
| 1055 |
+
return t.startsWith(":") ? t.slice(2).trim() : t.trim();
|
| 1056 |
+
}
|
| 1057 |
+
getDividerId() {
|
| 1058 |
+
return this.dividerCnt++, `divider-id-${this.dividerCnt}`;
|
| 1059 |
+
}
|
| 1060 |
+
/**
|
| 1061 |
+
* Called when the parser comes across a (style) class definition
|
| 1062 |
+
* @example classDef my-style fill:#f96;
|
| 1063 |
+
*
|
| 1064 |
+
* @param id - the id of this (style) class
|
| 1065 |
+
* @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)
|
| 1066 |
+
*/
|
| 1067 |
+
addStyleClass(t, s = "") {
|
| 1068 |
+
this.classes.has(t) || this.classes.set(t, { id: t, styles: [], textStyles: [] });
|
| 1069 |
+
const a = this.classes.get(t);
|
| 1070 |
+
s && a && s.split(v.STYLECLASS_SEP).forEach((i) => {
|
| 1071 |
+
const l = i.replace(/([^;]*);/, "$1").trim();
|
| 1072 |
+
if (RegExp(v.COLOR_KEYWORD).exec(i)) {
|
| 1073 |
+
const S = l.replace(v.FILL_KEYWORD, v.BG_FILL).replace(v.COLOR_KEYWORD, v.FILL_KEYWORD);
|
| 1074 |
+
a.textStyles.push(S);
|
| 1075 |
+
}
|
| 1076 |
+
a.styles.push(l);
|
| 1077 |
+
});
|
| 1078 |
+
}
|
| 1079 |
+
getClasses() {
|
| 1080 |
+
return this.classes;
|
| 1081 |
+
}
|
| 1082 |
+
/**
|
| 1083 |
+
* Add a (style) class or css class to a state with the given id.
|
| 1084 |
+
* If the state isn't already in the list of known states, add it.
|
| 1085 |
+
* Might be called by parser when a style class or CSS class should be applied to a state
|
| 1086 |
+
*
|
| 1087 |
+
* @param itemIds - The id or a list of ids of the item(s) to apply the css class to
|
| 1088 |
+
* @param cssClassName - CSS class name
|
| 1089 |
+
*/
|
| 1090 |
+
setCssClass(t, s) {
|
| 1091 |
+
t.split(",").forEach((a) => {
|
| 1092 |
+
var l;
|
| 1093 |
+
let i = this.getState(a);
|
| 1094 |
+
if (!i) {
|
| 1095 |
+
const d = a.trim();
|
| 1096 |
+
this.addState(d), i = this.getState(d);
|
| 1097 |
+
}
|
| 1098 |
+
(l = i == null ? void 0 : i.classes) == null || l.push(s);
|
| 1099 |
+
});
|
| 1100 |
+
}
|
| 1101 |
+
/**
|
| 1102 |
+
* Add a style to a state with the given id.
|
| 1103 |
+
* @example style stateId fill:#f9f,stroke:#333,stroke-width:4px
|
| 1104 |
+
* where 'style' is the keyword
|
| 1105 |
+
* stateId is the id of a state
|
| 1106 |
+
* the rest of the string is the styleText (all of the attributes to be applied to the state)
|
| 1107 |
+
*
|
| 1108 |
+
* @param itemId - The id of item to apply the style to
|
| 1109 |
+
* @param styleText - the text of the attributes for the style
|
| 1110 |
+
*/
|
| 1111 |
+
setStyle(t, s) {
|
| 1112 |
+
var a, i;
|
| 1113 |
+
(i = (a = this.getState(t)) == null ? void 0 : a.styles) == null || i.push(s);
|
| 1114 |
+
}
|
| 1115 |
+
/**
|
| 1116 |
+
* Add a text style to a state with the given id
|
| 1117 |
+
*
|
| 1118 |
+
* @param itemId - The id of item to apply the css class to
|
| 1119 |
+
* @param cssClassName - CSS class name
|
| 1120 |
+
*/
|
| 1121 |
+
setTextStyle(t, s) {
|
| 1122 |
+
var a, i;
|
| 1123 |
+
(i = (a = this.getState(t)) == null ? void 0 : a.textStyles) == null || i.push(s);
|
| 1124 |
+
}
|
| 1125 |
+
/**
|
| 1126 |
+
* Finds the direction statement in the root document.
|
| 1127 |
+
* @returns the direction statement if present
|
| 1128 |
+
*/
|
| 1129 |
+
getDirectionStatement() {
|
| 1130 |
+
return this.rootDoc.find((t) => t.stmt === Rt);
|
| 1131 |
+
}
|
| 1132 |
+
getDirection() {
|
| 1133 |
+
var t;
|
| 1134 |
+
return ((t = this.getDirectionStatement()) == null ? void 0 : t.value) ?? de;
|
| 1135 |
+
}
|
| 1136 |
+
setDirection(t) {
|
| 1137 |
+
const s = this.getDirectionStatement();
|
| 1138 |
+
s ? s.value = t : this.rootDoc.unshift({ stmt: Rt, value: t });
|
| 1139 |
+
}
|
| 1140 |
+
trimColon(t) {
|
| 1141 |
+
return t.startsWith(":") ? t.slice(1).trim() : t.trim();
|
| 1142 |
+
}
|
| 1143 |
+
getData() {
|
| 1144 |
+
const t = F();
|
| 1145 |
+
return {
|
| 1146 |
+
nodes: this.nodes,
|
| 1147 |
+
edges: this.edges,
|
| 1148 |
+
other: {},
|
| 1149 |
+
config: t,
|
| 1150 |
+
direction: Kt(this.getRootDocV2())
|
| 1151 |
+
};
|
| 1152 |
+
}
|
| 1153 |
+
getConfig() {
|
| 1154 |
+
return F().state;
|
| 1155 |
+
}
|
| 1156 |
+
}, f(z, "StateDB"), z.relationType = {
|
| 1157 |
+
AGGREGATION: 0,
|
| 1158 |
+
EXTENSION: 1,
|
| 1159 |
+
COMPOSITION: 2,
|
| 1160 |
+
DEPENDENCY: 3
|
| 1161 |
+
}, z), Pe = /* @__PURE__ */ f((e) => `
|
| 1162 |
+
defs #statediagram-barbEnd {
|
| 1163 |
+
fill: ${e.transitionColor};
|
| 1164 |
+
stroke: ${e.transitionColor};
|
| 1165 |
+
}
|
| 1166 |
+
g.stateGroup text {
|
| 1167 |
+
fill: ${e.nodeBorder};
|
| 1168 |
+
stroke: none;
|
| 1169 |
+
font-size: 10px;
|
| 1170 |
+
}
|
| 1171 |
+
g.stateGroup text {
|
| 1172 |
+
fill: ${e.textColor};
|
| 1173 |
+
stroke: none;
|
| 1174 |
+
font-size: 10px;
|
| 1175 |
+
|
| 1176 |
+
}
|
| 1177 |
+
g.stateGroup .state-title {
|
| 1178 |
+
font-weight: bolder;
|
| 1179 |
+
fill: ${e.stateLabelColor};
|
| 1180 |
+
}
|
| 1181 |
+
|
| 1182 |
+
g.stateGroup rect {
|
| 1183 |
+
fill: ${e.mainBkg};
|
| 1184 |
+
stroke: ${e.nodeBorder};
|
| 1185 |
+
}
|
| 1186 |
+
|
| 1187 |
+
g.stateGroup line {
|
| 1188 |
+
stroke: ${e.lineColor};
|
| 1189 |
+
stroke-width: 1;
|
| 1190 |
+
}
|
| 1191 |
+
|
| 1192 |
+
.transition {
|
| 1193 |
+
stroke: ${e.transitionColor};
|
| 1194 |
+
stroke-width: 1;
|
| 1195 |
+
fill: none;
|
| 1196 |
+
}
|
| 1197 |
+
|
| 1198 |
+
.stateGroup .composit {
|
| 1199 |
+
fill: ${e.background};
|
| 1200 |
+
border-bottom: 1px
|
| 1201 |
+
}
|
| 1202 |
+
|
| 1203 |
+
.stateGroup .alt-composit {
|
| 1204 |
+
fill: #e0e0e0;
|
| 1205 |
+
border-bottom: 1px
|
| 1206 |
+
}
|
| 1207 |
+
|
| 1208 |
+
.state-note {
|
| 1209 |
+
stroke: ${e.noteBorderColor};
|
| 1210 |
+
fill: ${e.noteBkgColor};
|
| 1211 |
+
|
| 1212 |
+
text {
|
| 1213 |
+
fill: ${e.noteTextColor};
|
| 1214 |
+
stroke: none;
|
| 1215 |
+
font-size: 10px;
|
| 1216 |
+
}
|
| 1217 |
+
}
|
| 1218 |
+
|
| 1219 |
+
.stateLabel .box {
|
| 1220 |
+
stroke: none;
|
| 1221 |
+
stroke-width: 0;
|
| 1222 |
+
fill: ${e.mainBkg};
|
| 1223 |
+
opacity: 0.5;
|
| 1224 |
+
}
|
| 1225 |
+
|
| 1226 |
+
.edgeLabel .label rect {
|
| 1227 |
+
fill: ${e.labelBackgroundColor};
|
| 1228 |
+
opacity: 0.5;
|
| 1229 |
+
}
|
| 1230 |
+
.edgeLabel {
|
| 1231 |
+
background-color: ${e.edgeLabelBackground};
|
| 1232 |
+
p {
|
| 1233 |
+
background-color: ${e.edgeLabelBackground};
|
| 1234 |
+
}
|
| 1235 |
+
rect {
|
| 1236 |
+
opacity: 0.5;
|
| 1237 |
+
background-color: ${e.edgeLabelBackground};
|
| 1238 |
+
fill: ${e.edgeLabelBackground};
|
| 1239 |
+
}
|
| 1240 |
+
text-align: center;
|
| 1241 |
+
}
|
| 1242 |
+
.edgeLabel .label text {
|
| 1243 |
+
fill: ${e.transitionLabelColor || e.tertiaryTextColor};
|
| 1244 |
+
}
|
| 1245 |
+
.label div .edgeLabel {
|
| 1246 |
+
color: ${e.transitionLabelColor || e.tertiaryTextColor};
|
| 1247 |
+
}
|
| 1248 |
+
|
| 1249 |
+
.stateLabel text {
|
| 1250 |
+
fill: ${e.stateLabelColor};
|
| 1251 |
+
font-size: 10px;
|
| 1252 |
+
font-weight: bold;
|
| 1253 |
+
}
|
| 1254 |
+
|
| 1255 |
+
.node circle.state-start {
|
| 1256 |
+
fill: ${e.specialStateColor};
|
| 1257 |
+
stroke: ${e.specialStateColor};
|
| 1258 |
+
}
|
| 1259 |
+
|
| 1260 |
+
.node .fork-join {
|
| 1261 |
+
fill: ${e.specialStateColor};
|
| 1262 |
+
stroke: ${e.specialStateColor};
|
| 1263 |
+
}
|
| 1264 |
+
|
| 1265 |
+
.node circle.state-end {
|
| 1266 |
+
fill: ${e.innerEndBackground};
|
| 1267 |
+
stroke: ${e.background};
|
| 1268 |
+
stroke-width: 1.5
|
| 1269 |
+
}
|
| 1270 |
+
.end-state-inner {
|
| 1271 |
+
fill: ${e.compositeBackground || e.background};
|
| 1272 |
+
// stroke: ${e.background};
|
| 1273 |
+
stroke-width: 1.5
|
| 1274 |
+
}
|
| 1275 |
+
|
| 1276 |
+
.node rect {
|
| 1277 |
+
fill: ${e.stateBkg || e.mainBkg};
|
| 1278 |
+
stroke: ${e.stateBorder || e.nodeBorder};
|
| 1279 |
+
stroke-width: 1px;
|
| 1280 |
+
}
|
| 1281 |
+
.node polygon {
|
| 1282 |
+
fill: ${e.mainBkg};
|
| 1283 |
+
stroke: ${e.stateBorder || e.nodeBorder};;
|
| 1284 |
+
stroke-width: 1px;
|
| 1285 |
+
}
|
| 1286 |
+
#statediagram-barbEnd {
|
| 1287 |
+
fill: ${e.lineColor};
|
| 1288 |
+
}
|
| 1289 |
+
|
| 1290 |
+
.statediagram-cluster rect {
|
| 1291 |
+
fill: ${e.compositeTitleBackground};
|
| 1292 |
+
stroke: ${e.stateBorder || e.nodeBorder};
|
| 1293 |
+
stroke-width: 1px;
|
| 1294 |
+
}
|
| 1295 |
+
|
| 1296 |
+
.cluster-label, .nodeLabel {
|
| 1297 |
+
color: ${e.stateLabelColor};
|
| 1298 |
+
// line-height: 1;
|
| 1299 |
+
}
|
| 1300 |
+
|
| 1301 |
+
.statediagram-cluster rect.outer {
|
| 1302 |
+
rx: 5px;
|
| 1303 |
+
ry: 5px;
|
| 1304 |
+
}
|
| 1305 |
+
.statediagram-state .divider {
|
| 1306 |
+
stroke: ${e.stateBorder || e.nodeBorder};
|
| 1307 |
+
}
|
| 1308 |
+
|
| 1309 |
+
.statediagram-state .title-state {
|
| 1310 |
+
rx: 5px;
|
| 1311 |
+
ry: 5px;
|
| 1312 |
+
}
|
| 1313 |
+
.statediagram-cluster.statediagram-cluster .inner {
|
| 1314 |
+
fill: ${e.compositeBackground || e.background};
|
| 1315 |
+
}
|
| 1316 |
+
.statediagram-cluster.statediagram-cluster-alt .inner {
|
| 1317 |
+
fill: ${e.altBackground ? e.altBackground : "#efefef"};
|
| 1318 |
+
}
|
| 1319 |
+
|
| 1320 |
+
.statediagram-cluster .inner {
|
| 1321 |
+
rx:0;
|
| 1322 |
+
ry:0;
|
| 1323 |
+
}
|
| 1324 |
+
|
| 1325 |
+
.statediagram-state rect.basic {
|
| 1326 |
+
rx: 5px;
|
| 1327 |
+
ry: 5px;
|
| 1328 |
+
}
|
| 1329 |
+
.statediagram-state rect.divider {
|
| 1330 |
+
stroke-dasharray: 10,10;
|
| 1331 |
+
fill: ${e.altBackground ? e.altBackground : "#efefef"};
|
| 1332 |
+
}
|
| 1333 |
+
|
| 1334 |
+
.note-edge {
|
| 1335 |
+
stroke-dasharray: 5;
|
| 1336 |
+
}
|
| 1337 |
+
|
| 1338 |
+
.statediagram-note rect {
|
| 1339 |
+
fill: ${e.noteBkgColor};
|
| 1340 |
+
stroke: ${e.noteBorderColor};
|
| 1341 |
+
stroke-width: 1px;
|
| 1342 |
+
rx: 0;
|
| 1343 |
+
ry: 0;
|
| 1344 |
+
}
|
| 1345 |
+
.statediagram-note rect {
|
| 1346 |
+
fill: ${e.noteBkgColor};
|
| 1347 |
+
stroke: ${e.noteBorderColor};
|
| 1348 |
+
stroke-width: 1px;
|
| 1349 |
+
rx: 0;
|
| 1350 |
+
ry: 0;
|
| 1351 |
+
}
|
| 1352 |
+
|
| 1353 |
+
.statediagram-note text {
|
| 1354 |
+
fill: ${e.noteTextColor};
|
| 1355 |
+
}
|
| 1356 |
+
|
| 1357 |
+
.statediagram-note .nodeLabel {
|
| 1358 |
+
color: ${e.noteTextColor};
|
| 1359 |
+
}
|
| 1360 |
+
.statediagram .edgeLabel {
|
| 1361 |
+
color: red; // ${e.noteTextColor};
|
| 1362 |
+
}
|
| 1363 |
+
|
| 1364 |
+
#dependencyStart, #dependencyEnd {
|
| 1365 |
+
fill: ${e.lineColor};
|
| 1366 |
+
stroke: ${e.lineColor};
|
| 1367 |
+
stroke-width: 1;
|
| 1368 |
+
}
|
| 1369 |
+
|
| 1370 |
+
.statediagramTitleText {
|
| 1371 |
+
text-anchor: middle;
|
| 1372 |
+
font-size: 18px;
|
| 1373 |
+
fill: ${e.textColor};
|
| 1374 |
+
}
|
| 1375 |
+
`, "getStyles"), Me = Pe;
|
| 1376 |
+
export {
|
| 1377 |
+
Ve as S,
|
| 1378 |
+
Ge as a,
|
| 1379 |
+
Be as b,
|
| 1380 |
+
Me as s
|
| 1381 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/chunk-HPOVUXKZ-Dn5Xnpaz.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { _ as n, d as r, e as d, l as g } from "./mermaid.core-CfPtPiLZ.js";
|
| 2 |
+
var u = /* @__PURE__ */ n((e, t) => {
|
| 3 |
+
let o;
|
| 4 |
+
return t === "sandbox" && (o = r("#i" + e)), (t === "sandbox" ? r(o.nodes()[0].contentDocument.body) : r("body")).select(`[id="${e}"]`);
|
| 5 |
+
}, "getDiagramElement"), b = /* @__PURE__ */ n((e, t, o, i) => {
|
| 6 |
+
e.attr("class", o);
|
| 7 |
+
const { width: a, height: s, x: h, y: x } = l(e, t);
|
| 8 |
+
d(e, s, a, i);
|
| 9 |
+
const c = w(h, x, a, s, t);
|
| 10 |
+
e.attr("viewBox", c), g.debug(`viewBox configured: ${c} with padding: ${t}`);
|
| 11 |
+
}, "setupViewPortForSVG"), l = /* @__PURE__ */ n((e, t) => {
|
| 12 |
+
var i;
|
| 13 |
+
const o = ((i = e.node()) == null ? void 0 : i.getBBox()) || { width: 0, height: 0, x: 0, y: 0 };
|
| 14 |
+
return {
|
| 15 |
+
width: o.width + t * 2,
|
| 16 |
+
height: o.height + t * 2,
|
| 17 |
+
x: o.x,
|
| 18 |
+
y: o.y
|
| 19 |
+
};
|
| 20 |
+
}, "calculateDimensionsWithPadding"), w = /* @__PURE__ */ n((e, t, o, i, a) => `${e - a} ${t - a} ${o} ${i}`, "createViewBox");
|
| 21 |
+
export {
|
| 22 |
+
u as g,
|
| 23 |
+
b as s
|
| 24 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/chunk-UIWBPB2F-DCnPuFaH.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { _ as e } from "./mermaid.core-CfPtPiLZ.js";
|
| 2 |
+
var l = /* @__PURE__ */ e(() => `
|
| 3 |
+
/* Font Awesome icon styling - consolidated */
|
| 4 |
+
.label-icon {
|
| 5 |
+
display: inline-block;
|
| 6 |
+
height: 1em;
|
| 7 |
+
overflow: visible;
|
| 8 |
+
vertical-align: -0.125em;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
.node .label-icon path {
|
| 12 |
+
fill: currentColor;
|
| 13 |
+
stroke: revert;
|
| 14 |
+
stroke-width: revert;
|
| 15 |
+
}
|
| 16 |
+
`, "getIconStyles");
|
| 17 |
+
export {
|
| 18 |
+
l as g
|
| 19 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/chunk-WZLT4MVT-Cpjjsmu7.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { _ as n, U as c, j as l } from "./mermaid.core-CfPtPiLZ.js";
|
| 2 |
+
var o = /* @__PURE__ */ n((a, t) => {
|
| 3 |
+
const e = a.append("rect");
|
| 4 |
+
if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx && e.attr("rx", t.rx), t.ry && e.attr("ry", t.ry), t.attrs !== void 0)
|
| 5 |
+
for (const r in t.attrs)
|
| 6 |
+
e.attr(r, t.attrs[r]);
|
| 7 |
+
return t.class && e.attr("class", t.class), e;
|
| 8 |
+
}, "drawRect"), d = /* @__PURE__ */ n((a, t) => {
|
| 9 |
+
const e = {
|
| 10 |
+
x: t.startx,
|
| 11 |
+
y: t.starty,
|
| 12 |
+
width: t.stopx - t.startx,
|
| 13 |
+
height: t.stopy - t.starty,
|
| 14 |
+
fill: t.fill,
|
| 15 |
+
stroke: t.stroke,
|
| 16 |
+
class: "rect"
|
| 17 |
+
};
|
| 18 |
+
o(a, e).lower();
|
| 19 |
+
}, "drawBackgroundRect"), g = /* @__PURE__ */ n((a, t) => {
|
| 20 |
+
const e = t.text.replace(c, " "), r = a.append("text");
|
| 21 |
+
r.attr("x", t.x), r.attr("y", t.y), r.attr("class", "legend"), r.style("text-anchor", t.anchor), t.class && r.attr("class", t.class);
|
| 22 |
+
const s = r.append("tspan");
|
| 23 |
+
return s.attr("x", t.x + t.textMargin * 2), s.text(e), r;
|
| 24 |
+
}, "drawText"), h = /* @__PURE__ */ n((a, t, e, r) => {
|
| 25 |
+
const s = a.append("image");
|
| 26 |
+
s.attr("x", t), s.attr("y", e);
|
| 27 |
+
const i = l(r);
|
| 28 |
+
s.attr("xlink:href", i);
|
| 29 |
+
}, "drawImage"), m = /* @__PURE__ */ n((a, t, e, r) => {
|
| 30 |
+
const s = a.append("use");
|
| 31 |
+
s.attr("x", t), s.attr("y", e);
|
| 32 |
+
const i = l(r);
|
| 33 |
+
s.attr("xlink:href", `#${i}`);
|
| 34 |
+
}, "drawEmbeddedImage"), y = /* @__PURE__ */ n(() => ({
|
| 35 |
+
x: 0,
|
| 36 |
+
y: 0,
|
| 37 |
+
width: 100,
|
| 38 |
+
height: 100,
|
| 39 |
+
fill: "#EDF2AE",
|
| 40 |
+
stroke: "#666",
|
| 41 |
+
anchor: "start",
|
| 42 |
+
rx: 0,
|
| 43 |
+
ry: 0
|
| 44 |
+
}), "getNoteRect"), p = /* @__PURE__ */ n(() => ({
|
| 45 |
+
x: 0,
|
| 46 |
+
y: 0,
|
| 47 |
+
width: 100,
|
| 48 |
+
height: 100,
|
| 49 |
+
"text-anchor": "start",
|
| 50 |
+
style: "#666",
|
| 51 |
+
textMargin: 0,
|
| 52 |
+
rx: 0,
|
| 53 |
+
ry: 0,
|
| 54 |
+
tspan: !0
|
| 55 |
+
}), "getTextObj");
|
| 56 |
+
export {
|
| 57 |
+
d as a,
|
| 58 |
+
p as b,
|
| 59 |
+
m as c,
|
| 60 |
+
o as d,
|
| 61 |
+
h as e,
|
| 62 |
+
g as f,
|
| 63 |
+
y as g
|
| 64 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/chunk-YQZZRAKN-B2br4HuY.js
ADDED
|
@@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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { g as et } from "./chunk-UIWBPB2F-DCnPuFaH.js";
|
| 2 |
+
import { g as tt, s as st } from "./chunk-HPOVUXKZ-Dn5Xnpaz.js";
|
| 3 |
+
import { _ as f, l as Oe, c as F, o as it, r as at, u as we, d as $, b as nt, a as rt, s as ut, g as lt, p as ct, q as ot, k as v, y as ht, x as dt, i as pt, Q as R } from "./mermaid.core-CfPtPiLZ.js";
|
| 4 |
+
var Ve = function() {
|
| 5 |
+
var s = /* @__PURE__ */ f(function(I, c, h, p) {
|
| 6 |
+
for (h = h || {}, p = I.length; p--; h[I[p]] = c) ;
|
| 7 |
+
return h;
|
| 8 |
+
}, "o"), i = [1, 18], a = [1, 19], u = [1, 20], l = [1, 41], r = [1, 42], o = [1, 26], A = [1, 24], g = [1, 25], k = [1, 32], L = [1, 33], Ae = [1, 34], m = [1, 45], fe = [1, 35], ge = [1, 36], Ce = [1, 37], me = [1, 38], be = [1, 27], Ee = [1, 28], ye = [1, 29], Te = [1, 30], ke = [1, 31], b = [1, 44], E = [1, 46], y = [1, 43], D = [1, 47], De = [1, 9], d = [1, 8, 9], ee = [1, 58], te = [1, 59], se = [1, 60], ie = [1, 61], ae = [1, 62], Fe = [1, 63], Be = [1, 64], ne = [1, 8, 9, 41], Pe = [1, 76], P = [1, 8, 9, 12, 13, 22, 39, 41, 44, 66, 67, 68, 69, 70, 71, 72, 77, 79], re = [1, 8, 9, 12, 13, 17, 20, 22, 39, 41, 44, 48, 58, 66, 67, 68, 69, 70, 71, 72, 77, 79, 84, 99, 101, 102], ue = [13, 58, 84, 99, 101, 102], z = [13, 58, 71, 72, 84, 99, 101, 102], Me = [13, 58, 66, 67, 68, 69, 70, 84, 99, 101, 102], _e = [1, 98], K = [1, 115], Y = [1, 107], Q = [1, 113], W = [1, 108], j = [1, 109], X = [1, 110], q = [1, 111], H = [1, 112], J = [1, 114], Re = [22, 58, 59, 80, 84, 85, 86, 87, 88, 89], Se = [1, 8, 9, 39, 41, 44], le = [1, 8, 9, 22], Ge = [1, 143], Ue = [1, 8, 9, 59], N = [1, 8, 9, 22, 58, 59, 80, 84, 85, 86, 87, 88, 89], Ne = {
|
| 9 |
+
trace: /* @__PURE__ */ f(function() {
|
| 10 |
+
}, "trace"),
|
| 11 |
+
yy: {},
|
| 12 |
+
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, DOT: 17, className: 18, classLiteralName: 19, GENERICTYPE: 20, relationStatement: 21, LABEL: 22, namespaceStatement: 23, classStatement: 24, memberStatement: 25, annotationStatement: 26, clickStatement: 27, styleStatement: 28, cssClassStatement: 29, noteStatement: 30, classDefStatement: 31, direction: 32, acc_title: 33, acc_title_value: 34, acc_descr: 35, acc_descr_value: 36, acc_descr_multiline_value: 37, namespaceIdentifier: 38, STRUCT_START: 39, classStatements: 40, STRUCT_STOP: 41, NAMESPACE: 42, classIdentifier: 43, STYLE_SEPARATOR: 44, members: 45, CLASS: 46, ANNOTATION_START: 47, ANNOTATION_END: 48, MEMBER: 49, SEPARATOR: 50, relation: 51, NOTE_FOR: 52, noteText: 53, NOTE: 54, CLASSDEF: 55, classList: 56, stylesOpt: 57, ALPHA: 58, COMMA: 59, direction_tb: 60, direction_bt: 61, direction_rl: 62, direction_lr: 63, relationType: 64, lineType: 65, AGGREGATION: 66, EXTENSION: 67, COMPOSITION: 68, DEPENDENCY: 69, LOLLIPOP: 70, LINE: 71, DOTTED_LINE: 72, CALLBACK: 73, LINK: 74, LINK_TARGET: 75, CLICK: 76, CALLBACK_NAME: 77, CALLBACK_ARGS: 78, HREF: 79, STYLE: 80, CSSCLASS: 81, style: 82, styleComponent: 83, NUM: 84, COLON: 85, UNIT: 86, SPACE: 87, BRKT: 88, PCT: 89, commentToken: 90, textToken: 91, graphCodeTokens: 92, textNoTagsToken: 93, TAGSTART: 94, TAGEND: 95, "==": 96, "--": 97, DEFAULT: 98, MINUS: 99, keywords: 100, UNICODE_TEXT: 101, BQUOTE_STR: 102, $accept: 0, $end: 1 },
|
| 13 |
+
terminals_: { 2: "error", 7: "CLASS_DIAGRAM", 8: "NEWLINE", 9: "EOF", 12: "SQS", 13: "STR", 14: "SQE", 17: "DOT", 20: "GENERICTYPE", 22: "LABEL", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 39: "STRUCT_START", 41: "STRUCT_STOP", 42: "NAMESPACE", 44: "STYLE_SEPARATOR", 46: "CLASS", 47: "ANNOTATION_START", 48: "ANNOTATION_END", 49: "MEMBER", 50: "SEPARATOR", 52: "NOTE_FOR", 54: "NOTE", 55: "CLASSDEF", 58: "ALPHA", 59: "COMMA", 60: "direction_tb", 61: "direction_bt", 62: "direction_rl", 63: "direction_lr", 66: "AGGREGATION", 67: "EXTENSION", 68: "COMPOSITION", 69: "DEPENDENCY", 70: "LOLLIPOP", 71: "LINE", 72: "DOTTED_LINE", 73: "CALLBACK", 74: "LINK", 75: "LINK_TARGET", 76: "CLICK", 77: "CALLBACK_NAME", 78: "CALLBACK_ARGS", 79: "HREF", 80: "STYLE", 81: "CSSCLASS", 84: "NUM", 85: "COLON", 86: "UNIT", 87: "SPACE", 88: "BRKT", 89: "PCT", 92: "graphCodeTokens", 94: "TAGSTART", 95: "TAGEND", 96: "==", 97: "--", 98: "DEFAULT", 99: "MINUS", 100: "keywords", 101: "UNICODE_TEXT", 102: "BQUOTE_STR" },
|
| 14 |
+
productions_: [0, [3, 1], [3, 1], [4, 1], [6, 4], [5, 1], [5, 2], [5, 3], [11, 3], [15, 1], [15, 3], [15, 2], [18, 1], [18, 3], [18, 1], [18, 2], [18, 2], [18, 2], [10, 1], [10, 2], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 1], [10, 2], [10, 2], [10, 1], [23, 4], [23, 5], [38, 2], [40, 1], [40, 2], [40, 3], [24, 1], [24, 3], [24, 4], [24, 6], [43, 2], [43, 3], [26, 4], [45, 1], [45, 2], [25, 1], [25, 2], [25, 1], [25, 1], [21, 3], [21, 4], [21, 4], [21, 5], [30, 3], [30, 2], [31, 3], [56, 1], [56, 3], [32, 1], [32, 1], [32, 1], [32, 1], [51, 3], [51, 2], [51, 2], [51, 1], [64, 1], [64, 1], [64, 1], [64, 1], [64, 1], [65, 1], [65, 1], [27, 3], [27, 4], [27, 3], [27, 4], [27, 4], [27, 5], [27, 3], [27, 4], [27, 4], [27, 5], [27, 4], [27, 5], [27, 5], [27, 6], [28, 3], [29, 3], [57, 1], [57, 3], [82, 1], [82, 2], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [90, 1], [90, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [93, 1], [93, 1], [93, 1], [93, 1], [16, 1], [16, 1], [16, 1], [16, 1], [19, 1], [53, 1]],
|
| 15 |
+
performAction: /* @__PURE__ */ f(function(c, h, p, n, C, e, Z) {
|
| 16 |
+
var t = e.length - 1;
|
| 17 |
+
switch (C) {
|
| 18 |
+
case 8:
|
| 19 |
+
this.$ = e[t - 1];
|
| 20 |
+
break;
|
| 21 |
+
case 9:
|
| 22 |
+
case 12:
|
| 23 |
+
case 14:
|
| 24 |
+
this.$ = e[t];
|
| 25 |
+
break;
|
| 26 |
+
case 10:
|
| 27 |
+
case 13:
|
| 28 |
+
this.$ = e[t - 2] + "." + e[t];
|
| 29 |
+
break;
|
| 30 |
+
case 11:
|
| 31 |
+
case 15:
|
| 32 |
+
this.$ = e[t - 1] + e[t];
|
| 33 |
+
break;
|
| 34 |
+
case 16:
|
| 35 |
+
case 17:
|
| 36 |
+
this.$ = e[t - 1] + "~" + e[t] + "~";
|
| 37 |
+
break;
|
| 38 |
+
case 18:
|
| 39 |
+
n.addRelation(e[t]);
|
| 40 |
+
break;
|
| 41 |
+
case 19:
|
| 42 |
+
e[t - 1].title = n.cleanupLabel(e[t]), n.addRelation(e[t - 1]);
|
| 43 |
+
break;
|
| 44 |
+
case 30:
|
| 45 |
+
this.$ = e[t].trim(), n.setAccTitle(this.$);
|
| 46 |
+
break;
|
| 47 |
+
case 31:
|
| 48 |
+
case 32:
|
| 49 |
+
this.$ = e[t].trim(), n.setAccDescription(this.$);
|
| 50 |
+
break;
|
| 51 |
+
case 33:
|
| 52 |
+
n.addClassesToNamespace(e[t - 3], e[t - 1]);
|
| 53 |
+
break;
|
| 54 |
+
case 34:
|
| 55 |
+
n.addClassesToNamespace(e[t - 4], e[t - 1]);
|
| 56 |
+
break;
|
| 57 |
+
case 35:
|
| 58 |
+
this.$ = e[t], n.addNamespace(e[t]);
|
| 59 |
+
break;
|
| 60 |
+
case 36:
|
| 61 |
+
this.$ = [e[t]];
|
| 62 |
+
break;
|
| 63 |
+
case 37:
|
| 64 |
+
this.$ = [e[t - 1]];
|
| 65 |
+
break;
|
| 66 |
+
case 38:
|
| 67 |
+
e[t].unshift(e[t - 2]), this.$ = e[t];
|
| 68 |
+
break;
|
| 69 |
+
case 40:
|
| 70 |
+
n.setCssClass(e[t - 2], e[t]);
|
| 71 |
+
break;
|
| 72 |
+
case 41:
|
| 73 |
+
n.addMembers(e[t - 3], e[t - 1]);
|
| 74 |
+
break;
|
| 75 |
+
case 42:
|
| 76 |
+
n.setCssClass(e[t - 5], e[t - 3]), n.addMembers(e[t - 5], e[t - 1]);
|
| 77 |
+
break;
|
| 78 |
+
case 43:
|
| 79 |
+
this.$ = e[t], n.addClass(e[t]);
|
| 80 |
+
break;
|
| 81 |
+
case 44:
|
| 82 |
+
this.$ = e[t - 1], n.addClass(e[t - 1]), n.setClassLabel(e[t - 1], e[t]);
|
| 83 |
+
break;
|
| 84 |
+
case 45:
|
| 85 |
+
n.addAnnotation(e[t], e[t - 2]);
|
| 86 |
+
break;
|
| 87 |
+
case 46:
|
| 88 |
+
case 59:
|
| 89 |
+
this.$ = [e[t]];
|
| 90 |
+
break;
|
| 91 |
+
case 47:
|
| 92 |
+
e[t].push(e[t - 1]), this.$ = e[t];
|
| 93 |
+
break;
|
| 94 |
+
case 48:
|
| 95 |
+
break;
|
| 96 |
+
case 49:
|
| 97 |
+
n.addMember(e[t - 1], n.cleanupLabel(e[t]));
|
| 98 |
+
break;
|
| 99 |
+
case 50:
|
| 100 |
+
break;
|
| 101 |
+
case 51:
|
| 102 |
+
break;
|
| 103 |
+
case 52:
|
| 104 |
+
this.$ = { id1: e[t - 2], id2: e[t], relation: e[t - 1], relationTitle1: "none", relationTitle2: "none" };
|
| 105 |
+
break;
|
| 106 |
+
case 53:
|
| 107 |
+
this.$ = { id1: e[t - 3], id2: e[t], relation: e[t - 1], relationTitle1: e[t - 2], relationTitle2: "none" };
|
| 108 |
+
break;
|
| 109 |
+
case 54:
|
| 110 |
+
this.$ = { id1: e[t - 3], id2: e[t], relation: e[t - 2], relationTitle1: "none", relationTitle2: e[t - 1] };
|
| 111 |
+
break;
|
| 112 |
+
case 55:
|
| 113 |
+
this.$ = { id1: e[t - 4], id2: e[t], relation: e[t - 2], relationTitle1: e[t - 3], relationTitle2: e[t - 1] };
|
| 114 |
+
break;
|
| 115 |
+
case 56:
|
| 116 |
+
n.addNote(e[t], e[t - 1]);
|
| 117 |
+
break;
|
| 118 |
+
case 57:
|
| 119 |
+
n.addNote(e[t]);
|
| 120 |
+
break;
|
| 121 |
+
case 58:
|
| 122 |
+
this.$ = e[t - 2], n.defineClass(e[t - 1], e[t]);
|
| 123 |
+
break;
|
| 124 |
+
case 60:
|
| 125 |
+
this.$ = e[t - 2].concat([e[t]]);
|
| 126 |
+
break;
|
| 127 |
+
case 61:
|
| 128 |
+
n.setDirection("TB");
|
| 129 |
+
break;
|
| 130 |
+
case 62:
|
| 131 |
+
n.setDirection("BT");
|
| 132 |
+
break;
|
| 133 |
+
case 63:
|
| 134 |
+
n.setDirection("RL");
|
| 135 |
+
break;
|
| 136 |
+
case 64:
|
| 137 |
+
n.setDirection("LR");
|
| 138 |
+
break;
|
| 139 |
+
case 65:
|
| 140 |
+
this.$ = { type1: e[t - 2], type2: e[t], lineType: e[t - 1] };
|
| 141 |
+
break;
|
| 142 |
+
case 66:
|
| 143 |
+
this.$ = { type1: "none", type2: e[t], lineType: e[t - 1] };
|
| 144 |
+
break;
|
| 145 |
+
case 67:
|
| 146 |
+
this.$ = { type1: e[t - 1], type2: "none", lineType: e[t] };
|
| 147 |
+
break;
|
| 148 |
+
case 68:
|
| 149 |
+
this.$ = { type1: "none", type2: "none", lineType: e[t] };
|
| 150 |
+
break;
|
| 151 |
+
case 69:
|
| 152 |
+
this.$ = n.relationType.AGGREGATION;
|
| 153 |
+
break;
|
| 154 |
+
case 70:
|
| 155 |
+
this.$ = n.relationType.EXTENSION;
|
| 156 |
+
break;
|
| 157 |
+
case 71:
|
| 158 |
+
this.$ = n.relationType.COMPOSITION;
|
| 159 |
+
break;
|
| 160 |
+
case 72:
|
| 161 |
+
this.$ = n.relationType.DEPENDENCY;
|
| 162 |
+
break;
|
| 163 |
+
case 73:
|
| 164 |
+
this.$ = n.relationType.LOLLIPOP;
|
| 165 |
+
break;
|
| 166 |
+
case 74:
|
| 167 |
+
this.$ = n.lineType.LINE;
|
| 168 |
+
break;
|
| 169 |
+
case 75:
|
| 170 |
+
this.$ = n.lineType.DOTTED_LINE;
|
| 171 |
+
break;
|
| 172 |
+
case 76:
|
| 173 |
+
case 82:
|
| 174 |
+
this.$ = e[t - 2], n.setClickEvent(e[t - 1], e[t]);
|
| 175 |
+
break;
|
| 176 |
+
case 77:
|
| 177 |
+
case 83:
|
| 178 |
+
this.$ = e[t - 3], n.setClickEvent(e[t - 2], e[t - 1]), n.setTooltip(e[t - 2], e[t]);
|
| 179 |
+
break;
|
| 180 |
+
case 78:
|
| 181 |
+
this.$ = e[t - 2], n.setLink(e[t - 1], e[t]);
|
| 182 |
+
break;
|
| 183 |
+
case 79:
|
| 184 |
+
this.$ = e[t - 3], n.setLink(e[t - 2], e[t - 1], e[t]);
|
| 185 |
+
break;
|
| 186 |
+
case 80:
|
| 187 |
+
this.$ = e[t - 3], n.setLink(e[t - 2], e[t - 1]), n.setTooltip(e[t - 2], e[t]);
|
| 188 |
+
break;
|
| 189 |
+
case 81:
|
| 190 |
+
this.$ = e[t - 4], n.setLink(e[t - 3], e[t - 2], e[t]), n.setTooltip(e[t - 3], e[t - 1]);
|
| 191 |
+
break;
|
| 192 |
+
case 84:
|
| 193 |
+
this.$ = e[t - 3], n.setClickEvent(e[t - 2], e[t - 1], e[t]);
|
| 194 |
+
break;
|
| 195 |
+
case 85:
|
| 196 |
+
this.$ = e[t - 4], n.setClickEvent(e[t - 3], e[t - 2], e[t - 1]), n.setTooltip(e[t - 3], e[t]);
|
| 197 |
+
break;
|
| 198 |
+
case 86:
|
| 199 |
+
this.$ = e[t - 3], n.setLink(e[t - 2], e[t]);
|
| 200 |
+
break;
|
| 201 |
+
case 87:
|
| 202 |
+
this.$ = e[t - 4], n.setLink(e[t - 3], e[t - 1], e[t]);
|
| 203 |
+
break;
|
| 204 |
+
case 88:
|
| 205 |
+
this.$ = e[t - 4], n.setLink(e[t - 3], e[t - 1]), n.setTooltip(e[t - 3], e[t]);
|
| 206 |
+
break;
|
| 207 |
+
case 89:
|
| 208 |
+
this.$ = e[t - 5], n.setLink(e[t - 4], e[t - 2], e[t]), n.setTooltip(e[t - 4], e[t - 1]);
|
| 209 |
+
break;
|
| 210 |
+
case 90:
|
| 211 |
+
this.$ = e[t - 2], n.setCssStyle(e[t - 1], e[t]);
|
| 212 |
+
break;
|
| 213 |
+
case 91:
|
| 214 |
+
n.setCssClass(e[t - 1], e[t]);
|
| 215 |
+
break;
|
| 216 |
+
case 92:
|
| 217 |
+
this.$ = [e[t]];
|
| 218 |
+
break;
|
| 219 |
+
case 93:
|
| 220 |
+
e[t - 2].push(e[t]), this.$ = e[t - 2];
|
| 221 |
+
break;
|
| 222 |
+
case 95:
|
| 223 |
+
this.$ = e[t - 1] + e[t];
|
| 224 |
+
break;
|
| 225 |
+
}
|
| 226 |
+
}, "anonymous"),
|
| 227 |
+
table: [{ 3: 1, 4: 2, 5: 3, 6: 4, 7: [1, 6], 10: 5, 16: 39, 18: 21, 19: 40, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 33: i, 35: a, 37: u, 38: 22, 42: l, 43: 23, 46: r, 47: o, 49: A, 50: g, 52: k, 54: L, 55: Ae, 58: m, 60: fe, 61: ge, 62: Ce, 63: me, 73: be, 74: Ee, 76: ye, 80: Te, 81: ke, 84: b, 99: E, 101: y, 102: D }, { 1: [3] }, { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3] }, s(De, [2, 5], { 8: [1, 48] }), { 8: [1, 49] }, s(d, [2, 18], { 22: [1, 50] }), s(d, [2, 20]), s(d, [2, 21]), s(d, [2, 22]), s(d, [2, 23]), s(d, [2, 24]), s(d, [2, 25]), s(d, [2, 26]), s(d, [2, 27]), s(d, [2, 28]), s(d, [2, 29]), { 34: [1, 51] }, { 36: [1, 52] }, s(d, [2, 32]), s(d, [2, 48], { 51: 53, 64: 56, 65: 57, 13: [1, 54], 22: [1, 55], 66: ee, 67: te, 68: se, 69: ie, 70: ae, 71: Fe, 72: Be }), { 39: [1, 65] }, s(ne, [2, 39], { 39: [1, 67], 44: [1, 66] }), s(d, [2, 50]), s(d, [2, 51]), { 16: 68, 58: m, 84: b, 99: E, 101: y }, { 16: 39, 18: 69, 19: 40, 58: m, 84: b, 99: E, 101: y, 102: D }, { 16: 39, 18: 70, 19: 40, 58: m, 84: b, 99: E, 101: y, 102: D }, { 16: 39, 18: 71, 19: 40, 58: m, 84: b, 99: E, 101: y, 102: D }, { 58: [1, 72] }, { 13: [1, 73] }, { 16: 39, 18: 74, 19: 40, 58: m, 84: b, 99: E, 101: y, 102: D }, { 13: Pe, 53: 75 }, { 56: 77, 58: [1, 78] }, s(d, [2, 61]), s(d, [2, 62]), s(d, [2, 63]), s(d, [2, 64]), s(P, [2, 12], { 16: 39, 19: 40, 18: 80, 17: [1, 79], 20: [1, 81], 58: m, 84: b, 99: E, 101: y, 102: D }), s(P, [2, 14], { 20: [1, 82] }), { 15: 83, 16: 84, 58: m, 84: b, 99: E, 101: y }, { 16: 39, 18: 85, 19: 40, 58: m, 84: b, 99: E, 101: y, 102: D }, s(re, [2, 118]), s(re, [2, 119]), s(re, [2, 120]), s(re, [2, 121]), s([1, 8, 9, 12, 13, 20, 22, 39, 41, 44, 66, 67, 68, 69, 70, 71, 72, 77, 79], [2, 122]), s(De, [2, 6], { 10: 5, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 18: 21, 38: 22, 43: 23, 16: 39, 19: 40, 5: 86, 33: i, 35: a, 37: u, 42: l, 46: r, 47: o, 49: A, 50: g, 52: k, 54: L, 55: Ae, 58: m, 60: fe, 61: ge, 62: Ce, 63: me, 73: be, 74: Ee, 76: ye, 80: Te, 81: ke, 84: b, 99: E, 101: y, 102: D }), { 5: 87, 10: 5, 16: 39, 18: 21, 19: 40, 21: 7, 23: 8, 24: 9, 25: 10, 26: 11, 27: 12, 28: 13, 29: 14, 30: 15, 31: 16, 32: 17, 33: i, 35: a, 37: u, 38: 22, 42: l, 43: 23, 46: r, 47: o, 49: A, 50: g, 52: k, 54: L, 55: Ae, 58: m, 60: fe, 61: ge, 62: Ce, 63: me, 73: be, 74: Ee, 76: ye, 80: Te, 81: ke, 84: b, 99: E, 101: y, 102: D }, s(d, [2, 19]), s(d, [2, 30]), s(d, [2, 31]), { 13: [1, 89], 16: 39, 18: 88, 19: 40, 58: m, 84: b, 99: E, 101: y, 102: D }, { 51: 90, 64: 56, 65: 57, 66: ee, 67: te, 68: se, 69: ie, 70: ae, 71: Fe, 72: Be }, s(d, [2, 49]), { 65: 91, 71: Fe, 72: Be }, s(ue, [2, 68], { 64: 92, 66: ee, 67: te, 68: se, 69: ie, 70: ae }), s(z, [2, 69]), s(z, [2, 70]), s(z, [2, 71]), s(z, [2, 72]), s(z, [2, 73]), s(Me, [2, 74]), s(Me, [2, 75]), { 8: [1, 94], 24: 95, 40: 93, 43: 23, 46: r }, { 16: 96, 58: m, 84: b, 99: E, 101: y }, { 45: 97, 49: _e }, { 48: [1, 99] }, { 13: [1, 100] }, { 13: [1, 101] }, { 77: [1, 102], 79: [1, 103] }, { 22: K, 57: 104, 58: Y, 80: Q, 82: 105, 83: 106, 84: W, 85: j, 86: X, 87: q, 88: H, 89: J }, { 58: [1, 116] }, { 13: Pe, 53: 117 }, s(d, [2, 57]), s(d, [2, 123]), { 22: K, 57: 118, 58: Y, 59: [1, 119], 80: Q, 82: 105, 83: 106, 84: W, 85: j, 86: X, 87: q, 88: H, 89: J }, s(Re, [2, 59]), { 16: 39, 18: 120, 19: 40, 58: m, 84: b, 99: E, 101: y, 102: D }, s(P, [2, 15]), s(P, [2, 16]), s(P, [2, 17]), { 39: [2, 35] }, { 15: 122, 16: 84, 17: [1, 121], 39: [2, 9], 58: m, 84: b, 99: E, 101: y }, s(Se, [2, 43], { 11: 123, 12: [1, 124] }), s(De, [2, 7]), { 9: [1, 125] }, s(le, [2, 52]), { 16: 39, 18: 126, 19: 40, 58: m, 84: b, 99: E, 101: y, 102: D }, { 13: [1, 128], 16: 39, 18: 127, 19: 40, 58: m, 84: b, 99: E, 101: y, 102: D }, s(ue, [2, 67], { 64: 129, 66: ee, 67: te, 68: se, 69: ie, 70: ae }), s(ue, [2, 66]), { 41: [1, 130] }, { 24: 95, 40: 131, 43: 23, 46: r }, { 8: [1, 132], 41: [2, 36] }, s(ne, [2, 40], { 39: [1, 133] }), { 41: [1, 134] }, { 41: [2, 46], 45: 135, 49: _e }, { 16: 39, 18: 136, 19: 40, 58: m, 84: b, 99: E, 101: y, 102: D }, s(d, [2, 76], { 13: [1, 137] }), s(d, [2, 78], { 13: [1, 139], 75: [1, 138] }), s(d, [2, 82], { 13: [1, 140], 78: [1, 141] }), { 13: [1, 142] }, s(d, [2, 90], { 59: Ge }), s(Ue, [2, 92], { 83: 144, 22: K, 58: Y, 80: Q, 84: W, 85: j, 86: X, 87: q, 88: H, 89: J }), s(N, [2, 94]), s(N, [2, 96]), s(N, [2, 97]), s(N, [2, 98]), s(N, [2, 99]), s(N, [2, 100]), s(N, [2, 101]), s(N, [2, 102]), s(N, [2, 103]), s(N, [2, 104]), s(d, [2, 91]), s(d, [2, 56]), s(d, [2, 58], { 59: Ge }), { 58: [1, 145] }, s(P, [2, 13]), { 15: 146, 16: 84, 58: m, 84: b, 99: E, 101: y }, { 39: [2, 11] }, s(Se, [2, 44]), { 13: [1, 147] }, { 1: [2, 4] }, s(le, [2, 54]), s(le, [2, 53]), { 16: 39, 18: 148, 19: 40, 58: m, 84: b, 99: E, 101: y, 102: D }, s(ue, [2, 65]), s(d, [2, 33]), { 41: [1, 149] }, { 24: 95, 40: 150, 41: [2, 37], 43: 23, 46: r }, { 45: 151, 49: _e }, s(ne, [2, 41]), { 41: [2, 47] }, s(d, [2, 45]), s(d, [2, 77]), s(d, [2, 79]), s(d, [2, 80], { 75: [1, 152] }), s(d, [2, 83]), s(d, [2, 84], { 13: [1, 153] }), s(d, [2, 86], { 13: [1, 155], 75: [1, 154] }), { 22: K, 58: Y, 80: Q, 82: 156, 83: 106, 84: W, 85: j, 86: X, 87: q, 88: H, 89: J }, s(N, [2, 95]), s(Re, [2, 60]), { 39: [2, 10] }, { 14: [1, 157] }, s(le, [2, 55]), s(d, [2, 34]), { 41: [2, 38] }, { 41: [1, 158] }, s(d, [2, 81]), s(d, [2, 85]), s(d, [2, 87]), s(d, [2, 88], { 75: [1, 159] }), s(Ue, [2, 93], { 83: 144, 22: K, 58: Y, 80: Q, 84: W, 85: j, 86: X, 87: q, 88: H, 89: J }), s(Se, [2, 8]), s(ne, [2, 42]), s(d, [2, 89])],
|
| 228 |
+
defaultActions: { 2: [2, 1], 3: [2, 2], 4: [2, 3], 83: [2, 35], 122: [2, 11], 125: [2, 4], 135: [2, 47], 146: [2, 10], 150: [2, 38] },
|
| 229 |
+
parseError: /* @__PURE__ */ f(function(c, h) {
|
| 230 |
+
if (h.recoverable)
|
| 231 |
+
this.trace(c);
|
| 232 |
+
else {
|
| 233 |
+
var p = new Error(c);
|
| 234 |
+
throw p.hash = h, p;
|
| 235 |
+
}
|
| 236 |
+
}, "parseError"),
|
| 237 |
+
parse: /* @__PURE__ */ f(function(c) {
|
| 238 |
+
var h = this, p = [0], n = [], C = [null], e = [], Z = this.table, t = "", oe = 0, ze = 0, He = 2, Ke = 1, Je = e.slice.call(arguments, 1), T = Object.create(this.lexer), O = { yy: {} };
|
| 239 |
+
for (var Le in this.yy)
|
| 240 |
+
Object.prototype.hasOwnProperty.call(this.yy, Le) && (O.yy[Le] = this.yy[Le]);
|
| 241 |
+
T.setInput(c, O.yy), O.yy.lexer = T, O.yy.parser = this, typeof T.yylloc > "u" && (T.yylloc = {});
|
| 242 |
+
var xe = T.yylloc;
|
| 243 |
+
e.push(xe);
|
| 244 |
+
var Ze = T.options && T.options.ranges;
|
| 245 |
+
typeof O.yy.parseError == "function" ? this.parseError = O.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
| 246 |
+
function $e(_) {
|
| 247 |
+
p.length = p.length - 2 * _, C.length = C.length - _, e.length = e.length - _;
|
| 248 |
+
}
|
| 249 |
+
f($e, "popStack");
|
| 250 |
+
function Ye() {
|
| 251 |
+
var _;
|
| 252 |
+
return _ = n.pop() || T.lex() || Ke, typeof _ != "number" && (_ instanceof Array && (n = _, _ = n.pop()), _ = h.symbols_[_] || _), _;
|
| 253 |
+
}
|
| 254 |
+
f(Ye, "lex");
|
| 255 |
+
for (var B, w, S, ve, M = {}, he, x, Qe, de; ; ) {
|
| 256 |
+
if (w = p[p.length - 1], this.defaultActions[w] ? S = this.defaultActions[w] : ((B === null || typeof B > "u") && (B = Ye()), S = Z[w] && Z[w][B]), typeof S > "u" || !S.length || !S[0]) {
|
| 257 |
+
var Ie = "";
|
| 258 |
+
de = [];
|
| 259 |
+
for (he in Z[w])
|
| 260 |
+
this.terminals_[he] && he > He && de.push("'" + this.terminals_[he] + "'");
|
| 261 |
+
T.showPosition ? Ie = "Parse error on line " + (oe + 1) + `:
|
| 262 |
+
` + T.showPosition() + `
|
| 263 |
+
Expecting ` + de.join(", ") + ", got '" + (this.terminals_[B] || B) + "'" : Ie = "Parse error on line " + (oe + 1) + ": Unexpected " + (B == Ke ? "end of input" : "'" + (this.terminals_[B] || B) + "'"), this.parseError(Ie, {
|
| 264 |
+
text: T.match,
|
| 265 |
+
token: this.terminals_[B] || B,
|
| 266 |
+
line: T.yylineno,
|
| 267 |
+
loc: xe,
|
| 268 |
+
expected: de
|
| 269 |
+
});
|
| 270 |
+
}
|
| 271 |
+
if (S[0] instanceof Array && S.length > 1)
|
| 272 |
+
throw new Error("Parse Error: multiple actions possible at state: " + w + ", token: " + B);
|
| 273 |
+
switch (S[0]) {
|
| 274 |
+
case 1:
|
| 275 |
+
p.push(B), C.push(T.yytext), e.push(T.yylloc), p.push(S[1]), B = null, ze = T.yyleng, t = T.yytext, oe = T.yylineno, xe = T.yylloc;
|
| 276 |
+
break;
|
| 277 |
+
case 2:
|
| 278 |
+
if (x = this.productions_[S[1]][1], M.$ = C[C.length - x], M._$ = {
|
| 279 |
+
first_line: e[e.length - (x || 1)].first_line,
|
| 280 |
+
last_line: e[e.length - 1].last_line,
|
| 281 |
+
first_column: e[e.length - (x || 1)].first_column,
|
| 282 |
+
last_column: e[e.length - 1].last_column
|
| 283 |
+
}, Ze && (M._$.range = [
|
| 284 |
+
e[e.length - (x || 1)].range[0],
|
| 285 |
+
e[e.length - 1].range[1]
|
| 286 |
+
]), ve = this.performAction.apply(M, [
|
| 287 |
+
t,
|
| 288 |
+
ze,
|
| 289 |
+
oe,
|
| 290 |
+
O.yy,
|
| 291 |
+
S[1],
|
| 292 |
+
C,
|
| 293 |
+
e
|
| 294 |
+
].concat(Je)), typeof ve < "u")
|
| 295 |
+
return ve;
|
| 296 |
+
x && (p = p.slice(0, -1 * x * 2), C = C.slice(0, -1 * x), e = e.slice(0, -1 * x)), p.push(this.productions_[S[1]][0]), C.push(M.$), e.push(M._$), Qe = Z[p[p.length - 2]][p[p.length - 1]], p.push(Qe);
|
| 297 |
+
break;
|
| 298 |
+
case 3:
|
| 299 |
+
return !0;
|
| 300 |
+
}
|
| 301 |
+
}
|
| 302 |
+
return !0;
|
| 303 |
+
}, "parse")
|
| 304 |
+
}, qe = /* @__PURE__ */ function() {
|
| 305 |
+
var I = {
|
| 306 |
+
EOF: 1,
|
| 307 |
+
parseError: /* @__PURE__ */ f(function(h, p) {
|
| 308 |
+
if (this.yy.parser)
|
| 309 |
+
this.yy.parser.parseError(h, p);
|
| 310 |
+
else
|
| 311 |
+
throw new Error(h);
|
| 312 |
+
}, "parseError"),
|
| 313 |
+
// resets the lexer, sets new input
|
| 314 |
+
setInput: /* @__PURE__ */ f(function(c, h) {
|
| 315 |
+
return this.yy = h || this.yy || {}, this._input = c, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
| 316 |
+
first_line: 1,
|
| 317 |
+
first_column: 0,
|
| 318 |
+
last_line: 1,
|
| 319 |
+
last_column: 0
|
| 320 |
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
| 321 |
+
}, "setInput"),
|
| 322 |
+
// consumes and returns one char from the input
|
| 323 |
+
input: /* @__PURE__ */ f(function() {
|
| 324 |
+
var c = this._input[0];
|
| 325 |
+
this.yytext += c, this.yyleng++, this.offset++, this.match += c, this.matched += c;
|
| 326 |
+
var h = c.match(/(?:\r\n?|\n).*/g);
|
| 327 |
+
return h ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), c;
|
| 328 |
+
}, "input"),
|
| 329 |
+
// unshifts one char (or a string) into the input
|
| 330 |
+
unput: /* @__PURE__ */ f(function(c) {
|
| 331 |
+
var h = c.length, p = c.split(/(?:\r\n?|\n)/g);
|
| 332 |
+
this._input = c + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - h), this.offset -= h;
|
| 333 |
+
var n = this.match.split(/(?:\r\n?|\n)/g);
|
| 334 |
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), p.length - 1 && (this.yylineno -= p.length - 1);
|
| 335 |
+
var C = this.yylloc.range;
|
| 336 |
+
return this.yylloc = {
|
| 337 |
+
first_line: this.yylloc.first_line,
|
| 338 |
+
last_line: this.yylineno + 1,
|
| 339 |
+
first_column: this.yylloc.first_column,
|
| 340 |
+
last_column: p ? (p.length === n.length ? this.yylloc.first_column : 0) + n[n.length - p.length].length - p[0].length : this.yylloc.first_column - h
|
| 341 |
+
}, this.options.ranges && (this.yylloc.range = [C[0], C[0] + this.yyleng - h]), this.yyleng = this.yytext.length, this;
|
| 342 |
+
}, "unput"),
|
| 343 |
+
// When called from action, caches matched text and appends it on next action
|
| 344 |
+
more: /* @__PURE__ */ f(function() {
|
| 345 |
+
return this._more = !0, this;
|
| 346 |
+
}, "more"),
|
| 347 |
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
| 348 |
+
reject: /* @__PURE__ */ f(function() {
|
| 349 |
+
if (this.options.backtrack_lexer)
|
| 350 |
+
this._backtrack = !0;
|
| 351 |
+
else
|
| 352 |
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
| 353 |
+
` + this.showPosition(), {
|
| 354 |
+
text: "",
|
| 355 |
+
token: null,
|
| 356 |
+
line: this.yylineno
|
| 357 |
+
});
|
| 358 |
+
return this;
|
| 359 |
+
}, "reject"),
|
| 360 |
+
// retain first n characters of the match
|
| 361 |
+
less: /* @__PURE__ */ f(function(c) {
|
| 362 |
+
this.unput(this.match.slice(c));
|
| 363 |
+
}, "less"),
|
| 364 |
+
// displays already matched input, i.e. for error messages
|
| 365 |
+
pastInput: /* @__PURE__ */ f(function() {
|
| 366 |
+
var c = this.matched.substr(0, this.matched.length - this.match.length);
|
| 367 |
+
return (c.length > 20 ? "..." : "") + c.substr(-20).replace(/\n/g, "");
|
| 368 |
+
}, "pastInput"),
|
| 369 |
+
// displays upcoming input, i.e. for error messages
|
| 370 |
+
upcomingInput: /* @__PURE__ */ f(function() {
|
| 371 |
+
var c = this.match;
|
| 372 |
+
return c.length < 20 && (c += this._input.substr(0, 20 - c.length)), (c.substr(0, 20) + (c.length > 20 ? "..." : "")).replace(/\n/g, "");
|
| 373 |
+
}, "upcomingInput"),
|
| 374 |
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
| 375 |
+
showPosition: /* @__PURE__ */ f(function() {
|
| 376 |
+
var c = this.pastInput(), h = new Array(c.length + 1).join("-");
|
| 377 |
+
return c + this.upcomingInput() + `
|
| 378 |
+
` + h + "^";
|
| 379 |
+
}, "showPosition"),
|
| 380 |
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
| 381 |
+
test_match: /* @__PURE__ */ f(function(c, h) {
|
| 382 |
+
var p, n, C;
|
| 383 |
+
if (this.options.backtrack_lexer && (C = {
|
| 384 |
+
yylineno: this.yylineno,
|
| 385 |
+
yylloc: {
|
| 386 |
+
first_line: this.yylloc.first_line,
|
| 387 |
+
last_line: this.last_line,
|
| 388 |
+
first_column: this.yylloc.first_column,
|
| 389 |
+
last_column: this.yylloc.last_column
|
| 390 |
+
},
|
| 391 |
+
yytext: this.yytext,
|
| 392 |
+
match: this.match,
|
| 393 |
+
matches: this.matches,
|
| 394 |
+
matched: this.matched,
|
| 395 |
+
yyleng: this.yyleng,
|
| 396 |
+
offset: this.offset,
|
| 397 |
+
_more: this._more,
|
| 398 |
+
_input: this._input,
|
| 399 |
+
yy: this.yy,
|
| 400 |
+
conditionStack: this.conditionStack.slice(0),
|
| 401 |
+
done: this.done
|
| 402 |
+
}, this.options.ranges && (C.yylloc.range = this.yylloc.range.slice(0))), n = c[0].match(/(?:\r\n?|\n).*/g), n && (this.yylineno += n.length), this.yylloc = {
|
| 403 |
+
first_line: this.yylloc.last_line,
|
| 404 |
+
last_line: this.yylineno + 1,
|
| 405 |
+
first_column: this.yylloc.last_column,
|
| 406 |
+
last_column: n ? n[n.length - 1].length - n[n.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + c[0].length
|
| 407 |
+
}, this.yytext += c[0], this.match += c[0], this.matches = c, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(c[0].length), this.matched += c[0], p = this.performAction.call(this, this.yy, this, h, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), p)
|
| 408 |
+
return p;
|
| 409 |
+
if (this._backtrack) {
|
| 410 |
+
for (var e in C)
|
| 411 |
+
this[e] = C[e];
|
| 412 |
+
return !1;
|
| 413 |
+
}
|
| 414 |
+
return !1;
|
| 415 |
+
}, "test_match"),
|
| 416 |
+
// return next match in input
|
| 417 |
+
next: /* @__PURE__ */ f(function() {
|
| 418 |
+
if (this.done)
|
| 419 |
+
return this.EOF;
|
| 420 |
+
this._input || (this.done = !0);
|
| 421 |
+
var c, h, p, n;
|
| 422 |
+
this._more || (this.yytext = "", this.match = "");
|
| 423 |
+
for (var C = this._currentRules(), e = 0; e < C.length; e++)
|
| 424 |
+
if (p = this._input.match(this.rules[C[e]]), p && (!h || p[0].length > h[0].length)) {
|
| 425 |
+
if (h = p, n = e, this.options.backtrack_lexer) {
|
| 426 |
+
if (c = this.test_match(p, C[e]), c !== !1)
|
| 427 |
+
return c;
|
| 428 |
+
if (this._backtrack) {
|
| 429 |
+
h = !1;
|
| 430 |
+
continue;
|
| 431 |
+
} else
|
| 432 |
+
return !1;
|
| 433 |
+
} else if (!this.options.flex)
|
| 434 |
+
break;
|
| 435 |
+
}
|
| 436 |
+
return h ? (c = this.test_match(h, C[n]), c !== !1 ? c : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
| 437 |
+
` + this.showPosition(), {
|
| 438 |
+
text: "",
|
| 439 |
+
token: null,
|
| 440 |
+
line: this.yylineno
|
| 441 |
+
});
|
| 442 |
+
}, "next"),
|
| 443 |
+
// return next match that has a token
|
| 444 |
+
lex: /* @__PURE__ */ f(function() {
|
| 445 |
+
var h = this.next();
|
| 446 |
+
return h || this.lex();
|
| 447 |
+
}, "lex"),
|
| 448 |
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
| 449 |
+
begin: /* @__PURE__ */ f(function(h) {
|
| 450 |
+
this.conditionStack.push(h);
|
| 451 |
+
}, "begin"),
|
| 452 |
+
// pop the previously active lexer condition state off the condition stack
|
| 453 |
+
popState: /* @__PURE__ */ f(function() {
|
| 454 |
+
var h = this.conditionStack.length - 1;
|
| 455 |
+
return h > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
| 456 |
+
}, "popState"),
|
| 457 |
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
| 458 |
+
_currentRules: /* @__PURE__ */ f(function() {
|
| 459 |
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
| 460 |
+
}, "_currentRules"),
|
| 461 |
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
| 462 |
+
topState: /* @__PURE__ */ f(function(h) {
|
| 463 |
+
return h = this.conditionStack.length - 1 - Math.abs(h || 0), h >= 0 ? this.conditionStack[h] : "INITIAL";
|
| 464 |
+
}, "topState"),
|
| 465 |
+
// alias for begin(condition)
|
| 466 |
+
pushState: /* @__PURE__ */ f(function(h) {
|
| 467 |
+
this.begin(h);
|
| 468 |
+
}, "pushState"),
|
| 469 |
+
// return the number of states currently on the stack
|
| 470 |
+
stateStackSize: /* @__PURE__ */ f(function() {
|
| 471 |
+
return this.conditionStack.length;
|
| 472 |
+
}, "stateStackSize"),
|
| 473 |
+
options: {},
|
| 474 |
+
performAction: /* @__PURE__ */ f(function(h, p, n, C) {
|
| 475 |
+
switch (n) {
|
| 476 |
+
case 0:
|
| 477 |
+
return 60;
|
| 478 |
+
case 1:
|
| 479 |
+
return 61;
|
| 480 |
+
case 2:
|
| 481 |
+
return 62;
|
| 482 |
+
case 3:
|
| 483 |
+
return 63;
|
| 484 |
+
case 4:
|
| 485 |
+
break;
|
| 486 |
+
case 5:
|
| 487 |
+
break;
|
| 488 |
+
case 6:
|
| 489 |
+
return this.begin("acc_title"), 33;
|
| 490 |
+
case 7:
|
| 491 |
+
return this.popState(), "acc_title_value";
|
| 492 |
+
case 8:
|
| 493 |
+
return this.begin("acc_descr"), 35;
|
| 494 |
+
case 9:
|
| 495 |
+
return this.popState(), "acc_descr_value";
|
| 496 |
+
case 10:
|
| 497 |
+
this.begin("acc_descr_multiline");
|
| 498 |
+
break;
|
| 499 |
+
case 11:
|
| 500 |
+
this.popState();
|
| 501 |
+
break;
|
| 502 |
+
case 12:
|
| 503 |
+
return "acc_descr_multiline_value";
|
| 504 |
+
case 13:
|
| 505 |
+
return 8;
|
| 506 |
+
case 14:
|
| 507 |
+
break;
|
| 508 |
+
case 15:
|
| 509 |
+
return 7;
|
| 510 |
+
case 16:
|
| 511 |
+
return 7;
|
| 512 |
+
case 17:
|
| 513 |
+
return "EDGE_STATE";
|
| 514 |
+
case 18:
|
| 515 |
+
this.begin("callback_name");
|
| 516 |
+
break;
|
| 517 |
+
case 19:
|
| 518 |
+
this.popState();
|
| 519 |
+
break;
|
| 520 |
+
case 20:
|
| 521 |
+
this.popState(), this.begin("callback_args");
|
| 522 |
+
break;
|
| 523 |
+
case 21:
|
| 524 |
+
return 77;
|
| 525 |
+
case 22:
|
| 526 |
+
this.popState();
|
| 527 |
+
break;
|
| 528 |
+
case 23:
|
| 529 |
+
return 78;
|
| 530 |
+
case 24:
|
| 531 |
+
this.popState();
|
| 532 |
+
break;
|
| 533 |
+
case 25:
|
| 534 |
+
return "STR";
|
| 535 |
+
case 26:
|
| 536 |
+
this.begin("string");
|
| 537 |
+
break;
|
| 538 |
+
case 27:
|
| 539 |
+
return 80;
|
| 540 |
+
case 28:
|
| 541 |
+
return 55;
|
| 542 |
+
case 29:
|
| 543 |
+
return this.begin("namespace"), 42;
|
| 544 |
+
case 30:
|
| 545 |
+
return this.popState(), 8;
|
| 546 |
+
case 31:
|
| 547 |
+
break;
|
| 548 |
+
case 32:
|
| 549 |
+
return this.begin("namespace-body"), 39;
|
| 550 |
+
case 33:
|
| 551 |
+
return this.popState(), 41;
|
| 552 |
+
case 34:
|
| 553 |
+
return "EOF_IN_STRUCT";
|
| 554 |
+
case 35:
|
| 555 |
+
return 8;
|
| 556 |
+
case 36:
|
| 557 |
+
break;
|
| 558 |
+
case 37:
|
| 559 |
+
return "EDGE_STATE";
|
| 560 |
+
case 38:
|
| 561 |
+
return this.begin("class"), 46;
|
| 562 |
+
case 39:
|
| 563 |
+
return this.popState(), 8;
|
| 564 |
+
case 40:
|
| 565 |
+
break;
|
| 566 |
+
case 41:
|
| 567 |
+
return this.popState(), this.popState(), 41;
|
| 568 |
+
case 42:
|
| 569 |
+
return this.begin("class-body"), 39;
|
| 570 |
+
case 43:
|
| 571 |
+
return this.popState(), 41;
|
| 572 |
+
case 44:
|
| 573 |
+
return "EOF_IN_STRUCT";
|
| 574 |
+
case 45:
|
| 575 |
+
return "EDGE_STATE";
|
| 576 |
+
case 46:
|
| 577 |
+
return "OPEN_IN_STRUCT";
|
| 578 |
+
case 47:
|
| 579 |
+
break;
|
| 580 |
+
case 48:
|
| 581 |
+
return "MEMBER";
|
| 582 |
+
case 49:
|
| 583 |
+
return 81;
|
| 584 |
+
case 50:
|
| 585 |
+
return 73;
|
| 586 |
+
case 51:
|
| 587 |
+
return 74;
|
| 588 |
+
case 52:
|
| 589 |
+
return 76;
|
| 590 |
+
case 53:
|
| 591 |
+
return 52;
|
| 592 |
+
case 54:
|
| 593 |
+
return 54;
|
| 594 |
+
case 55:
|
| 595 |
+
return 47;
|
| 596 |
+
case 56:
|
| 597 |
+
return 48;
|
| 598 |
+
case 57:
|
| 599 |
+
return 79;
|
| 600 |
+
case 58:
|
| 601 |
+
this.popState();
|
| 602 |
+
break;
|
| 603 |
+
case 59:
|
| 604 |
+
return "GENERICTYPE";
|
| 605 |
+
case 60:
|
| 606 |
+
this.begin("generic");
|
| 607 |
+
break;
|
| 608 |
+
case 61:
|
| 609 |
+
this.popState();
|
| 610 |
+
break;
|
| 611 |
+
case 62:
|
| 612 |
+
return "BQUOTE_STR";
|
| 613 |
+
case 63:
|
| 614 |
+
this.begin("bqstring");
|
| 615 |
+
break;
|
| 616 |
+
case 64:
|
| 617 |
+
return 75;
|
| 618 |
+
case 65:
|
| 619 |
+
return 75;
|
| 620 |
+
case 66:
|
| 621 |
+
return 75;
|
| 622 |
+
case 67:
|
| 623 |
+
return 75;
|
| 624 |
+
case 68:
|
| 625 |
+
return 67;
|
| 626 |
+
case 69:
|
| 627 |
+
return 67;
|
| 628 |
+
case 70:
|
| 629 |
+
return 69;
|
| 630 |
+
case 71:
|
| 631 |
+
return 69;
|
| 632 |
+
case 72:
|
| 633 |
+
return 68;
|
| 634 |
+
case 73:
|
| 635 |
+
return 66;
|
| 636 |
+
case 74:
|
| 637 |
+
return 70;
|
| 638 |
+
case 75:
|
| 639 |
+
return 71;
|
| 640 |
+
case 76:
|
| 641 |
+
return 72;
|
| 642 |
+
case 77:
|
| 643 |
+
return 22;
|
| 644 |
+
case 78:
|
| 645 |
+
return 44;
|
| 646 |
+
case 79:
|
| 647 |
+
return 99;
|
| 648 |
+
case 80:
|
| 649 |
+
return 17;
|
| 650 |
+
case 81:
|
| 651 |
+
return "PLUS";
|
| 652 |
+
case 82:
|
| 653 |
+
return 85;
|
| 654 |
+
case 83:
|
| 655 |
+
return 59;
|
| 656 |
+
case 84:
|
| 657 |
+
return 88;
|
| 658 |
+
case 85:
|
| 659 |
+
return 88;
|
| 660 |
+
case 86:
|
| 661 |
+
return 89;
|
| 662 |
+
case 87:
|
| 663 |
+
return "EQUALS";
|
| 664 |
+
case 88:
|
| 665 |
+
return "EQUALS";
|
| 666 |
+
case 89:
|
| 667 |
+
return 58;
|
| 668 |
+
case 90:
|
| 669 |
+
return 12;
|
| 670 |
+
case 91:
|
| 671 |
+
return 14;
|
| 672 |
+
case 92:
|
| 673 |
+
return "PUNCTUATION";
|
| 674 |
+
case 93:
|
| 675 |
+
return 84;
|
| 676 |
+
case 94:
|
| 677 |
+
return 101;
|
| 678 |
+
case 95:
|
| 679 |
+
return 87;
|
| 680 |
+
case 96:
|
| 681 |
+
return 87;
|
| 682 |
+
case 97:
|
| 683 |
+
return 9;
|
| 684 |
+
}
|
| 685 |
+
}, "anonymous"),
|
| 686 |
+
rules: [/^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/, /^(?:%%[^\n]*(\r?\n)*)/, /^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:classDiagram-v2\b)/, /^(?:classDiagram\b)/, /^(?:\[\*\])/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:["])/, /^(?:[^"]*)/, /^(?:["])/, /^(?:style\b)/, /^(?:classDef\b)/, /^(?:namespace\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:\[\*\])/, /^(?:class\b)/, /^(?:\s*(\r?\n)+)/, /^(?:\s+)/, /^(?:[}])/, /^(?:[{])/, /^(?:[}])/, /^(?:$)/, /^(?:\[\*\])/, /^(?:[{])/, /^(?:[\n])/, /^(?:[^{}\n]*)/, /^(?:cssClass\b)/, /^(?:callback\b)/, /^(?:link\b)/, /^(?:click\b)/, /^(?:note for\b)/, /^(?:note\b)/, /^(?:<<)/, /^(?:>>)/, /^(?: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)/, /^(?:$)/],
|
| 687 |
+
conditions: { "namespace-body": { rules: [26, 33, 34, 35, 36, 37, 38, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, namespace: { rules: [26, 29, 30, 31, 32, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, "class-body": { rules: [26, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, class: { rules: [26, 39, 40, 41, 42, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, acc_descr_multiline: { rules: [11, 12, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, acc_descr: { rules: [9, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, acc_title: { rules: [7, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, callback_args: { rules: [22, 23, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, callback_name: { rules: [19, 20, 21, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, href: { rules: [26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, struct: { rules: [26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, generic: { rules: [26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, bqstring: { rules: [26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, string: { rules: [24, 25, 26, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 97], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 8, 10, 13, 14, 15, 16, 17, 18, 26, 27, 28, 29, 38, 49, 50, 51, 52, 53, 54, 55, 56, 57, 60, 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, 97], inclusive: !0 } }
|
| 688 |
+
};
|
| 689 |
+
return I;
|
| 690 |
+
}();
|
| 691 |
+
Ne.lexer = qe;
|
| 692 |
+
function ce() {
|
| 693 |
+
this.yy = {};
|
| 694 |
+
}
|
| 695 |
+
return f(ce, "Parser"), ce.prototype = Ne, Ne.Parser = ce, new ce();
|
| 696 |
+
}();
|
| 697 |
+
Ve.parser = Ve;
|
| 698 |
+
var yt = Ve, We = ["#", "+", "~", "-", ""], G, je = (G = class {
|
| 699 |
+
constructor(i, a) {
|
| 700 |
+
this.memberType = a, this.visibility = "", this.classifier = "", this.text = "";
|
| 701 |
+
const u = pt(i, F());
|
| 702 |
+
this.parseMember(u);
|
| 703 |
+
}
|
| 704 |
+
getDisplayDetails() {
|
| 705 |
+
let i = this.visibility + R(this.id);
|
| 706 |
+
this.memberType === "method" && (i += `(${R(this.parameters.trim())})`, this.returnType && (i += " : " + R(this.returnType))), i = i.trim();
|
| 707 |
+
const a = this.parseClassifier();
|
| 708 |
+
return {
|
| 709 |
+
displayText: i,
|
| 710 |
+
cssStyle: a
|
| 711 |
+
};
|
| 712 |
+
}
|
| 713 |
+
parseMember(i) {
|
| 714 |
+
let a = "";
|
| 715 |
+
if (this.memberType === "method") {
|
| 716 |
+
const r = /([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(i);
|
| 717 |
+
if (r) {
|
| 718 |
+
const o = r[1] ? r[1].trim() : "";
|
| 719 |
+
if (We.includes(o) && (this.visibility = o), this.id = r[2], this.parameters = r[3] ? r[3].trim() : "", a = r[4] ? r[4].trim() : "", this.returnType = r[5] ? r[5].trim() : "", a === "") {
|
| 720 |
+
const A = this.returnType.substring(this.returnType.length - 1);
|
| 721 |
+
/[$*]/.exec(A) && (a = A, this.returnType = this.returnType.substring(0, this.returnType.length - 1));
|
| 722 |
+
}
|
| 723 |
+
}
|
| 724 |
+
} else {
|
| 725 |
+
const l = i.length, r = i.substring(0, 1), o = i.substring(l - 1);
|
| 726 |
+
We.includes(r) && (this.visibility = r), /[$*]/.exec(o) && (a = o), this.id = i.substring(
|
| 727 |
+
this.visibility === "" ? 0 : 1,
|
| 728 |
+
a === "" ? l : l - 1
|
| 729 |
+
);
|
| 730 |
+
}
|
| 731 |
+
this.classifier = a, this.id = this.id.startsWith(" ") ? " " + this.id.trim() : this.id.trim();
|
| 732 |
+
const u = `${this.visibility ? "\\" + this.visibility : ""}${R(this.id)}${this.memberType === "method" ? `(${R(this.parameters)})${this.returnType ? " : " + R(this.returnType) : ""}` : ""}`;
|
| 733 |
+
this.text = u.replaceAll("<", "<").replaceAll(">", ">"), this.text.startsWith("\\<") && (this.text = this.text.replace("\\<", "~"));
|
| 734 |
+
}
|
| 735 |
+
parseClassifier() {
|
| 736 |
+
switch (this.classifier) {
|
| 737 |
+
case "*":
|
| 738 |
+
return "font-style:italic;";
|
| 739 |
+
case "$":
|
| 740 |
+
return "text-decoration:underline;";
|
| 741 |
+
default:
|
| 742 |
+
return "";
|
| 743 |
+
}
|
| 744 |
+
}
|
| 745 |
+
}, f(G, "ClassMember"), G), pe = "classId-", Xe = 0, V = /* @__PURE__ */ f((s) => v.sanitizeText(s, F()), "sanitizeText"), U, Tt = (U = class {
|
| 746 |
+
constructor() {
|
| 747 |
+
this.relations = [], this.classes = /* @__PURE__ */ new Map(), this.styleClasses = /* @__PURE__ */ new Map(), this.notes = [], this.interfaces = [], this.namespaces = /* @__PURE__ */ new Map(), this.namespaceCounter = 0, this.functions = [], this.lineType = {
|
| 748 |
+
LINE: 0,
|
| 749 |
+
DOTTED_LINE: 1
|
| 750 |
+
}, this.relationType = {
|
| 751 |
+
AGGREGATION: 0,
|
| 752 |
+
EXTENSION: 1,
|
| 753 |
+
COMPOSITION: 2,
|
| 754 |
+
DEPENDENCY: 3,
|
| 755 |
+
LOLLIPOP: 4
|
| 756 |
+
}, this.setupToolTips = /* @__PURE__ */ f((i) => {
|
| 757 |
+
let a = $(".mermaidTooltip");
|
| 758 |
+
(a._groups || a)[0][0] === null && (a = $("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), $(i).select("svg").selectAll("g.node").on("mouseover", (r) => {
|
| 759 |
+
const o = $(r.currentTarget);
|
| 760 |
+
if (o.attr("title") === null)
|
| 761 |
+
return;
|
| 762 |
+
const g = this.getBoundingClientRect();
|
| 763 |
+
a.transition().duration(200).style("opacity", ".9"), a.text(o.attr("title")).style("left", window.scrollX + g.left + (g.right - g.left) / 2 + "px").style("top", window.scrollY + g.top - 14 + document.body.scrollTop + "px"), a.html(a.html().replace(/<br\/>/g, "<br/>")), o.classed("hover", !0);
|
| 764 |
+
}).on("mouseout", (r) => {
|
| 765 |
+
a.transition().duration(500).style("opacity", 0), $(r.currentTarget).classed("hover", !1);
|
| 766 |
+
});
|
| 767 |
+
}, "setupToolTips"), this.direction = "TB", this.setAccTitle = nt, this.getAccTitle = rt, this.setAccDescription = ut, this.getAccDescription = lt, this.setDiagramTitle = ct, this.getDiagramTitle = ot, this.getConfig = /* @__PURE__ */ f(() => F().class, "getConfig"), this.functions.push(this.setupToolTips.bind(this)), this.clear(), this.addRelation = this.addRelation.bind(this), this.addClassesToNamespace = this.addClassesToNamespace.bind(this), this.addNamespace = this.addNamespace.bind(this), this.setCssClass = this.setCssClass.bind(this), this.addMembers = this.addMembers.bind(this), this.addClass = this.addClass.bind(this), this.setClassLabel = this.setClassLabel.bind(this), this.addAnnotation = this.addAnnotation.bind(this), this.addMember = this.addMember.bind(this), this.cleanupLabel = this.cleanupLabel.bind(this), this.addNote = this.addNote.bind(this), this.defineClass = this.defineClass.bind(this), this.setDirection = this.setDirection.bind(this), this.setLink = this.setLink.bind(this), this.bindFunctions = this.bindFunctions.bind(this), this.clear = this.clear.bind(this), this.setTooltip = this.setTooltip.bind(this), this.setClickEvent = this.setClickEvent.bind(this), this.setCssStyle = this.setCssStyle.bind(this);
|
| 768 |
+
}
|
| 769 |
+
splitClassNameAndType(i) {
|
| 770 |
+
const a = v.sanitizeText(i, F());
|
| 771 |
+
let u = "", l = a;
|
| 772 |
+
if (a.indexOf("~") > 0) {
|
| 773 |
+
const r = a.split("~");
|
| 774 |
+
l = V(r[0]), u = V(r[1]);
|
| 775 |
+
}
|
| 776 |
+
return { className: l, type: u };
|
| 777 |
+
}
|
| 778 |
+
setClassLabel(i, a) {
|
| 779 |
+
const u = v.sanitizeText(i, F());
|
| 780 |
+
a && (a = V(a));
|
| 781 |
+
const { className: l } = this.splitClassNameAndType(u);
|
| 782 |
+
this.classes.get(l).label = a, this.classes.get(l).text = `${a}${this.classes.get(l).type ? `<${this.classes.get(l).type}>` : ""}`;
|
| 783 |
+
}
|
| 784 |
+
/**
|
| 785 |
+
* Function called by parser when a node definition has been found.
|
| 786 |
+
*
|
| 787 |
+
* @param id - ID of the class to add
|
| 788 |
+
* @public
|
| 789 |
+
*/
|
| 790 |
+
addClass(i) {
|
| 791 |
+
const a = v.sanitizeText(i, F()), { className: u, type: l } = this.splitClassNameAndType(a);
|
| 792 |
+
if (this.classes.has(u))
|
| 793 |
+
return;
|
| 794 |
+
const r = v.sanitizeText(u, F());
|
| 795 |
+
this.classes.set(r, {
|
| 796 |
+
id: r,
|
| 797 |
+
type: l,
|
| 798 |
+
label: r,
|
| 799 |
+
text: `${r}${l ? `<${l}>` : ""}`,
|
| 800 |
+
shape: "classBox",
|
| 801 |
+
cssClasses: "default",
|
| 802 |
+
methods: [],
|
| 803 |
+
members: [],
|
| 804 |
+
annotations: [],
|
| 805 |
+
styles: [],
|
| 806 |
+
domId: pe + r + "-" + Xe
|
| 807 |
+
}), Xe++;
|
| 808 |
+
}
|
| 809 |
+
addInterface(i, a) {
|
| 810 |
+
const u = {
|
| 811 |
+
id: `interface${this.interfaces.length}`,
|
| 812 |
+
label: i,
|
| 813 |
+
classId: a
|
| 814 |
+
};
|
| 815 |
+
this.interfaces.push(u);
|
| 816 |
+
}
|
| 817 |
+
/**
|
| 818 |
+
* Function to lookup domId from id in the graph definition.
|
| 819 |
+
*
|
| 820 |
+
* @param id - class ID to lookup
|
| 821 |
+
* @public
|
| 822 |
+
*/
|
| 823 |
+
lookUpDomId(i) {
|
| 824 |
+
const a = v.sanitizeText(i, F());
|
| 825 |
+
if (this.classes.has(a))
|
| 826 |
+
return this.classes.get(a).domId;
|
| 827 |
+
throw new Error("Class not found: " + a);
|
| 828 |
+
}
|
| 829 |
+
clear() {
|
| 830 |
+
this.relations = [], this.classes = /* @__PURE__ */ new Map(), this.notes = [], this.interfaces = [], this.functions = [], this.functions.push(this.setupToolTips.bind(this)), this.namespaces = /* @__PURE__ */ new Map(), this.namespaceCounter = 0, this.direction = "TB", ht();
|
| 831 |
+
}
|
| 832 |
+
getClass(i) {
|
| 833 |
+
return this.classes.get(i);
|
| 834 |
+
}
|
| 835 |
+
getClasses() {
|
| 836 |
+
return this.classes;
|
| 837 |
+
}
|
| 838 |
+
getRelations() {
|
| 839 |
+
return this.relations;
|
| 840 |
+
}
|
| 841 |
+
getNotes() {
|
| 842 |
+
return this.notes;
|
| 843 |
+
}
|
| 844 |
+
addRelation(i) {
|
| 845 |
+
Oe.debug("Adding relation: " + JSON.stringify(i));
|
| 846 |
+
const a = [
|
| 847 |
+
this.relationType.LOLLIPOP,
|
| 848 |
+
this.relationType.AGGREGATION,
|
| 849 |
+
this.relationType.COMPOSITION,
|
| 850 |
+
this.relationType.DEPENDENCY,
|
| 851 |
+
this.relationType.EXTENSION
|
| 852 |
+
];
|
| 853 |
+
i.relation.type1 === this.relationType.LOLLIPOP && !a.includes(i.relation.type2) ? (this.addClass(i.id2), this.addInterface(i.id1, i.id2), i.id1 = `interface${this.interfaces.length - 1}`) : i.relation.type2 === this.relationType.LOLLIPOP && !a.includes(i.relation.type1) ? (this.addClass(i.id1), this.addInterface(i.id2, i.id1), i.id2 = `interface${this.interfaces.length - 1}`) : (this.addClass(i.id1), this.addClass(i.id2)), i.id1 = this.splitClassNameAndType(i.id1).className, i.id2 = this.splitClassNameAndType(i.id2).className, i.relationTitle1 = v.sanitizeText(
|
| 854 |
+
i.relationTitle1.trim(),
|
| 855 |
+
F()
|
| 856 |
+
), i.relationTitle2 = v.sanitizeText(
|
| 857 |
+
i.relationTitle2.trim(),
|
| 858 |
+
F()
|
| 859 |
+
), this.relations.push(i);
|
| 860 |
+
}
|
| 861 |
+
/**
|
| 862 |
+
* Adds an annotation to the specified class Annotations mark special properties of the given type
|
| 863 |
+
* (like 'interface' or 'service')
|
| 864 |
+
*
|
| 865 |
+
* @param className - The class name
|
| 866 |
+
* @param annotation - The name of the annotation without any brackets
|
| 867 |
+
* @public
|
| 868 |
+
*/
|
| 869 |
+
addAnnotation(i, a) {
|
| 870 |
+
const u = this.splitClassNameAndType(i).className;
|
| 871 |
+
this.classes.get(u).annotations.push(a);
|
| 872 |
+
}
|
| 873 |
+
/**
|
| 874 |
+
* Adds a member to the specified class
|
| 875 |
+
*
|
| 876 |
+
* @param className - The class name
|
| 877 |
+
* @param member - The full name of the member. If the member is enclosed in `<<brackets>>` it is
|
| 878 |
+
* treated as an annotation If the member is ending with a closing bracket ) it is treated as a
|
| 879 |
+
* method Otherwise the member will be treated as a normal property
|
| 880 |
+
* @public
|
| 881 |
+
*/
|
| 882 |
+
addMember(i, a) {
|
| 883 |
+
this.addClass(i);
|
| 884 |
+
const u = this.splitClassNameAndType(i).className, l = this.classes.get(u);
|
| 885 |
+
if (typeof a == "string") {
|
| 886 |
+
const r = a.trim();
|
| 887 |
+
r.startsWith("<<") && r.endsWith(">>") ? l.annotations.push(V(r.substring(2, r.length - 2))) : r.indexOf(")") > 0 ? l.methods.push(new je(r, "method")) : r && l.members.push(new je(r, "attribute"));
|
| 888 |
+
}
|
| 889 |
+
}
|
| 890 |
+
addMembers(i, a) {
|
| 891 |
+
Array.isArray(a) && (a.reverse(), a.forEach((u) => this.addMember(i, u)));
|
| 892 |
+
}
|
| 893 |
+
addNote(i, a) {
|
| 894 |
+
const u = {
|
| 895 |
+
id: `note${this.notes.length}`,
|
| 896 |
+
class: a,
|
| 897 |
+
text: i
|
| 898 |
+
};
|
| 899 |
+
this.notes.push(u);
|
| 900 |
+
}
|
| 901 |
+
cleanupLabel(i) {
|
| 902 |
+
return i.startsWith(":") && (i = i.substring(1)), V(i.trim());
|
| 903 |
+
}
|
| 904 |
+
/**
|
| 905 |
+
* Called by parser when assigning cssClass to a class
|
| 906 |
+
*
|
| 907 |
+
* @param ids - Comma separated list of ids
|
| 908 |
+
* @param className - Class to add
|
| 909 |
+
*/
|
| 910 |
+
setCssClass(i, a) {
|
| 911 |
+
i.split(",").forEach((u) => {
|
| 912 |
+
let l = u;
|
| 913 |
+
/\d/.exec(u[0]) && (l = pe + l);
|
| 914 |
+
const r = this.classes.get(l);
|
| 915 |
+
r && (r.cssClasses += " " + a);
|
| 916 |
+
});
|
| 917 |
+
}
|
| 918 |
+
defineClass(i, a) {
|
| 919 |
+
for (const u of i) {
|
| 920 |
+
let l = this.styleClasses.get(u);
|
| 921 |
+
l === void 0 && (l = { id: u, styles: [], textStyles: [] }, this.styleClasses.set(u, l)), a && a.forEach((r) => {
|
| 922 |
+
if (/color/.exec(r)) {
|
| 923 |
+
const o = r.replace("fill", "bgFill");
|
| 924 |
+
l.textStyles.push(o);
|
| 925 |
+
}
|
| 926 |
+
l.styles.push(r);
|
| 927 |
+
}), this.classes.forEach((r) => {
|
| 928 |
+
r.cssClasses.includes(u) && r.styles.push(...a.flatMap((o) => o.split(",")));
|
| 929 |
+
});
|
| 930 |
+
}
|
| 931 |
+
}
|
| 932 |
+
/**
|
| 933 |
+
* Called by parser when a tooltip is found, e.g. a clickable element.
|
| 934 |
+
*
|
| 935 |
+
* @param ids - Comma separated list of ids
|
| 936 |
+
* @param tooltip - Tooltip to add
|
| 937 |
+
*/
|
| 938 |
+
setTooltip(i, a) {
|
| 939 |
+
i.split(",").forEach((u) => {
|
| 940 |
+
a !== void 0 && (this.classes.get(u).tooltip = V(a));
|
| 941 |
+
});
|
| 942 |
+
}
|
| 943 |
+
getTooltip(i, a) {
|
| 944 |
+
return a && this.namespaces.has(a) ? this.namespaces.get(a).classes.get(i).tooltip : this.classes.get(i).tooltip;
|
| 945 |
+
}
|
| 946 |
+
/**
|
| 947 |
+
* Called by parser when a link is found. Adds the URL to the vertex data.
|
| 948 |
+
*
|
| 949 |
+
* @param ids - Comma separated list of ids
|
| 950 |
+
* @param linkStr - URL to create a link for
|
| 951 |
+
* @param target - Target of the link, _blank by default as originally defined in the svgDraw.js file
|
| 952 |
+
*/
|
| 953 |
+
setLink(i, a, u) {
|
| 954 |
+
const l = F();
|
| 955 |
+
i.split(",").forEach((r) => {
|
| 956 |
+
let o = r;
|
| 957 |
+
/\d/.exec(r[0]) && (o = pe + o);
|
| 958 |
+
const A = this.classes.get(o);
|
| 959 |
+
A && (A.link = we.formatUrl(a, l), l.securityLevel === "sandbox" ? A.linkTarget = "_top" : typeof u == "string" ? A.linkTarget = V(u) : A.linkTarget = "_blank");
|
| 960 |
+
}), this.setCssClass(i, "clickable");
|
| 961 |
+
}
|
| 962 |
+
/**
|
| 963 |
+
* Called by parser when a click definition is found. Registers an event handler.
|
| 964 |
+
*
|
| 965 |
+
* @param ids - Comma separated list of ids
|
| 966 |
+
* @param functionName - Function to be called on click
|
| 967 |
+
* @param functionArgs - Function args the function should be called with
|
| 968 |
+
*/
|
| 969 |
+
setClickEvent(i, a, u) {
|
| 970 |
+
i.split(",").forEach((l) => {
|
| 971 |
+
this.setClickFunc(l, a, u), this.classes.get(l).haveCallback = !0;
|
| 972 |
+
}), this.setCssClass(i, "clickable");
|
| 973 |
+
}
|
| 974 |
+
setClickFunc(i, a, u) {
|
| 975 |
+
const l = v.sanitizeText(i, F());
|
| 976 |
+
if (F().securityLevel !== "loose" || a === void 0)
|
| 977 |
+
return;
|
| 978 |
+
const o = l;
|
| 979 |
+
if (this.classes.has(o)) {
|
| 980 |
+
const A = this.lookUpDomId(o);
|
| 981 |
+
let g = [];
|
| 982 |
+
if (typeof u == "string") {
|
| 983 |
+
g = u.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
|
| 984 |
+
for (let k = 0; k < g.length; k++) {
|
| 985 |
+
let L = g[k].trim();
|
| 986 |
+
L.startsWith('"') && L.endsWith('"') && (L = L.substr(1, L.length - 2)), g[k] = L;
|
| 987 |
+
}
|
| 988 |
+
}
|
| 989 |
+
g.length === 0 && g.push(A), this.functions.push(() => {
|
| 990 |
+
const k = document.querySelector(`[id="${A}"]`);
|
| 991 |
+
k !== null && k.addEventListener(
|
| 992 |
+
"click",
|
| 993 |
+
() => {
|
| 994 |
+
we.runFunc(a, ...g);
|
| 995 |
+
},
|
| 996 |
+
!1
|
| 997 |
+
);
|
| 998 |
+
});
|
| 999 |
+
}
|
| 1000 |
+
}
|
| 1001 |
+
bindFunctions(i) {
|
| 1002 |
+
this.functions.forEach((a) => {
|
| 1003 |
+
a(i);
|
| 1004 |
+
});
|
| 1005 |
+
}
|
| 1006 |
+
getDirection() {
|
| 1007 |
+
return this.direction;
|
| 1008 |
+
}
|
| 1009 |
+
setDirection(i) {
|
| 1010 |
+
this.direction = i;
|
| 1011 |
+
}
|
| 1012 |
+
/**
|
| 1013 |
+
* Function called by parser when a namespace definition has been found.
|
| 1014 |
+
*
|
| 1015 |
+
* @param id - ID of the namespace to add
|
| 1016 |
+
* @public
|
| 1017 |
+
*/
|
| 1018 |
+
addNamespace(i) {
|
| 1019 |
+
this.namespaces.has(i) || (this.namespaces.set(i, {
|
| 1020 |
+
id: i,
|
| 1021 |
+
classes: /* @__PURE__ */ new Map(),
|
| 1022 |
+
children: {},
|
| 1023 |
+
domId: pe + i + "-" + this.namespaceCounter
|
| 1024 |
+
}), this.namespaceCounter++);
|
| 1025 |
+
}
|
| 1026 |
+
getNamespace(i) {
|
| 1027 |
+
return this.namespaces.get(i);
|
| 1028 |
+
}
|
| 1029 |
+
getNamespaces() {
|
| 1030 |
+
return this.namespaces;
|
| 1031 |
+
}
|
| 1032 |
+
/**
|
| 1033 |
+
* Function called by parser when a namespace definition has been found.
|
| 1034 |
+
*
|
| 1035 |
+
* @param id - ID of the namespace to add
|
| 1036 |
+
* @param classNames - IDs of the class to add
|
| 1037 |
+
* @public
|
| 1038 |
+
*/
|
| 1039 |
+
addClassesToNamespace(i, a) {
|
| 1040 |
+
if (this.namespaces.has(i))
|
| 1041 |
+
for (const u of a) {
|
| 1042 |
+
const { className: l } = this.splitClassNameAndType(u);
|
| 1043 |
+
this.classes.get(l).parent = i, this.namespaces.get(i).classes.set(l, this.classes.get(l));
|
| 1044 |
+
}
|
| 1045 |
+
}
|
| 1046 |
+
setCssStyle(i, a) {
|
| 1047 |
+
const u = this.classes.get(i);
|
| 1048 |
+
if (!(!a || !u))
|
| 1049 |
+
for (const l of a)
|
| 1050 |
+
l.includes(",") ? u.styles.push(...l.split(",")) : u.styles.push(l);
|
| 1051 |
+
}
|
| 1052 |
+
/**
|
| 1053 |
+
* Gets the arrow marker for a type index
|
| 1054 |
+
*
|
| 1055 |
+
* @param type - The type to look for
|
| 1056 |
+
* @returns The arrow marker
|
| 1057 |
+
*/
|
| 1058 |
+
getArrowMarker(i) {
|
| 1059 |
+
let a;
|
| 1060 |
+
switch (i) {
|
| 1061 |
+
case 0:
|
| 1062 |
+
a = "aggregation";
|
| 1063 |
+
break;
|
| 1064 |
+
case 1:
|
| 1065 |
+
a = "extension";
|
| 1066 |
+
break;
|
| 1067 |
+
case 2:
|
| 1068 |
+
a = "composition";
|
| 1069 |
+
break;
|
| 1070 |
+
case 3:
|
| 1071 |
+
a = "dependency";
|
| 1072 |
+
break;
|
| 1073 |
+
case 4:
|
| 1074 |
+
a = "lollipop";
|
| 1075 |
+
break;
|
| 1076 |
+
default:
|
| 1077 |
+
a = "none";
|
| 1078 |
+
}
|
| 1079 |
+
return a;
|
| 1080 |
+
}
|
| 1081 |
+
getData() {
|
| 1082 |
+
var r;
|
| 1083 |
+
const i = [], a = [], u = F();
|
| 1084 |
+
for (const o of this.namespaces.keys()) {
|
| 1085 |
+
const A = this.namespaces.get(o);
|
| 1086 |
+
if (A) {
|
| 1087 |
+
const g = {
|
| 1088 |
+
id: A.id,
|
| 1089 |
+
label: A.id,
|
| 1090 |
+
isGroup: !0,
|
| 1091 |
+
padding: u.class.padding ?? 16,
|
| 1092 |
+
// parent node must be one of [rect, roundedWithTitle, noteGroup, divider]
|
| 1093 |
+
shape: "rect",
|
| 1094 |
+
cssStyles: ["fill: none", "stroke: black"],
|
| 1095 |
+
look: u.look
|
| 1096 |
+
};
|
| 1097 |
+
i.push(g);
|
| 1098 |
+
}
|
| 1099 |
+
}
|
| 1100 |
+
for (const o of this.classes.keys()) {
|
| 1101 |
+
const A = this.classes.get(o);
|
| 1102 |
+
if (A) {
|
| 1103 |
+
const g = A;
|
| 1104 |
+
g.parentId = A.parent, g.look = u.look, i.push(g);
|
| 1105 |
+
}
|
| 1106 |
+
}
|
| 1107 |
+
let l = 0;
|
| 1108 |
+
for (const o of this.notes) {
|
| 1109 |
+
l++;
|
| 1110 |
+
const A = {
|
| 1111 |
+
id: o.id,
|
| 1112 |
+
label: o.text,
|
| 1113 |
+
isGroup: !1,
|
| 1114 |
+
shape: "note",
|
| 1115 |
+
padding: u.class.padding ?? 6,
|
| 1116 |
+
cssStyles: [
|
| 1117 |
+
"text-align: left",
|
| 1118 |
+
"white-space: nowrap",
|
| 1119 |
+
`fill: ${u.themeVariables.noteBkgColor}`,
|
| 1120 |
+
`stroke: ${u.themeVariables.noteBorderColor}`
|
| 1121 |
+
],
|
| 1122 |
+
look: u.look
|
| 1123 |
+
};
|
| 1124 |
+
i.push(A);
|
| 1125 |
+
const g = ((r = this.classes.get(o.class)) == null ? void 0 : r.id) ?? "";
|
| 1126 |
+
if (g) {
|
| 1127 |
+
const k = {
|
| 1128 |
+
id: `edgeNote${l}`,
|
| 1129 |
+
start: o.id,
|
| 1130 |
+
end: g,
|
| 1131 |
+
type: "normal",
|
| 1132 |
+
thickness: "normal",
|
| 1133 |
+
classes: "relation",
|
| 1134 |
+
arrowTypeStart: "none",
|
| 1135 |
+
arrowTypeEnd: "none",
|
| 1136 |
+
arrowheadStyle: "",
|
| 1137 |
+
labelStyle: [""],
|
| 1138 |
+
style: ["fill: none"],
|
| 1139 |
+
pattern: "dotted",
|
| 1140 |
+
look: u.look
|
| 1141 |
+
};
|
| 1142 |
+
a.push(k);
|
| 1143 |
+
}
|
| 1144 |
+
}
|
| 1145 |
+
for (const o of this.interfaces) {
|
| 1146 |
+
const A = {
|
| 1147 |
+
id: o.id,
|
| 1148 |
+
label: o.label,
|
| 1149 |
+
isGroup: !1,
|
| 1150 |
+
shape: "rect",
|
| 1151 |
+
cssStyles: ["opacity: 0;"],
|
| 1152 |
+
look: u.look
|
| 1153 |
+
};
|
| 1154 |
+
i.push(A);
|
| 1155 |
+
}
|
| 1156 |
+
l = 0;
|
| 1157 |
+
for (const o of this.relations) {
|
| 1158 |
+
l++;
|
| 1159 |
+
const A = {
|
| 1160 |
+
id: dt(o.id1, o.id2, {
|
| 1161 |
+
prefix: "id",
|
| 1162 |
+
counter: l
|
| 1163 |
+
}),
|
| 1164 |
+
start: o.id1,
|
| 1165 |
+
end: o.id2,
|
| 1166 |
+
type: "normal",
|
| 1167 |
+
label: o.title,
|
| 1168 |
+
labelpos: "c",
|
| 1169 |
+
thickness: "normal",
|
| 1170 |
+
classes: "relation",
|
| 1171 |
+
arrowTypeStart: this.getArrowMarker(o.relation.type1),
|
| 1172 |
+
arrowTypeEnd: this.getArrowMarker(o.relation.type2),
|
| 1173 |
+
startLabelRight: o.relationTitle1 === "none" ? "" : o.relationTitle1,
|
| 1174 |
+
endLabelLeft: o.relationTitle2 === "none" ? "" : o.relationTitle2,
|
| 1175 |
+
arrowheadStyle: "",
|
| 1176 |
+
labelStyle: ["display: inline-block"],
|
| 1177 |
+
style: o.style || "",
|
| 1178 |
+
pattern: o.relation.lineType == 1 ? "dashed" : "solid",
|
| 1179 |
+
look: u.look
|
| 1180 |
+
};
|
| 1181 |
+
a.push(A);
|
| 1182 |
+
}
|
| 1183 |
+
return { nodes: i, edges: a, other: {}, config: u, direction: this.getDirection() };
|
| 1184 |
+
}
|
| 1185 |
+
}, f(U, "ClassDB"), U), At = /* @__PURE__ */ f((s) => `g.classGroup text {
|
| 1186 |
+
fill: ${s.nodeBorder || s.classText};
|
| 1187 |
+
stroke: none;
|
| 1188 |
+
font-family: ${s.fontFamily};
|
| 1189 |
+
font-size: 10px;
|
| 1190 |
+
|
| 1191 |
+
.title {
|
| 1192 |
+
font-weight: bolder;
|
| 1193 |
+
}
|
| 1194 |
+
|
| 1195 |
+
}
|
| 1196 |
+
|
| 1197 |
+
.nodeLabel, .edgeLabel {
|
| 1198 |
+
color: ${s.classText};
|
| 1199 |
+
}
|
| 1200 |
+
.edgeLabel .label rect {
|
| 1201 |
+
fill: ${s.mainBkg};
|
| 1202 |
+
}
|
| 1203 |
+
.label text {
|
| 1204 |
+
fill: ${s.classText};
|
| 1205 |
+
}
|
| 1206 |
+
|
| 1207 |
+
.labelBkg {
|
| 1208 |
+
background: ${s.mainBkg};
|
| 1209 |
+
}
|
| 1210 |
+
.edgeLabel .label span {
|
| 1211 |
+
background: ${s.mainBkg};
|
| 1212 |
+
}
|
| 1213 |
+
|
| 1214 |
+
.classTitle {
|
| 1215 |
+
font-weight: bolder;
|
| 1216 |
+
}
|
| 1217 |
+
.node rect,
|
| 1218 |
+
.node circle,
|
| 1219 |
+
.node ellipse,
|
| 1220 |
+
.node polygon,
|
| 1221 |
+
.node path {
|
| 1222 |
+
fill: ${s.mainBkg};
|
| 1223 |
+
stroke: ${s.nodeBorder};
|
| 1224 |
+
stroke-width: 1px;
|
| 1225 |
+
}
|
| 1226 |
+
|
| 1227 |
+
|
| 1228 |
+
.divider {
|
| 1229 |
+
stroke: ${s.nodeBorder};
|
| 1230 |
+
stroke-width: 1;
|
| 1231 |
+
}
|
| 1232 |
+
|
| 1233 |
+
g.clickable {
|
| 1234 |
+
cursor: pointer;
|
| 1235 |
+
}
|
| 1236 |
+
|
| 1237 |
+
g.classGroup rect {
|
| 1238 |
+
fill: ${s.mainBkg};
|
| 1239 |
+
stroke: ${s.nodeBorder};
|
| 1240 |
+
}
|
| 1241 |
+
|
| 1242 |
+
g.classGroup line {
|
| 1243 |
+
stroke: ${s.nodeBorder};
|
| 1244 |
+
stroke-width: 1;
|
| 1245 |
+
}
|
| 1246 |
+
|
| 1247 |
+
.classLabel .box {
|
| 1248 |
+
stroke: none;
|
| 1249 |
+
stroke-width: 0;
|
| 1250 |
+
fill: ${s.mainBkg};
|
| 1251 |
+
opacity: 0.5;
|
| 1252 |
+
}
|
| 1253 |
+
|
| 1254 |
+
.classLabel .label {
|
| 1255 |
+
fill: ${s.nodeBorder};
|
| 1256 |
+
font-size: 10px;
|
| 1257 |
+
}
|
| 1258 |
+
|
| 1259 |
+
.relation {
|
| 1260 |
+
stroke: ${s.lineColor};
|
| 1261 |
+
stroke-width: 1;
|
| 1262 |
+
fill: none;
|
| 1263 |
+
}
|
| 1264 |
+
|
| 1265 |
+
.dashed-line{
|
| 1266 |
+
stroke-dasharray: 3;
|
| 1267 |
+
}
|
| 1268 |
+
|
| 1269 |
+
.dotted-line{
|
| 1270 |
+
stroke-dasharray: 1 2;
|
| 1271 |
+
}
|
| 1272 |
+
|
| 1273 |
+
#compositionStart, .composition {
|
| 1274 |
+
fill: ${s.lineColor} !important;
|
| 1275 |
+
stroke: ${s.lineColor} !important;
|
| 1276 |
+
stroke-width: 1;
|
| 1277 |
+
}
|
| 1278 |
+
|
| 1279 |
+
#compositionEnd, .composition {
|
| 1280 |
+
fill: ${s.lineColor} !important;
|
| 1281 |
+
stroke: ${s.lineColor} !important;
|
| 1282 |
+
stroke-width: 1;
|
| 1283 |
+
}
|
| 1284 |
+
|
| 1285 |
+
#dependencyStart, .dependency {
|
| 1286 |
+
fill: ${s.lineColor} !important;
|
| 1287 |
+
stroke: ${s.lineColor} !important;
|
| 1288 |
+
stroke-width: 1;
|
| 1289 |
+
}
|
| 1290 |
+
|
| 1291 |
+
#dependencyStart, .dependency {
|
| 1292 |
+
fill: ${s.lineColor} !important;
|
| 1293 |
+
stroke: ${s.lineColor} !important;
|
| 1294 |
+
stroke-width: 1;
|
| 1295 |
+
}
|
| 1296 |
+
|
| 1297 |
+
#extensionStart, .extension {
|
| 1298 |
+
fill: transparent !important;
|
| 1299 |
+
stroke: ${s.lineColor} !important;
|
| 1300 |
+
stroke-width: 1;
|
| 1301 |
+
}
|
| 1302 |
+
|
| 1303 |
+
#extensionEnd, .extension {
|
| 1304 |
+
fill: transparent !important;
|
| 1305 |
+
stroke: ${s.lineColor} !important;
|
| 1306 |
+
stroke-width: 1;
|
| 1307 |
+
}
|
| 1308 |
+
|
| 1309 |
+
#aggregationStart, .aggregation {
|
| 1310 |
+
fill: transparent !important;
|
| 1311 |
+
stroke: ${s.lineColor} !important;
|
| 1312 |
+
stroke-width: 1;
|
| 1313 |
+
}
|
| 1314 |
+
|
| 1315 |
+
#aggregationEnd, .aggregation {
|
| 1316 |
+
fill: transparent !important;
|
| 1317 |
+
stroke: ${s.lineColor} !important;
|
| 1318 |
+
stroke-width: 1;
|
| 1319 |
+
}
|
| 1320 |
+
|
| 1321 |
+
#lollipopStart, .lollipop {
|
| 1322 |
+
fill: ${s.mainBkg} !important;
|
| 1323 |
+
stroke: ${s.lineColor} !important;
|
| 1324 |
+
stroke-width: 1;
|
| 1325 |
+
}
|
| 1326 |
+
|
| 1327 |
+
#lollipopEnd, .lollipop {
|
| 1328 |
+
fill: ${s.mainBkg} !important;
|
| 1329 |
+
stroke: ${s.lineColor} !important;
|
| 1330 |
+
stroke-width: 1;
|
| 1331 |
+
}
|
| 1332 |
+
|
| 1333 |
+
.edgeTerminals {
|
| 1334 |
+
font-size: 11px;
|
| 1335 |
+
line-height: initial;
|
| 1336 |
+
}
|
| 1337 |
+
|
| 1338 |
+
.classTitleText {
|
| 1339 |
+
text-anchor: middle;
|
| 1340 |
+
font-size: 18px;
|
| 1341 |
+
fill: ${s.textColor};
|
| 1342 |
+
}
|
| 1343 |
+
${et()}
|
| 1344 |
+
`, "getStyles"), kt = At, ft = /* @__PURE__ */ f((s, i = "TB") => {
|
| 1345 |
+
if (!s.doc)
|
| 1346 |
+
return i;
|
| 1347 |
+
let a = i;
|
| 1348 |
+
for (const u of s.doc)
|
| 1349 |
+
u.stmt === "dir" && (a = u.value);
|
| 1350 |
+
return a;
|
| 1351 |
+
}, "getDir"), gt = /* @__PURE__ */ f(function(s, i) {
|
| 1352 |
+
return i.db.getClasses();
|
| 1353 |
+
}, "getClasses"), Ct = /* @__PURE__ */ f(async function(s, i, a, u) {
|
| 1354 |
+
Oe.info("REF0:"), Oe.info("Drawing class diagram (v3)", i);
|
| 1355 |
+
const { securityLevel: l, state: r, layout: o } = F(), A = u.db.getData(), g = tt(i, l);
|
| 1356 |
+
A.type = u.type, A.layoutAlgorithm = it(o), A.nodeSpacing = (r == null ? void 0 : r.nodeSpacing) || 50, A.rankSpacing = (r == null ? void 0 : r.rankSpacing) || 50, A.markers = ["aggregation", "extension", "composition", "dependency", "lollipop"], A.diagramId = i, await at(A, g);
|
| 1357 |
+
const k = 8;
|
| 1358 |
+
we.insertTitle(
|
| 1359 |
+
g,
|
| 1360 |
+
"classDiagramTitleText",
|
| 1361 |
+
(r == null ? void 0 : r.titleTopMargin) ?? 25,
|
| 1362 |
+
u.db.getDiagramTitle()
|
| 1363 |
+
), st(g, k, "classDiagram", (r == null ? void 0 : r.useMaxWidth) ?? !0);
|
| 1364 |
+
}, "draw"), Dt = {
|
| 1365 |
+
getClasses: gt,
|
| 1366 |
+
draw: Ct,
|
| 1367 |
+
getDir: ft
|
| 1368 |
+
};
|
| 1369 |
+
export {
|
| 1370 |
+
Tt as C,
|
| 1371 |
+
yt as a,
|
| 1372 |
+
Dt as c,
|
| 1373 |
+
kt as s
|
| 1374 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/classDiagram-EGQPL23Y-BIUZ9-Wz.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { s as r, c as s, a as e, C as t } from "./chunk-YQZZRAKN-B2br4HuY.js";
|
| 2 |
+
import { _ as l } from "./mermaid.core-CfPtPiLZ.js";
|
| 3 |
+
var d = {
|
| 4 |
+
parser: e,
|
| 5 |
+
get db() {
|
| 6 |
+
return new t();
|
| 7 |
+
},
|
| 8 |
+
renderer: s,
|
| 9 |
+
styles: r,
|
| 10 |
+
init: /* @__PURE__ */ l((a) => {
|
| 11 |
+
a.class || (a.class = {}), a.class.arrowMarkerAbsolute = a.arrowMarkerAbsolute;
|
| 12 |
+
}, "init")
|
| 13 |
+
};
|
| 14 |
+
export {
|
| 15 |
+
d as diagram
|
| 16 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/classDiagram-v2-4EBKGCBT-BIUZ9-Wz.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { s as r, c as s, a as e, C as t } from "./chunk-YQZZRAKN-B2br4HuY.js";
|
| 2 |
+
import { _ as l } from "./mermaid.core-CfPtPiLZ.js";
|
| 3 |
+
var d = {
|
| 4 |
+
parser: e,
|
| 5 |
+
get db() {
|
| 6 |
+
return new t();
|
| 7 |
+
},
|
| 8 |
+
renderer: s,
|
| 9 |
+
styles: r,
|
| 10 |
+
init: /* @__PURE__ */ l((a) => {
|
| 11 |
+
a.class || (a.class = {}), a.class.arrowMarkerAbsolute = a.arrowMarkerAbsolute;
|
| 12 |
+
}, "init")
|
| 13 |
+
};
|
| 14 |
+
export {
|
| 15 |
+
d as diagram
|
| 16 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/clone-BFXwIeh2.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { b as r } from "./_baseUniq-_084E1r1.js";
|
| 2 |
+
var e = 4;
|
| 3 |
+
function a(o) {
|
| 4 |
+
return r(o, e);
|
| 5 |
+
}
|
| 6 |
+
export {
|
| 7 |
+
a as c
|
| 8 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/cytoscape.esm-C2cgT2B2.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
src/backend/gradio_tokenizertextbox/templates/component/dagre-IE2X5DAH-duWuOi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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { _ as X, ar as F, as as Y, at as _, au as H, l as i, c as V, av as z, aw as U, ag as $, al as q, ah as P, af as K, ax as Q, ay as W, az as Z } from "./mermaid.core-CfPtPiLZ.js";
|
| 2 |
+
import { G as B } from "./graph-By8AcOsS.js";
|
| 3 |
+
import { l as I } from "./layout-By9VfgKH.js";
|
| 4 |
+
import { i as x } from "./_baseUniq-_084E1r1.js";
|
| 5 |
+
import { c as L } from "./clone-BFXwIeh2.js";
|
| 6 |
+
import { m as A } from "./_basePickBy-CApE71AJ.js";
|
| 7 |
+
function p(e) {
|
| 8 |
+
var t = {
|
| 9 |
+
options: {
|
| 10 |
+
directed: e.isDirected(),
|
| 11 |
+
multigraph: e.isMultigraph(),
|
| 12 |
+
compound: e.isCompound()
|
| 13 |
+
},
|
| 14 |
+
nodes: ee(e),
|
| 15 |
+
edges: ne(e)
|
| 16 |
+
};
|
| 17 |
+
return x(e.graph()) || (t.value = L(e.graph())), t;
|
| 18 |
+
}
|
| 19 |
+
function ee(e) {
|
| 20 |
+
return A(e.nodes(), function(t) {
|
| 21 |
+
var n = e.node(t), o = e.parent(t), c = { v: t };
|
| 22 |
+
return x(n) || (c.value = n), x(o) || (c.parent = o), c;
|
| 23 |
+
});
|
| 24 |
+
}
|
| 25 |
+
function ne(e) {
|
| 26 |
+
return A(e.edges(), function(t) {
|
| 27 |
+
var n = e.edge(t), o = { v: t.v, w: t.w };
|
| 28 |
+
return x(t.name) || (o.name = t.name), x(n) || (o.value = n), o;
|
| 29 |
+
});
|
| 30 |
+
}
|
| 31 |
+
var f = /* @__PURE__ */ new Map(), b = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ X(() => {
|
| 32 |
+
b.clear(), J.clear(), f.clear();
|
| 33 |
+
}, "clear"), O = /* @__PURE__ */ X((e, t) => {
|
| 34 |
+
const n = b.get(t) || [];
|
| 35 |
+
return i.trace("In isDescendant", t, " ", e, " = ", n.includes(e)), n.includes(e);
|
| 36 |
+
}, "isDescendant"), se = /* @__PURE__ */ X((e, t) => {
|
| 37 |
+
const n = b.get(t) || [];
|
| 38 |
+
return i.info("Descendants of ", t, " is ", n), i.info("Edge is ", e), e.v === t || e.w === t ? !1 : n ? n.includes(e.v) || O(e.v, t) || O(e.w, t) || n.includes(e.w) : (i.debug("Tilt, ", t, ",not in descendants"), !1);
|
| 39 |
+
}, "edgeInCluster"), G = /* @__PURE__ */ X((e, t, n, o) => {
|
| 40 |
+
i.warn(
|
| 41 |
+
"Copying children of ",
|
| 42 |
+
e,
|
| 43 |
+
"root",
|
| 44 |
+
o,
|
| 45 |
+
"data",
|
| 46 |
+
t.node(e),
|
| 47 |
+
o
|
| 48 |
+
);
|
| 49 |
+
const c = t.children(e) || [];
|
| 50 |
+
e !== o && c.push(e), i.warn("Copying (nodes) clusterId", e, "nodes", c), c.forEach((a) => {
|
| 51 |
+
if (t.children(a).length > 0)
|
| 52 |
+
G(a, t, n, o);
|
| 53 |
+
else {
|
| 54 |
+
const r = t.node(a);
|
| 55 |
+
i.info("cp ", a, " to ", o, " with parent ", e), n.setNode(a, r), o !== t.parent(a) && (i.warn("Setting parent", a, t.parent(a)), n.setParent(a, t.parent(a))), e !== o && a !== e ? (i.debug("Setting parent", a, e), n.setParent(a, e)) : (i.info("In copy ", e, "root", o, "data", t.node(e), o), i.debug(
|
| 56 |
+
"Not Setting parent for node=",
|
| 57 |
+
a,
|
| 58 |
+
"cluster!==rootId",
|
| 59 |
+
e !== o,
|
| 60 |
+
"node!==clusterId",
|
| 61 |
+
a !== e
|
| 62 |
+
));
|
| 63 |
+
const u = t.edges(a);
|
| 64 |
+
i.debug("Copying Edges", u), u.forEach((l) => {
|
| 65 |
+
i.info("Edge", l);
|
| 66 |
+
const v = t.edge(l.v, l.w, l.name);
|
| 67 |
+
i.info("Edge data", v, o);
|
| 68 |
+
try {
|
| 69 |
+
se(l, o) ? (i.info("Copying as ", l.v, l.w, v, l.name), n.setEdge(l.v, l.w, v, l.name), i.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : i.info(
|
| 70 |
+
"Skipping copy of edge ",
|
| 71 |
+
l.v,
|
| 72 |
+
"-->",
|
| 73 |
+
l.w,
|
| 74 |
+
" rootId: ",
|
| 75 |
+
o,
|
| 76 |
+
" clusterId:",
|
| 77 |
+
e
|
| 78 |
+
);
|
| 79 |
+
} catch (C) {
|
| 80 |
+
i.error(C);
|
| 81 |
+
}
|
| 82 |
+
});
|
| 83 |
+
}
|
| 84 |
+
i.debug("Removing node", a), t.removeNode(a);
|
| 85 |
+
});
|
| 86 |
+
}, "copy"), R = /* @__PURE__ */ X((e, t) => {
|
| 87 |
+
const n = t.children(e);
|
| 88 |
+
let o = [...n];
|
| 89 |
+
for (const c of n)
|
| 90 |
+
J.set(c, e), o = [...o, ...R(c, t)];
|
| 91 |
+
return o;
|
| 92 |
+
}, "extractDescendants"), ie = /* @__PURE__ */ X((e, t, n) => {
|
| 93 |
+
const o = e.edges().filter((l) => l.v === t || l.w === t), c = e.edges().filter((l) => l.v === n || l.w === n), a = o.map((l) => ({ v: l.v === t ? n : l.v, w: l.w === t ? t : l.w })), r = c.map((l) => ({ v: l.v, w: l.w }));
|
| 94 |
+
return a.filter((l) => r.some((v) => l.v === v.v && l.w === v.w));
|
| 95 |
+
}, "findCommonEdges"), D = /* @__PURE__ */ X((e, t, n) => {
|
| 96 |
+
const o = t.children(e);
|
| 97 |
+
if (i.trace("Searching children of id ", e, o), o.length < 1)
|
| 98 |
+
return e;
|
| 99 |
+
let c;
|
| 100 |
+
for (const a of o) {
|
| 101 |
+
const r = D(a, t, n), u = ie(t, n, r);
|
| 102 |
+
if (r)
|
| 103 |
+
if (u.length > 0)
|
| 104 |
+
c = r;
|
| 105 |
+
else
|
| 106 |
+
return r;
|
| 107 |
+
}
|
| 108 |
+
return c;
|
| 109 |
+
}, "findNonClusterChild"), k = /* @__PURE__ */ X((e) => !f.has(e) || !f.get(e).externalConnections ? e : f.has(e) ? f.get(e).id : e, "getAnchorId"), re = /* @__PURE__ */ X((e, t) => {
|
| 110 |
+
if (!e || t > 10) {
|
| 111 |
+
i.debug("Opting out, no graph ");
|
| 112 |
+
return;
|
| 113 |
+
} else
|
| 114 |
+
i.debug("Opting in, graph ");
|
| 115 |
+
e.nodes().forEach(function(n) {
|
| 116 |
+
e.children(n).length > 0 && (i.warn(
|
| 117 |
+
"Cluster identified",
|
| 118 |
+
n,
|
| 119 |
+
" Replacement id in edges: ",
|
| 120 |
+
D(n, e, n)
|
| 121 |
+
), b.set(n, R(n, e)), f.set(n, { id: D(n, e, n), clusterData: e.node(n) }));
|
| 122 |
+
}), e.nodes().forEach(function(n) {
|
| 123 |
+
const o = e.children(n), c = e.edges();
|
| 124 |
+
o.length > 0 ? (i.debug("Cluster identified", n, b), c.forEach((a) => {
|
| 125 |
+
const r = O(a.v, n), u = O(a.w, n);
|
| 126 |
+
r ^ u && (i.warn("Edge: ", a, " leaves cluster ", n), i.warn("Descendants of XXX ", n, ": ", b.get(n)), f.get(n).externalConnections = !0);
|
| 127 |
+
})) : i.debug("Not a cluster ", n, b);
|
| 128 |
+
});
|
| 129 |
+
for (let n of f.keys()) {
|
| 130 |
+
const o = f.get(n).id, c = e.parent(o);
|
| 131 |
+
c !== n && f.has(c) && !f.get(c).externalConnections && (f.get(n).id = c);
|
| 132 |
+
}
|
| 133 |
+
e.edges().forEach(function(n) {
|
| 134 |
+
const o = e.edge(n);
|
| 135 |
+
i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
|
| 136 |
+
let c = n.v, a = n.w;
|
| 137 |
+
if (i.warn(
|
| 138 |
+
"Fix XXX",
|
| 139 |
+
f,
|
| 140 |
+
"ids:",
|
| 141 |
+
n.v,
|
| 142 |
+
n.w,
|
| 143 |
+
"Translating: ",
|
| 144 |
+
f.get(n.v),
|
| 145 |
+
" --- ",
|
| 146 |
+
f.get(n.w)
|
| 147 |
+
), f.get(n.v) || f.get(n.w)) {
|
| 148 |
+
if (i.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), c = k(n.v), a = k(n.w), e.removeEdge(n.v, n.w, n.name), c !== n.v) {
|
| 149 |
+
const r = e.parent(c);
|
| 150 |
+
f.get(r).externalConnections = !0, o.fromCluster = n.v;
|
| 151 |
+
}
|
| 152 |
+
if (a !== n.w) {
|
| 153 |
+
const r = e.parent(a);
|
| 154 |
+
f.get(r).externalConnections = !0, o.toCluster = n.w;
|
| 155 |
+
}
|
| 156 |
+
i.warn("Fix Replacing with XXX", c, a, n.name), e.setEdge(c, a, o, n.name);
|
| 157 |
+
}
|
| 158 |
+
}), i.warn("Adjusted Graph", p(e)), T(e, 0), i.trace(f);
|
| 159 |
+
}, "adjustClustersAndEdges"), T = /* @__PURE__ */ X((e, t) => {
|
| 160 |
+
var c, a;
|
| 161 |
+
if (i.warn("extractor - ", t, p(e), e.children("D")), t > 10) {
|
| 162 |
+
i.error("Bailing out");
|
| 163 |
+
return;
|
| 164 |
+
}
|
| 165 |
+
let n = e.nodes(), o = !1;
|
| 166 |
+
for (const r of n) {
|
| 167 |
+
const u = e.children(r);
|
| 168 |
+
o = o || u.length > 0;
|
| 169 |
+
}
|
| 170 |
+
if (!o) {
|
| 171 |
+
i.debug("Done, no node has children", e.nodes());
|
| 172 |
+
return;
|
| 173 |
+
}
|
| 174 |
+
i.debug("Nodes = ", n, t);
|
| 175 |
+
for (const r of n)
|
| 176 |
+
if (i.debug(
|
| 177 |
+
"Extracting node",
|
| 178 |
+
r,
|
| 179 |
+
f,
|
| 180 |
+
f.has(r) && !f.get(r).externalConnections,
|
| 181 |
+
!e.parent(r),
|
| 182 |
+
e.node(r),
|
| 183 |
+
e.children("D"),
|
| 184 |
+
" Depth ",
|
| 185 |
+
t
|
| 186 |
+
), !f.has(r))
|
| 187 |
+
i.debug("Not a cluster", r, t);
|
| 188 |
+
else if (!f.get(r).externalConnections && e.children(r) && e.children(r).length > 0) {
|
| 189 |
+
i.warn(
|
| 190 |
+
"Cluster without external connections, without a parent and with children",
|
| 191 |
+
r,
|
| 192 |
+
t
|
| 193 |
+
);
|
| 194 |
+
let l = e.graph().rankdir === "TB" ? "LR" : "TB";
|
| 195 |
+
(a = (c = f.get(r)) == null ? void 0 : c.clusterData) != null && a.dir && (l = f.get(r).clusterData.dir, i.warn("Fixing dir", f.get(r).clusterData.dir, l));
|
| 196 |
+
const v = new B({
|
| 197 |
+
multigraph: !0,
|
| 198 |
+
compound: !0
|
| 199 |
+
}).setGraph({
|
| 200 |
+
rankdir: l,
|
| 201 |
+
nodesep: 50,
|
| 202 |
+
ranksep: 50,
|
| 203 |
+
marginx: 8,
|
| 204 |
+
marginy: 8
|
| 205 |
+
}).setDefaultEdgeLabel(function() {
|
| 206 |
+
return {};
|
| 207 |
+
});
|
| 208 |
+
i.warn("Old graph before copy", p(e)), G(r, e, v, r), e.setNode(r, {
|
| 209 |
+
clusterNode: !0,
|
| 210 |
+
id: r,
|
| 211 |
+
clusterData: f.get(r).clusterData,
|
| 212 |
+
label: f.get(r).label,
|
| 213 |
+
graph: v
|
| 214 |
+
}), i.warn("New graph after copy node: (", r, ")", p(v)), i.debug("Old graph after copy", p(e));
|
| 215 |
+
} else
|
| 216 |
+
i.warn(
|
| 217 |
+
"Cluster ** ",
|
| 218 |
+
r,
|
| 219 |
+
" **not meeting the criteria !externalConnections:",
|
| 220 |
+
!f.get(r).externalConnections,
|
| 221 |
+
" no parent: ",
|
| 222 |
+
!e.parent(r),
|
| 223 |
+
" children ",
|
| 224 |
+
e.children(r) && e.children(r).length > 0,
|
| 225 |
+
e.children("D"),
|
| 226 |
+
t
|
| 227 |
+
), i.debug(f);
|
| 228 |
+
n = e.nodes(), i.warn("New list of nodes", n);
|
| 229 |
+
for (const r of n) {
|
| 230 |
+
const u = e.node(r);
|
| 231 |
+
i.warn(" Now next level", r, u), u != null && u.clusterNode && T(u.graph, t + 1);
|
| 232 |
+
}
|
| 233 |
+
}, "extractor"), M = /* @__PURE__ */ X((e, t) => {
|
| 234 |
+
if (t.length === 0)
|
| 235 |
+
return [];
|
| 236 |
+
let n = Object.assign([], t);
|
| 237 |
+
return t.forEach((o) => {
|
| 238 |
+
const c = e.children(o), a = M(e, c);
|
| 239 |
+
n = [...n, ...a];
|
| 240 |
+
}), n;
|
| 241 |
+
}, "sorter"), oe = /* @__PURE__ */ X((e) => M(e, e.children()), "sortNodesByHierarchy"), j = /* @__PURE__ */ X(async (e, t, n, o, c, a) => {
|
| 242 |
+
i.warn("Graph in recursive render:XAX", p(t), c);
|
| 243 |
+
const r = t.graph().rankdir;
|
| 244 |
+
i.trace("Dir in recursive render - dir:", r);
|
| 245 |
+
const u = e.insert("g").attr("class", "root");
|
| 246 |
+
t.nodes() ? i.info("Recursive render XXX", t.nodes()) : i.info("No nodes found for", t), t.edges().length > 0 && i.info("Recursive edges", t.edge(t.edges()[0]));
|
| 247 |
+
const l = u.insert("g").attr("class", "clusters"), v = u.insert("g").attr("class", "edgePaths"), C = u.insert("g").attr("class", "edgeLabels"), g = u.insert("g").attr("class", "nodes");
|
| 248 |
+
await Promise.all(
|
| 249 |
+
t.nodes().map(async function(d) {
|
| 250 |
+
const s = t.node(d);
|
| 251 |
+
if (c !== void 0) {
|
| 252 |
+
const w = JSON.parse(JSON.stringify(c.clusterData));
|
| 253 |
+
i.trace(
|
| 254 |
+
`Setting data for parent cluster XXX
|
| 255 |
+
Node.id = `,
|
| 256 |
+
d,
|
| 257 |
+
`
|
| 258 |
+
data=`,
|
| 259 |
+
w.height,
|
| 260 |
+
`
|
| 261 |
+
Parent cluster`,
|
| 262 |
+
c.height
|
| 263 |
+
), t.setNode(c.id, w), t.parent(d) || (i.trace("Setting parent", d, c.id), t.setParent(d, c.id, w));
|
| 264 |
+
}
|
| 265 |
+
if (i.info("(Insert) Node XXX" + d + ": " + JSON.stringify(t.node(d))), s != null && s.clusterNode) {
|
| 266 |
+
i.info("Cluster identified XBX", d, s.width, t.node(d));
|
| 267 |
+
const { ranksep: w, nodesep: m } = t.graph();
|
| 268 |
+
s.graph.setGraph({
|
| 269 |
+
...s.graph.graph(),
|
| 270 |
+
ranksep: w + 25,
|
| 271 |
+
nodesep: m
|
| 272 |
+
});
|
| 273 |
+
const N = await j(
|
| 274 |
+
g,
|
| 275 |
+
s.graph,
|
| 276 |
+
n,
|
| 277 |
+
o,
|
| 278 |
+
t.node(d),
|
| 279 |
+
a
|
| 280 |
+
), S = N.elem;
|
| 281 |
+
z(s, S), s.diff = N.diff || 0, i.info(
|
| 282 |
+
"New compound node after recursive render XAX",
|
| 283 |
+
d,
|
| 284 |
+
"width",
|
| 285 |
+
// node,
|
| 286 |
+
s.width,
|
| 287 |
+
"height",
|
| 288 |
+
s.height
|
| 289 |
+
// node.x,
|
| 290 |
+
// node.y
|
| 291 |
+
), U(S, s);
|
| 292 |
+
} else
|
| 293 |
+
t.children(d).length > 0 ? (i.trace(
|
| 294 |
+
"Cluster - the non recursive path XBX",
|
| 295 |
+
d,
|
| 296 |
+
s.id,
|
| 297 |
+
s,
|
| 298 |
+
s.width,
|
| 299 |
+
"Graph:",
|
| 300 |
+
t
|
| 301 |
+
), i.trace(D(s.id, t)), f.set(s.id, { id: D(s.id, t), node: s })) : (i.trace("Node - the non recursive path XAX", d, g, t.node(d), r), await $(g, t.node(d), { config: a, dir: r }));
|
| 302 |
+
})
|
| 303 |
+
), await (/* @__PURE__ */ X(async () => {
|
| 304 |
+
const d = t.edges().map(async function(s) {
|
| 305 |
+
const w = t.edge(s.v, s.w, s.name);
|
| 306 |
+
i.info("Edge " + s.v + " -> " + s.w + ": " + JSON.stringify(s)), i.info("Edge " + s.v + " -> " + s.w + ": ", s, " ", JSON.stringify(t.edge(s))), i.info(
|
| 307 |
+
"Fix",
|
| 308 |
+
f,
|
| 309 |
+
"ids:",
|
| 310 |
+
s.v,
|
| 311 |
+
s.w,
|
| 312 |
+
"Translating: ",
|
| 313 |
+
f.get(s.v),
|
| 314 |
+
f.get(s.w)
|
| 315 |
+
), await Z(C, w);
|
| 316 |
+
});
|
| 317 |
+
await Promise.all(d);
|
| 318 |
+
}, "processEdges"))(), i.info("Graph before layout:", JSON.stringify(p(t))), i.info("############################################# XXX"), i.info("### Layout ### XXX"), i.info("############################################# XXX"), I(t), i.info("Graph after layout:", JSON.stringify(p(t)));
|
| 319 |
+
let E = 0, { subGraphTitleTotalMargin: y } = q(a);
|
| 320 |
+
return await Promise.all(
|
| 321 |
+
oe(t).map(async function(d) {
|
| 322 |
+
var w;
|
| 323 |
+
const s = t.node(d);
|
| 324 |
+
if (i.info(
|
| 325 |
+
"Position XBX => " + d + ": (" + s.x,
|
| 326 |
+
"," + s.y,
|
| 327 |
+
") width: ",
|
| 328 |
+
s.width,
|
| 329 |
+
" height: ",
|
| 330 |
+
s.height
|
| 331 |
+
), s != null && s.clusterNode)
|
| 332 |
+
s.y += y, i.info(
|
| 333 |
+
"A tainted cluster node XBX1",
|
| 334 |
+
d,
|
| 335 |
+
s.id,
|
| 336 |
+
s.width,
|
| 337 |
+
s.height,
|
| 338 |
+
s.x,
|
| 339 |
+
s.y,
|
| 340 |
+
t.parent(d)
|
| 341 |
+
), f.get(s.id).node = s, P(s);
|
| 342 |
+
else if (t.children(d).length > 0) {
|
| 343 |
+
i.info(
|
| 344 |
+
"A pure cluster node XBX1",
|
| 345 |
+
d,
|
| 346 |
+
s.id,
|
| 347 |
+
s.x,
|
| 348 |
+
s.y,
|
| 349 |
+
s.width,
|
| 350 |
+
s.height,
|
| 351 |
+
t.parent(d)
|
| 352 |
+
), s.height += y, t.node(s.parentId);
|
| 353 |
+
const m = (s == null ? void 0 : s.padding) / 2 || 0, N = ((w = s == null ? void 0 : s.labelBBox) == null ? void 0 : w.height) || 0, S = N - m || 0;
|
| 354 |
+
i.debug("OffsetY", S, "labelHeight", N, "halfPadding", m), await K(l, s), f.get(s.id).node = s;
|
| 355 |
+
} else {
|
| 356 |
+
const m = t.node(s.parentId);
|
| 357 |
+
s.y += y / 2, i.info(
|
| 358 |
+
"A regular node XBX1 - using the padding",
|
| 359 |
+
s.id,
|
| 360 |
+
"parent",
|
| 361 |
+
s.parentId,
|
| 362 |
+
s.width,
|
| 363 |
+
s.height,
|
| 364 |
+
s.x,
|
| 365 |
+
s.y,
|
| 366 |
+
"offsetY",
|
| 367 |
+
s.offsetY,
|
| 368 |
+
"parent",
|
| 369 |
+
m,
|
| 370 |
+
m == null ? void 0 : m.offsetY,
|
| 371 |
+
s
|
| 372 |
+
), P(s);
|
| 373 |
+
}
|
| 374 |
+
})
|
| 375 |
+
), t.edges().forEach(function(d) {
|
| 376 |
+
const s = t.edge(d);
|
| 377 |
+
i.info("Edge " + d.v + " -> " + d.w + ": " + JSON.stringify(s), s), s.points.forEach((S) => S.y += y / 2);
|
| 378 |
+
const w = t.node(d.v);
|
| 379 |
+
var m = t.node(d.w);
|
| 380 |
+
const N = Q(v, s, f, n, w, m, o);
|
| 381 |
+
W(s, N);
|
| 382 |
+
}), t.nodes().forEach(function(d) {
|
| 383 |
+
const s = t.node(d);
|
| 384 |
+
i.info(d, s.type, s.diff), s.isGroup && (E = s.diff);
|
| 385 |
+
}), i.warn("Returning from recursive render XAX", u, E), { elem: u, diff: E };
|
| 386 |
+
}, "recursiveRender"), ge = /* @__PURE__ */ X(async (e, t) => {
|
| 387 |
+
var a, r, u, l, v, C;
|
| 388 |
+
const n = new B({
|
| 389 |
+
multigraph: !0,
|
| 390 |
+
compound: !0
|
| 391 |
+
}).setGraph({
|
| 392 |
+
rankdir: e.direction,
|
| 393 |
+
nodesep: ((a = e.config) == null ? void 0 : a.nodeSpacing) || ((u = (r = e.config) == null ? void 0 : r.flowchart) == null ? void 0 : u.nodeSpacing) || e.nodeSpacing,
|
| 394 |
+
ranksep: ((l = e.config) == null ? void 0 : l.rankSpacing) || ((C = (v = e.config) == null ? void 0 : v.flowchart) == null ? void 0 : C.rankSpacing) || e.rankSpacing,
|
| 395 |
+
marginx: 8,
|
| 396 |
+
marginy: 8
|
| 397 |
+
}).setDefaultEdgeLabel(function() {
|
| 398 |
+
return {};
|
| 399 |
+
}), o = t.select("g");
|
| 400 |
+
F(o, e.markers, e.type, e.diagramId), Y(), _(), H(), te(), e.nodes.forEach((g) => {
|
| 401 |
+
n.setNode(g.id, { ...g }), g.parentId && n.setParent(g.id, g.parentId);
|
| 402 |
+
}), i.debug("Edges:", e.edges), e.edges.forEach((g) => {
|
| 403 |
+
if (g.start === g.end) {
|
| 404 |
+
const h = g.start, E = h + "---" + h + "---1", y = h + "---" + h + "---2", d = n.node(h);
|
| 405 |
+
n.setNode(E, {
|
| 406 |
+
domId: E,
|
| 407 |
+
id: E,
|
| 408 |
+
parentId: d.parentId,
|
| 409 |
+
labelStyle: "",
|
| 410 |
+
label: "",
|
| 411 |
+
padding: 0,
|
| 412 |
+
shape: "labelRect",
|
| 413 |
+
// shape: 'rect',
|
| 414 |
+
style: "",
|
| 415 |
+
width: 10,
|
| 416 |
+
height: 10
|
| 417 |
+
}), n.setParent(E, d.parentId), n.setNode(y, {
|
| 418 |
+
domId: y,
|
| 419 |
+
id: y,
|
| 420 |
+
parentId: d.parentId,
|
| 421 |
+
labelStyle: "",
|
| 422 |
+
padding: 0,
|
| 423 |
+
// shape: 'rect',
|
| 424 |
+
shape: "labelRect",
|
| 425 |
+
label: "",
|
| 426 |
+
style: "",
|
| 427 |
+
width: 10,
|
| 428 |
+
height: 10
|
| 429 |
+
}), n.setParent(y, d.parentId);
|
| 430 |
+
const s = structuredClone(g), w = structuredClone(g), m = structuredClone(g);
|
| 431 |
+
s.label = "", s.arrowTypeEnd = "none", s.id = h + "-cyclic-special-1", w.arrowTypeStart = "none", w.arrowTypeEnd = "none", w.id = h + "-cyclic-special-mid", m.label = "", d.isGroup && (s.fromCluster = h, m.toCluster = h), m.id = h + "-cyclic-special-2", m.arrowTypeStart = "none", n.setEdge(h, E, s, h + "-cyclic-special-0"), n.setEdge(E, y, w, h + "-cyclic-special-1"), n.setEdge(y, h, m, h + "-cyc<lic-special-2");
|
| 432 |
+
} else
|
| 433 |
+
n.setEdge(g.start, g.end, { ...g }, g.id);
|
| 434 |
+
}), i.warn("Graph at first:", JSON.stringify(p(n))), re(n), i.warn("Graph after XAX:", JSON.stringify(p(n)));
|
| 435 |
+
const c = V();
|
| 436 |
+
await j(
|
| 437 |
+
o,
|
| 438 |
+
n,
|
| 439 |
+
e.type,
|
| 440 |
+
e.diagramId,
|
| 441 |
+
void 0,
|
| 442 |
+
c
|
| 443 |
+
);
|
| 444 |
+
}, "render");
|
| 445 |
+
export {
|
| 446 |
+
ge as render
|
| 447 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/diagram-3XXCIKAB-xC1Rc_FE.js
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { p as y } from "./chunk-44GW5IO5-I0mkHKCJ.js";
|
| 2 |
+
import { _ as i, s as B, g as S, q as F, p as z, a as E, b as P, D as w, H as W, e as D, y as T, E as _, F as A, l as x } from "./mermaid.core-CfPtPiLZ.js";
|
| 3 |
+
import { p as N } from "./radar-VG2SY3DT-zUt99CZd.js";
|
| 4 |
+
var m = {
|
| 5 |
+
packet: []
|
| 6 |
+
}, v = structuredClone(m), L = A.packet, Y = /* @__PURE__ */ i(() => {
|
| 7 |
+
const t = w({
|
| 8 |
+
...L,
|
| 9 |
+
..._().packet
|
| 10 |
+
});
|
| 11 |
+
return t.showBits && (t.paddingY += 10), t;
|
| 12 |
+
}, "getConfig"), H = /* @__PURE__ */ i(() => v.packet, "getPacket"), I = /* @__PURE__ */ i((t) => {
|
| 13 |
+
t.length > 0 && v.packet.push(t);
|
| 14 |
+
}, "pushWord"), M = /* @__PURE__ */ i(() => {
|
| 15 |
+
T(), v = structuredClone(m);
|
| 16 |
+
}, "clear"), u = {
|
| 17 |
+
pushWord: I,
|
| 18 |
+
getPacket: H,
|
| 19 |
+
getConfig: Y,
|
| 20 |
+
clear: M,
|
| 21 |
+
setAccTitle: P,
|
| 22 |
+
getAccTitle: E,
|
| 23 |
+
setDiagramTitle: z,
|
| 24 |
+
getDiagramTitle: F,
|
| 25 |
+
getAccDescription: S,
|
| 26 |
+
setAccDescription: B
|
| 27 |
+
}, O = 1e4, q = /* @__PURE__ */ i((t) => {
|
| 28 |
+
y(t, u);
|
| 29 |
+
let e = -1, o = [], s = 1;
|
| 30 |
+
const { bitsPerRow: n } = u.getConfig();
|
| 31 |
+
for (let { start: a, end: r, bits: c, label: f } of t.blocks) {
|
| 32 |
+
if (a !== void 0 && r !== void 0 && r < a)
|
| 33 |
+
throw new Error(`Packet block ${a} - ${r} is invalid. End must be greater than start.`);
|
| 34 |
+
if (a ?? (a = e + 1), a !== e + 1)
|
| 35 |
+
throw new Error(
|
| 36 |
+
`Packet block ${a} - ${r ?? a} is not contiguous. It should start from ${e + 1}.`
|
| 37 |
+
);
|
| 38 |
+
if (c === 0)
|
| 39 |
+
throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);
|
| 40 |
+
for (r ?? (r = a + (c ?? 1) - 1), c ?? (c = r - a + 1), e = r, x.debug(`Packet block ${a} - ${e} with label ${f}`); o.length <= n + 1 && u.getPacket().length < O; ) {
|
| 41 |
+
const [d, p] = G({ start: a, end: r, bits: c, label: f }, s, n);
|
| 42 |
+
if (o.push(d), d.end + 1 === s * n && (u.pushWord(o), o = [], s++), !p)
|
| 43 |
+
break;
|
| 44 |
+
({ start: a, end: r, bits: c, label: f } = p);
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
u.pushWord(o);
|
| 48 |
+
}, "populate"), G = /* @__PURE__ */ i((t, e, o) => {
|
| 49 |
+
if (t.start === void 0)
|
| 50 |
+
throw new Error("start should have been set during first phase");
|
| 51 |
+
if (t.end === void 0)
|
| 52 |
+
throw new Error("end should have been set during first phase");
|
| 53 |
+
if (t.start > t.end)
|
| 54 |
+
throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);
|
| 55 |
+
if (t.end + 1 <= e * o)
|
| 56 |
+
return [t, void 0];
|
| 57 |
+
const s = e * o - 1, n = e * o;
|
| 58 |
+
return [
|
| 59 |
+
{
|
| 60 |
+
start: t.start,
|
| 61 |
+
end: s,
|
| 62 |
+
label: t.label,
|
| 63 |
+
bits: s - t.start
|
| 64 |
+
},
|
| 65 |
+
{
|
| 66 |
+
start: n,
|
| 67 |
+
end: t.end,
|
| 68 |
+
label: t.label,
|
| 69 |
+
bits: t.end - n
|
| 70 |
+
}
|
| 71 |
+
];
|
| 72 |
+
}, "getNextFittingBlock"), K = {
|
| 73 |
+
parse: /* @__PURE__ */ i(async (t) => {
|
| 74 |
+
const e = await N("packet", t);
|
| 75 |
+
x.debug(e), q(e);
|
| 76 |
+
}, "parse")
|
| 77 |
+
}, R = /* @__PURE__ */ i((t, e, o, s) => {
|
| 78 |
+
const n = s.db, a = n.getConfig(), { rowHeight: r, paddingY: c, bitWidth: f, bitsPerRow: d } = a, p = n.getPacket(), l = n.getDiagramTitle(), k = r + c, g = k * (p.length + 1) - (l ? 0 : r), b = f * d + 2, h = W(e);
|
| 79 |
+
h.attr("viewbox", `0 0 ${b} ${g}`), D(h, g, b, a.useMaxWidth);
|
| 80 |
+
for (const [C, $] of p.entries())
|
| 81 |
+
U(h, $, C, a);
|
| 82 |
+
h.append("text").text(l).attr("x", b / 2).attr("y", g - k / 2).attr("dominant-baseline", "middle").attr("text-anchor", "middle").attr("class", "packetTitle");
|
| 83 |
+
}, "draw"), U = /* @__PURE__ */ i((t, e, o, { rowHeight: s, paddingX: n, paddingY: a, bitWidth: r, bitsPerRow: c, showBits: f }) => {
|
| 84 |
+
const d = t.append("g"), p = o * (s + a) + a;
|
| 85 |
+
for (const l of e) {
|
| 86 |
+
const k = l.start % c * r + 1, g = (l.end - l.start + 1) * r - n;
|
| 87 |
+
if (d.append("rect").attr("x", k).attr("y", p).attr("width", g).attr("height", s).attr("class", "packetBlock"), d.append("text").attr("x", k + g / 2).attr("y", p + s / 2).attr("class", "packetLabel").attr("dominant-baseline", "middle").attr("text-anchor", "middle").text(l.label), !f)
|
| 88 |
+
continue;
|
| 89 |
+
const b = l.end === l.start, h = p - 2;
|
| 90 |
+
d.append("text").attr("x", k + (b ? g / 2 : 0)).attr("y", h).attr("class", "packetByte start").attr("dominant-baseline", "auto").attr("text-anchor", b ? "middle" : "start").text(l.start), b || d.append("text").attr("x", k + g).attr("y", h).attr("class", "packetByte end").attr("dominant-baseline", "auto").attr("text-anchor", "end").text(l.end);
|
| 91 |
+
}
|
| 92 |
+
}, "drawWord"), X = { draw: R }, j = {
|
| 93 |
+
byteFontSize: "10px",
|
| 94 |
+
startByteColor: "black",
|
| 95 |
+
endByteColor: "black",
|
| 96 |
+
labelColor: "black",
|
| 97 |
+
labelFontSize: "12px",
|
| 98 |
+
titleColor: "black",
|
| 99 |
+
titleFontSize: "14px",
|
| 100 |
+
blockStrokeColor: "black",
|
| 101 |
+
blockStrokeWidth: "1",
|
| 102 |
+
blockFillColor: "#efefef"
|
| 103 |
+
}, J = /* @__PURE__ */ i(({ packet: t } = {}) => {
|
| 104 |
+
const e = w(j, t);
|
| 105 |
+
return `
|
| 106 |
+
.packetByte {
|
| 107 |
+
font-size: ${e.byteFontSize};
|
| 108 |
+
}
|
| 109 |
+
.packetByte.start {
|
| 110 |
+
fill: ${e.startByteColor};
|
| 111 |
+
}
|
| 112 |
+
.packetByte.end {
|
| 113 |
+
fill: ${e.endByteColor};
|
| 114 |
+
}
|
| 115 |
+
.packetLabel {
|
| 116 |
+
fill: ${e.labelColor};
|
| 117 |
+
font-size: ${e.labelFontSize};
|
| 118 |
+
}
|
| 119 |
+
.packetTitle {
|
| 120 |
+
fill: ${e.titleColor};
|
| 121 |
+
font-size: ${e.titleFontSize};
|
| 122 |
+
}
|
| 123 |
+
.packetBlock {
|
| 124 |
+
stroke: ${e.blockStrokeColor};
|
| 125 |
+
stroke-width: ${e.blockStrokeWidth};
|
| 126 |
+
fill: ${e.blockFillColor};
|
| 127 |
+
}
|
| 128 |
+
`;
|
| 129 |
+
}, "styles"), tt = {
|
| 130 |
+
parser: K,
|
| 131 |
+
db: u,
|
| 132 |
+
renderer: X,
|
| 133 |
+
styles: J
|
| 134 |
+
};
|
| 135 |
+
export {
|
| 136 |
+
tt as diagram
|
| 137 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/diagram-DTTGSU4T-D0Xgb2P5.js
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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g as E, q as F, p as I, a as _, b as D, H as G, y as P, D as f, E as C, F as z, l as H, K as V } from "./mermaid.core-CfPtPiLZ.js";
|
| 3 |
+
import { p as W } from "./radar-VG2SY3DT-zUt99CZd.js";
|
| 4 |
+
var x = {
|
| 5 |
+
showLegend: !0,
|
| 6 |
+
ticks: 5,
|
| 7 |
+
max: null,
|
| 8 |
+
min: 0,
|
| 9 |
+
graticule: "circle"
|
| 10 |
+
}, w = {
|
| 11 |
+
axes: [],
|
| 12 |
+
curves: [],
|
| 13 |
+
options: x
|
| 14 |
+
}, h = structuredClone(w), B = z.radar, j = /* @__PURE__ */ l(() => f({
|
| 15 |
+
...B,
|
| 16 |
+
...C().radar
|
| 17 |
+
}), "getConfig"), b = /* @__PURE__ */ l(() => h.axes, "getAxes"), q = /* @__PURE__ */ l(() => h.curves, "getCurves"), K = /* @__PURE__ */ l(() => h.options, "getOptions"), N = /* @__PURE__ */ l((a) => {
|
| 18 |
+
h.axes = a.map((t) => ({
|
| 19 |
+
name: t.name,
|
| 20 |
+
label: t.label ?? t.name
|
| 21 |
+
}));
|
| 22 |
+
}, "setAxes"), U = /* @__PURE__ */ l((a) => {
|
| 23 |
+
h.curves = a.map((t) => ({
|
| 24 |
+
name: t.name,
|
| 25 |
+
label: t.label ?? t.name,
|
| 26 |
+
entries: X(t.entries)
|
| 27 |
+
}));
|
| 28 |
+
}, "setCurves"), X = /* @__PURE__ */ l((a) => {
|
| 29 |
+
if (a[0].axis == null)
|
| 30 |
+
return a.map((e) => e.value);
|
| 31 |
+
const t = b();
|
| 32 |
+
if (t.length === 0)
|
| 33 |
+
throw new Error("Axes must be populated before curves for reference entries");
|
| 34 |
+
return t.map((e) => {
|
| 35 |
+
const r = a.find((s) => {
|
| 36 |
+
var o;
|
| 37 |
+
return ((o = s.axis) == null ? void 0 : o.$refText) === e.name;
|
| 38 |
+
});
|
| 39 |
+
if (r === void 0)
|
| 40 |
+
throw new Error("Missing entry for axis " + e.label);
|
| 41 |
+
return r.value;
|
| 42 |
+
});
|
| 43 |
+
}, "computeCurveEntries"), Y = /* @__PURE__ */ l((a) => {
|
| 44 |
+
var e, r, s, o, i;
|
| 45 |
+
const t = a.reduce(
|
| 46 |
+
(n, c) => (n[c.name] = c, n),
|
| 47 |
+
{}
|
| 48 |
+
);
|
| 49 |
+
h.options = {
|
| 50 |
+
showLegend: ((e = t.showLegend) == null ? void 0 : e.value) ?? x.showLegend,
|
| 51 |
+
ticks: ((r = t.ticks) == null ? void 0 : r.value) ?? x.ticks,
|
| 52 |
+
max: ((s = t.max) == null ? void 0 : s.value) ?? x.max,
|
| 53 |
+
min: ((o = t.min) == null ? void 0 : o.value) ?? x.min,
|
| 54 |
+
graticule: ((i = t.graticule) == null ? void 0 : i.value) ?? x.graticule
|
| 55 |
+
};
|
| 56 |
+
}, "setOptions"), Z = /* @__PURE__ */ l(() => {
|
| 57 |
+
P(), h = structuredClone(w);
|
| 58 |
+
}, "clear"), $ = {
|
| 59 |
+
getAxes: b,
|
| 60 |
+
getCurves: q,
|
| 61 |
+
getOptions: K,
|
| 62 |
+
setAxes: N,
|
| 63 |
+
setCurves: U,
|
| 64 |
+
setOptions: Y,
|
| 65 |
+
getConfig: j,
|
| 66 |
+
clear: Z,
|
| 67 |
+
setAccTitle: D,
|
| 68 |
+
getAccTitle: _,
|
| 69 |
+
setDiagramTitle: I,
|
| 70 |
+
getDiagramTitle: F,
|
| 71 |
+
getAccDescription: E,
|
| 72 |
+
setAccDescription: R
|
| 73 |
+
}, J = /* @__PURE__ */ l((a) => {
|
| 74 |
+
k(a, $);
|
| 75 |
+
const { axes: t, curves: e, options: r } = a;
|
| 76 |
+
$.setAxes(t), $.setCurves(e), $.setOptions(r);
|
| 77 |
+
}, "populate"), Q = {
|
| 78 |
+
parse: /* @__PURE__ */ l(async (a) => {
|
| 79 |
+
const t = await W("radar", a);
|
| 80 |
+
H.debug(t), J(t);
|
| 81 |
+
}, "parse")
|
| 82 |
+
}, tt = /* @__PURE__ */ l((a, t, e, r) => {
|
| 83 |
+
const s = r.db, o = s.getAxes(), i = s.getCurves(), n = s.getOptions(), c = s.getConfig(), d = s.getDiagramTitle(), p = G(t), u = et(p, c), g = n.max ?? Math.max(...i.map((y) => Math.max(...y.entries))), m = n.min, v = Math.min(c.width, c.height) / 2;
|
| 84 |
+
at(u, o, v, n.ticks, n.graticule), rt(u, o, v, c), M(u, o, i, m, g, n.graticule, c), T(u, i, n.showLegend, c), u.append("text").attr("class", "radarTitle").text(d).attr("x", 0).attr("y", -c.height / 2 - c.marginTop);
|
| 85 |
+
}, "draw"), et = /* @__PURE__ */ l((a, t) => {
|
| 86 |
+
const e = t.width + t.marginLeft + t.marginRight, r = t.height + t.marginTop + t.marginBottom, s = {
|
| 87 |
+
x: t.marginLeft + t.width / 2,
|
| 88 |
+
y: t.marginTop + t.height / 2
|
| 89 |
+
};
|
| 90 |
+
return a.attr("viewbox", `0 0 ${e} ${r}`).attr("width", e).attr("height", r), a.append("g").attr("transform", `translate(${s.x}, ${s.y})`);
|
| 91 |
+
}, "drawFrame"), at = /* @__PURE__ */ l((a, t, e, r, s) => {
|
| 92 |
+
if (s === "circle")
|
| 93 |
+
for (let o = 0; o < r; o++) {
|
| 94 |
+
const i = e * (o + 1) / r;
|
| 95 |
+
a.append("circle").attr("r", i).attr("class", "radarGraticule");
|
| 96 |
+
}
|
| 97 |
+
else if (s === "polygon") {
|
| 98 |
+
const o = t.length;
|
| 99 |
+
for (let i = 0; i < r; i++) {
|
| 100 |
+
const n = e * (i + 1) / r, c = t.map((d, p) => {
|
| 101 |
+
const u = 2 * p * Math.PI / o - Math.PI / 2, g = n * Math.cos(u), m = n * Math.sin(u);
|
| 102 |
+
return `${g},${m}`;
|
| 103 |
+
}).join(" ");
|
| 104 |
+
a.append("polygon").attr("points", c).attr("class", "radarGraticule");
|
| 105 |
+
}
|
| 106 |
+
}
|
| 107 |
+
}, "drawGraticule"), rt = /* @__PURE__ */ l((a, t, e, r) => {
|
| 108 |
+
const s = t.length;
|
| 109 |
+
for (let o = 0; o < s; o++) {
|
| 110 |
+
const i = t[o].label, n = 2 * o * Math.PI / s - Math.PI / 2;
|
| 111 |
+
a.append("line").attr("x1", 0).attr("y1", 0).attr("x2", e * r.axisScaleFactor * Math.cos(n)).attr("y2", e * r.axisScaleFactor * Math.sin(n)).attr("class", "radarAxisLine"), a.append("text").text(i).attr("x", e * r.axisLabelFactor * Math.cos(n)).attr("y", e * r.axisLabelFactor * Math.sin(n)).attr("class", "radarAxisLabel");
|
| 112 |
+
}
|
| 113 |
+
}, "drawAxes");
|
| 114 |
+
function M(a, t, e, r, s, o, i) {
|
| 115 |
+
const n = t.length, c = Math.min(i.width, i.height) / 2;
|
| 116 |
+
e.forEach((d, p) => {
|
| 117 |
+
if (d.entries.length !== n)
|
| 118 |
+
return;
|
| 119 |
+
const u = d.entries.map((g, m) => {
|
| 120 |
+
const v = 2 * Math.PI * m / n - Math.PI / 2, y = A(g, r, s, c), O = y * Math.cos(v), S = y * Math.sin(v);
|
| 121 |
+
return { x: O, y: S };
|
| 122 |
+
});
|
| 123 |
+
o === "circle" ? a.append("path").attr("d", L(u, i.curveTension)).attr("class", `radarCurve-${p}`) : o === "polygon" && a.append("polygon").attr("points", u.map((g) => `${g.x},${g.y}`).join(" ")).attr("class", `radarCurve-${p}`);
|
| 124 |
+
});
|
| 125 |
+
}
|
| 126 |
+
l(M, "drawCurves");
|
| 127 |
+
function A(a, t, e, r) {
|
| 128 |
+
const s = Math.min(Math.max(a, t), e);
|
| 129 |
+
return r * (s - t) / (e - t);
|
| 130 |
+
}
|
| 131 |
+
l(A, "relativeRadius");
|
| 132 |
+
function L(a, t) {
|
| 133 |
+
const e = a.length;
|
| 134 |
+
let r = `M${a[0].x},${a[0].y}`;
|
| 135 |
+
for (let s = 0; s < e; s++) {
|
| 136 |
+
const o = a[(s - 1 + e) % e], i = a[s], n = a[(s + 1) % e], c = a[(s + 2) % e], d = {
|
| 137 |
+
x: i.x + (n.x - o.x) * t,
|
| 138 |
+
y: i.y + (n.y - o.y) * t
|
| 139 |
+
}, p = {
|
| 140 |
+
x: n.x - (c.x - i.x) * t,
|
| 141 |
+
y: n.y - (c.y - i.y) * t
|
| 142 |
+
};
|
| 143 |
+
r += ` C${d.x},${d.y} ${p.x},${p.y} ${n.x},${n.y}`;
|
| 144 |
+
}
|
| 145 |
+
return `${r} Z`;
|
| 146 |
+
}
|
| 147 |
+
l(L, "closedRoundCurve");
|
| 148 |
+
function T(a, t, e, r) {
|
| 149 |
+
if (!e)
|
| 150 |
+
return;
|
| 151 |
+
const s = (r.width / 2 + r.marginRight) * 3 / 4, o = -(r.height / 2 + r.marginTop) * 3 / 4, i = 20;
|
| 152 |
+
t.forEach((n, c) => {
|
| 153 |
+
const d = a.append("g").attr("transform", `translate(${s}, ${o + c * i})`);
|
| 154 |
+
d.append("rect").attr("width", 12).attr("height", 12).attr("class", `radarLegendBox-${c}`), d.append("text").attr("x", 16).attr("y", 0).attr("class", "radarLegendText").text(n.label);
|
| 155 |
+
});
|
| 156 |
+
}
|
| 157 |
+
l(T, "drawLegend");
|
| 158 |
+
var st = { draw: tt }, nt = /* @__PURE__ */ l((a, t) => {
|
| 159 |
+
let e = "";
|
| 160 |
+
for (let r = 0; r < a.THEME_COLOR_LIMIT; r++) {
|
| 161 |
+
const s = a[`cScale${r}`];
|
| 162 |
+
e += `
|
| 163 |
+
.radarCurve-${r} {
|
| 164 |
+
color: ${s};
|
| 165 |
+
fill: ${s};
|
| 166 |
+
fill-opacity: ${t.curveOpacity};
|
| 167 |
+
stroke: ${s};
|
| 168 |
+
stroke-width: ${t.curveStrokeWidth};
|
| 169 |
+
}
|
| 170 |
+
.radarLegendBox-${r} {
|
| 171 |
+
fill: ${s};
|
| 172 |
+
fill-opacity: ${t.curveOpacity};
|
| 173 |
+
stroke: ${s};
|
| 174 |
+
}
|
| 175 |
+
`;
|
| 176 |
+
}
|
| 177 |
+
return e;
|
| 178 |
+
}, "genIndexStyles"), ot = /* @__PURE__ */ l((a) => {
|
| 179 |
+
const t = V(), e = C(), r = f(t, e.themeVariables), s = f(r.radar, a);
|
| 180 |
+
return { themeVariables: r, radarOptions: s };
|
| 181 |
+
}, "buildRadarStyleOptions"), it = /* @__PURE__ */ l(({ radar: a } = {}) => {
|
| 182 |
+
const { themeVariables: t, radarOptions: e } = ot(a);
|
| 183 |
+
return `
|
| 184 |
+
.radarTitle {
|
| 185 |
+
font-size: ${t.fontSize};
|
| 186 |
+
color: ${t.titleColor};
|
| 187 |
+
dominant-baseline: hanging;
|
| 188 |
+
text-anchor: middle;
|
| 189 |
+
}
|
| 190 |
+
.radarAxisLine {
|
| 191 |
+
stroke: ${e.axisColor};
|
| 192 |
+
stroke-width: ${e.axisStrokeWidth};
|
| 193 |
+
}
|
| 194 |
+
.radarAxisLabel {
|
| 195 |
+
dominant-baseline: middle;
|
| 196 |
+
text-anchor: middle;
|
| 197 |
+
font-size: ${e.axisLabelFontSize}px;
|
| 198 |
+
color: ${e.axisColor};
|
| 199 |
+
}
|
| 200 |
+
.radarGraticule {
|
| 201 |
+
fill: ${e.graticuleColor};
|
| 202 |
+
fill-opacity: ${e.graticuleOpacity};
|
| 203 |
+
stroke: ${e.graticuleColor};
|
| 204 |
+
stroke-width: ${e.graticuleStrokeWidth};
|
| 205 |
+
}
|
| 206 |
+
.radarLegendText {
|
| 207 |
+
text-anchor: start;
|
| 208 |
+
font-size: ${e.legendFontSize}px;
|
| 209 |
+
dominant-baseline: hanging;
|
| 210 |
+
}
|
| 211 |
+
${nt(t, e)}
|
| 212 |
+
`;
|
| 213 |
+
}, "styles"), ut = {
|
| 214 |
+
parser: Q,
|
| 215 |
+
db: $,
|
| 216 |
+
renderer: st,
|
| 217 |
+
styles: it
|
| 218 |
+
};
|
| 219 |
+
export {
|
| 220 |
+
ut as diagram
|
| 221 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/erDiagram-FWMTN743-CXWkY-HF.js
ADDED
|
@@ -0,0 +1,841 @@
|
|
|
|
|
|
|
|
|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Mt, g as Bt, p as Ft, q as Yt, c as tt, l as D, y as Pt, x as zt, A as Gt, B as Kt, o as Zt, r as Ut, d as jt, u as Wt } from "./mermaid.core-CfPtPiLZ.js";
|
| 3 |
+
import { c as Qt } from "./channel-DO4s0fWC.js";
|
| 4 |
+
var dt = function() {
|
| 5 |
+
var s = /* @__PURE__ */ u(function(R, n, a, c) {
|
| 6 |
+
for (a = a || {}, c = R.length; c--; a[R[c]] = n) ;
|
| 7 |
+
return a;
|
| 8 |
+
}, "o"), i = [6, 8, 10, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 50], h = [1, 10], d = [1, 11], o = [1, 12], l = [1, 13], f = [1, 20], _ = [1, 21], E = [1, 22], V = [1, 23], Z = [1, 24], S = [1, 19], et = [1, 25], U = [1, 26], T = [1, 18], L = [1, 33], st = [1, 34], it = [1, 35], rt = [1, 36], nt = [1, 37], pt = [6, 8, 10, 13, 15, 17, 20, 21, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 43, 44, 50, 63, 64, 65, 66, 67], O = [1, 42], A = [1, 43], M = [1, 52], B = [40, 50, 68, 69], F = [1, 63], Y = [1, 61], N = [1, 58], P = [1, 62], z = [1, 64], j = [6, 8, 10, 13, 17, 22, 24, 26, 28, 33, 34, 35, 36, 37, 40, 41, 42, 43, 44, 48, 49, 50, 63, 64, 65, 66, 67], yt = [63, 64, 65, 66, 67], ft = [1, 81], _t = [1, 80], gt = [1, 78], bt = [1, 79], mt = [6, 10, 42, 47], v = [6, 10, 13, 41, 42, 47, 48, 49], W = [1, 89], Q = [1, 88], X = [1, 87], G = [19, 56], Et = [1, 98], kt = [1, 97], at = [19, 56, 58, 60], ct = {
|
| 9 |
+
trace: /* @__PURE__ */ u(function() {
|
| 10 |
+
}, "trace"),
|
| 11 |
+
yy: {},
|
| 12 |
+
symbols_: { error: 2, start: 3, ER_DIAGRAM: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, entityName: 11, relSpec: 12, COLON: 13, role: 14, STYLE_SEPARATOR: 15, idList: 16, BLOCK_START: 17, attributes: 18, BLOCK_STOP: 19, SQS: 20, SQE: 21, title: 22, title_value: 23, acc_title: 24, acc_title_value: 25, acc_descr: 26, acc_descr_value: 27, acc_descr_multiline_value: 28, direction: 29, classDefStatement: 30, classStatement: 31, styleStatement: 32, direction_tb: 33, direction_bt: 34, direction_rl: 35, direction_lr: 36, CLASSDEF: 37, stylesOpt: 38, separator: 39, UNICODE_TEXT: 40, STYLE_TEXT: 41, COMMA: 42, CLASS: 43, STYLE: 44, style: 45, styleComponent: 46, SEMI: 47, NUM: 48, BRKT: 49, ENTITY_NAME: 50, attribute: 51, attributeType: 52, attributeName: 53, attributeKeyTypeList: 54, attributeComment: 55, ATTRIBUTE_WORD: 56, attributeKeyType: 57, ",": 58, ATTRIBUTE_KEY: 59, COMMENT: 60, cardinality: 61, relType: 62, ZERO_OR_ONE: 63, ZERO_OR_MORE: 64, ONE_OR_MORE: 65, ONLY_ONE: 66, MD_PARENT: 67, NON_IDENTIFYING: 68, IDENTIFYING: 69, WORD: 70, $accept: 0, $end: 1 },
|
| 13 |
+
terminals_: { 2: "error", 4: "ER_DIAGRAM", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 13: "COLON", 15: "STYLE_SEPARATOR", 17: "BLOCK_START", 19: "BLOCK_STOP", 20: "SQS", 21: "SQE", 22: "title", 23: "title_value", 24: "acc_title", 25: "acc_title_value", 26: "acc_descr", 27: "acc_descr_value", 28: "acc_descr_multiline_value", 33: "direction_tb", 34: "direction_bt", 35: "direction_rl", 36: "direction_lr", 37: "CLASSDEF", 40: "UNICODE_TEXT", 41: "STYLE_TEXT", 42: "COMMA", 43: "CLASS", 44: "STYLE", 47: "SEMI", 48: "NUM", 49: "BRKT", 50: "ENTITY_NAME", 56: "ATTRIBUTE_WORD", 58: ",", 59: "ATTRIBUTE_KEY", 60: "COMMENT", 63: "ZERO_OR_ONE", 64: "ZERO_OR_MORE", 65: "ONE_OR_MORE", 66: "ONLY_ONE", 67: "MD_PARENT", 68: "NON_IDENTIFYING", 69: "IDENTIFYING", 70: "WORD" },
|
| 14 |
+
productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 5], [9, 9], [9, 7], [9, 7], [9, 4], [9, 6], [9, 3], [9, 5], [9, 1], [9, 3], [9, 7], [9, 9], [9, 6], [9, 8], [9, 4], [9, 6], [9, 2], [9, 2], [9, 2], [9, 1], [9, 1], [9, 1], [9, 1], [9, 1], [29, 1], [29, 1], [29, 1], [29, 1], [30, 4], [16, 1], [16, 1], [16, 3], [16, 3], [31, 3], [32, 4], [38, 1], [38, 3], [45, 1], [45, 2], [39, 1], [39, 1], [39, 1], [46, 1], [46, 1], [46, 1], [46, 1], [11, 1], [11, 1], [18, 1], [18, 2], [51, 2], [51, 3], [51, 3], [51, 4], [52, 1], [53, 1], [54, 1], [54, 3], [57, 1], [55, 1], [12, 3], [61, 1], [61, 1], [61, 1], [61, 1], [61, 1], [62, 1], [62, 1], [14, 1], [14, 1], [14, 1]],
|
| 15 |
+
performAction: /* @__PURE__ */ u(function(n, a, c, r, p, t, K) {
|
| 16 |
+
var e = t.length - 1;
|
| 17 |
+
switch (p) {
|
| 18 |
+
case 1:
|
| 19 |
+
break;
|
| 20 |
+
case 2:
|
| 21 |
+
this.$ = [];
|
| 22 |
+
break;
|
| 23 |
+
case 3:
|
| 24 |
+
t[e - 1].push(t[e]), this.$ = t[e - 1];
|
| 25 |
+
break;
|
| 26 |
+
case 4:
|
| 27 |
+
case 5:
|
| 28 |
+
this.$ = t[e];
|
| 29 |
+
break;
|
| 30 |
+
case 6:
|
| 31 |
+
case 7:
|
| 32 |
+
this.$ = [];
|
| 33 |
+
break;
|
| 34 |
+
case 8:
|
| 35 |
+
r.addEntity(t[e - 4]), r.addEntity(t[e - 2]), r.addRelationship(t[e - 4], t[e], t[e - 2], t[e - 3]);
|
| 36 |
+
break;
|
| 37 |
+
case 9:
|
| 38 |
+
r.addEntity(t[e - 8]), r.addEntity(t[e - 4]), r.addRelationship(t[e - 8], t[e], t[e - 4], t[e - 5]), r.setClass([t[e - 8]], t[e - 6]), r.setClass([t[e - 4]], t[e - 2]);
|
| 39 |
+
break;
|
| 40 |
+
case 10:
|
| 41 |
+
r.addEntity(t[e - 6]), r.addEntity(t[e - 2]), r.addRelationship(t[e - 6], t[e], t[e - 2], t[e - 3]), r.setClass([t[e - 6]], t[e - 4]);
|
| 42 |
+
break;
|
| 43 |
+
case 11:
|
| 44 |
+
r.addEntity(t[e - 6]), r.addEntity(t[e - 4]), r.addRelationship(t[e - 6], t[e], t[e - 4], t[e - 5]), r.setClass([t[e - 4]], t[e - 2]);
|
| 45 |
+
break;
|
| 46 |
+
case 12:
|
| 47 |
+
r.addEntity(t[e - 3]), r.addAttributes(t[e - 3], t[e - 1]);
|
| 48 |
+
break;
|
| 49 |
+
case 13:
|
| 50 |
+
r.addEntity(t[e - 5]), r.addAttributes(t[e - 5], t[e - 1]), r.setClass([t[e - 5]], t[e - 3]);
|
| 51 |
+
break;
|
| 52 |
+
case 14:
|
| 53 |
+
r.addEntity(t[e - 2]);
|
| 54 |
+
break;
|
| 55 |
+
case 15:
|
| 56 |
+
r.addEntity(t[e - 4]), r.setClass([t[e - 4]], t[e - 2]);
|
| 57 |
+
break;
|
| 58 |
+
case 16:
|
| 59 |
+
r.addEntity(t[e]);
|
| 60 |
+
break;
|
| 61 |
+
case 17:
|
| 62 |
+
r.addEntity(t[e - 2]), r.setClass([t[e - 2]], t[e]);
|
| 63 |
+
break;
|
| 64 |
+
case 18:
|
| 65 |
+
r.addEntity(t[e - 6], t[e - 4]), r.addAttributes(t[e - 6], t[e - 1]);
|
| 66 |
+
break;
|
| 67 |
+
case 19:
|
| 68 |
+
r.addEntity(t[e - 8], t[e - 6]), r.addAttributes(t[e - 8], t[e - 1]), r.setClass([t[e - 8]], t[e - 3]);
|
| 69 |
+
break;
|
| 70 |
+
case 20:
|
| 71 |
+
r.addEntity(t[e - 5], t[e - 3]);
|
| 72 |
+
break;
|
| 73 |
+
case 21:
|
| 74 |
+
r.addEntity(t[e - 7], t[e - 5]), r.setClass([t[e - 7]], t[e - 2]);
|
| 75 |
+
break;
|
| 76 |
+
case 22:
|
| 77 |
+
r.addEntity(t[e - 3], t[e - 1]);
|
| 78 |
+
break;
|
| 79 |
+
case 23:
|
| 80 |
+
r.addEntity(t[e - 5], t[e - 3]), r.setClass([t[e - 5]], t[e]);
|
| 81 |
+
break;
|
| 82 |
+
case 24:
|
| 83 |
+
case 25:
|
| 84 |
+
this.$ = t[e].trim(), r.setAccTitle(this.$);
|
| 85 |
+
break;
|
| 86 |
+
case 26:
|
| 87 |
+
case 27:
|
| 88 |
+
this.$ = t[e].trim(), r.setAccDescription(this.$);
|
| 89 |
+
break;
|
| 90 |
+
case 32:
|
| 91 |
+
r.setDirection("TB");
|
| 92 |
+
break;
|
| 93 |
+
case 33:
|
| 94 |
+
r.setDirection("BT");
|
| 95 |
+
break;
|
| 96 |
+
case 34:
|
| 97 |
+
r.setDirection("RL");
|
| 98 |
+
break;
|
| 99 |
+
case 35:
|
| 100 |
+
r.setDirection("LR");
|
| 101 |
+
break;
|
| 102 |
+
case 36:
|
| 103 |
+
this.$ = t[e - 3], r.addClass(t[e - 2], t[e - 1]);
|
| 104 |
+
break;
|
| 105 |
+
case 37:
|
| 106 |
+
case 38:
|
| 107 |
+
case 56:
|
| 108 |
+
case 64:
|
| 109 |
+
this.$ = [t[e]];
|
| 110 |
+
break;
|
| 111 |
+
case 39:
|
| 112 |
+
case 40:
|
| 113 |
+
this.$ = t[e - 2].concat([t[e]]);
|
| 114 |
+
break;
|
| 115 |
+
case 41:
|
| 116 |
+
this.$ = t[e - 2], r.setClass(t[e - 1], t[e]);
|
| 117 |
+
break;
|
| 118 |
+
case 42:
|
| 119 |
+
this.$ = t[e - 3], r.addCssStyles(t[e - 2], t[e - 1]);
|
| 120 |
+
break;
|
| 121 |
+
case 43:
|
| 122 |
+
this.$ = [t[e]];
|
| 123 |
+
break;
|
| 124 |
+
case 44:
|
| 125 |
+
t[e - 2].push(t[e]), this.$ = t[e - 2];
|
| 126 |
+
break;
|
| 127 |
+
case 46:
|
| 128 |
+
this.$ = t[e - 1] + t[e];
|
| 129 |
+
break;
|
| 130 |
+
case 54:
|
| 131 |
+
case 76:
|
| 132 |
+
case 77:
|
| 133 |
+
this.$ = t[e].replace(/"/g, "");
|
| 134 |
+
break;
|
| 135 |
+
case 55:
|
| 136 |
+
case 78:
|
| 137 |
+
this.$ = t[e];
|
| 138 |
+
break;
|
| 139 |
+
case 57:
|
| 140 |
+
t[e].push(t[e - 1]), this.$ = t[e];
|
| 141 |
+
break;
|
| 142 |
+
case 58:
|
| 143 |
+
this.$ = { type: t[e - 1], name: t[e] };
|
| 144 |
+
break;
|
| 145 |
+
case 59:
|
| 146 |
+
this.$ = { type: t[e - 2], name: t[e - 1], keys: t[e] };
|
| 147 |
+
break;
|
| 148 |
+
case 60:
|
| 149 |
+
this.$ = { type: t[e - 2], name: t[e - 1], comment: t[e] };
|
| 150 |
+
break;
|
| 151 |
+
case 61:
|
| 152 |
+
this.$ = { type: t[e - 3], name: t[e - 2], keys: t[e - 1], comment: t[e] };
|
| 153 |
+
break;
|
| 154 |
+
case 62:
|
| 155 |
+
case 63:
|
| 156 |
+
case 66:
|
| 157 |
+
this.$ = t[e];
|
| 158 |
+
break;
|
| 159 |
+
case 65:
|
| 160 |
+
t[e - 2].push(t[e]), this.$ = t[e - 2];
|
| 161 |
+
break;
|
| 162 |
+
case 67:
|
| 163 |
+
this.$ = t[e].replace(/"/g, "");
|
| 164 |
+
break;
|
| 165 |
+
case 68:
|
| 166 |
+
this.$ = { cardA: t[e], relType: t[e - 1], cardB: t[e - 2] };
|
| 167 |
+
break;
|
| 168 |
+
case 69:
|
| 169 |
+
this.$ = r.Cardinality.ZERO_OR_ONE;
|
| 170 |
+
break;
|
| 171 |
+
case 70:
|
| 172 |
+
this.$ = r.Cardinality.ZERO_OR_MORE;
|
| 173 |
+
break;
|
| 174 |
+
case 71:
|
| 175 |
+
this.$ = r.Cardinality.ONE_OR_MORE;
|
| 176 |
+
break;
|
| 177 |
+
case 72:
|
| 178 |
+
this.$ = r.Cardinality.ONLY_ONE;
|
| 179 |
+
break;
|
| 180 |
+
case 73:
|
| 181 |
+
this.$ = r.Cardinality.MD_PARENT;
|
| 182 |
+
break;
|
| 183 |
+
case 74:
|
| 184 |
+
this.$ = r.Identification.NON_IDENTIFYING;
|
| 185 |
+
break;
|
| 186 |
+
case 75:
|
| 187 |
+
this.$ = r.Identification.IDENTIFYING;
|
| 188 |
+
break;
|
| 189 |
+
}
|
| 190 |
+
}, "anonymous"),
|
| 191 |
+
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, s(i, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 9, 22: h, 24: d, 26: o, 28: l, 29: 14, 30: 15, 31: 16, 32: 17, 33: f, 34: _, 35: E, 36: V, 37: Z, 40: S, 43: et, 44: U, 50: T }, s(i, [2, 7], { 1: [2, 1] }), s(i, [2, 3]), { 9: 27, 11: 9, 22: h, 24: d, 26: o, 28: l, 29: 14, 30: 15, 31: 16, 32: 17, 33: f, 34: _, 35: E, 36: V, 37: Z, 40: S, 43: et, 44: U, 50: T }, s(i, [2, 5]), s(i, [2, 6]), s(i, [2, 16], { 12: 28, 61: 32, 15: [1, 29], 17: [1, 30], 20: [1, 31], 63: L, 64: st, 65: it, 66: rt, 67: nt }), { 23: [1, 38] }, { 25: [1, 39] }, { 27: [1, 40] }, s(i, [2, 27]), s(i, [2, 28]), s(i, [2, 29]), s(i, [2, 30]), s(i, [2, 31]), s(pt, [2, 54]), s(pt, [2, 55]), s(i, [2, 32]), s(i, [2, 33]), s(i, [2, 34]), s(i, [2, 35]), { 16: 41, 40: O, 41: A }, { 16: 44, 40: O, 41: A }, { 16: 45, 40: O, 41: A }, s(i, [2, 4]), { 11: 46, 40: S, 50: T }, { 16: 47, 40: O, 41: A }, { 18: 48, 19: [1, 49], 51: 50, 52: 51, 56: M }, { 11: 53, 40: S, 50: T }, { 62: 54, 68: [1, 55], 69: [1, 56] }, s(B, [2, 69]), s(B, [2, 70]), s(B, [2, 71]), s(B, [2, 72]), s(B, [2, 73]), s(i, [2, 24]), s(i, [2, 25]), s(i, [2, 26]), { 13: F, 38: 57, 41: Y, 42: N, 45: 59, 46: 60, 48: P, 49: z }, s(j, [2, 37]), s(j, [2, 38]), { 16: 65, 40: O, 41: A, 42: N }, { 13: F, 38: 66, 41: Y, 42: N, 45: 59, 46: 60, 48: P, 49: z }, { 13: [1, 67], 15: [1, 68] }, s(i, [2, 17], { 61: 32, 12: 69, 17: [1, 70], 42: N, 63: L, 64: st, 65: it, 66: rt, 67: nt }), { 19: [1, 71] }, s(i, [2, 14]), { 18: 72, 19: [2, 56], 51: 50, 52: 51, 56: M }, { 53: 73, 56: [1, 74] }, { 56: [2, 62] }, { 21: [1, 75] }, { 61: 76, 63: L, 64: st, 65: it, 66: rt, 67: nt }, s(yt, [2, 74]), s(yt, [2, 75]), { 6: ft, 10: _t, 39: 77, 42: gt, 47: bt }, { 40: [1, 82], 41: [1, 83] }, s(mt, [2, 43], { 46: 84, 13: F, 41: Y, 48: P, 49: z }), s(v, [2, 45]), s(v, [2, 50]), s(v, [2, 51]), s(v, [2, 52]), s(v, [2, 53]), s(i, [2, 41], { 42: N }), { 6: ft, 10: _t, 39: 85, 42: gt, 47: bt }, { 14: 86, 40: W, 50: Q, 70: X }, { 16: 90, 40: O, 41: A }, { 11: 91, 40: S, 50: T }, { 18: 92, 19: [1, 93], 51: 50, 52: 51, 56: M }, s(i, [2, 12]), { 19: [2, 57] }, s(G, [2, 58], { 54: 94, 55: 95, 57: 96, 59: Et, 60: kt }), s([19, 56, 59, 60], [2, 63]), s(i, [2, 22], { 15: [1, 100], 17: [1, 99] }), s([40, 50], [2, 68]), s(i, [2, 36]), { 13: F, 41: Y, 45: 101, 46: 60, 48: P, 49: z }, s(i, [2, 47]), s(i, [2, 48]), s(i, [2, 49]), s(j, [2, 39]), s(j, [2, 40]), s(v, [2, 46]), s(i, [2, 42]), s(i, [2, 8]), s(i, [2, 76]), s(i, [2, 77]), s(i, [2, 78]), { 13: [1, 102], 42: N }, { 13: [1, 104], 15: [1, 103] }, { 19: [1, 105] }, s(i, [2, 15]), s(G, [2, 59], { 55: 106, 58: [1, 107], 60: kt }), s(G, [2, 60]), s(at, [2, 64]), s(G, [2, 67]), s(at, [2, 66]), { 18: 108, 19: [1, 109], 51: 50, 52: 51, 56: M }, { 16: 110, 40: O, 41: A }, s(mt, [2, 44], { 46: 84, 13: F, 41: Y, 48: P, 49: z }), { 14: 111, 40: W, 50: Q, 70: X }, { 16: 112, 40: O, 41: A }, { 14: 113, 40: W, 50: Q, 70: X }, s(i, [2, 13]), s(G, [2, 61]), { 57: 114, 59: Et }, { 19: [1, 115] }, s(i, [2, 20]), s(i, [2, 23], { 17: [1, 116], 42: N }), s(i, [2, 11]), { 13: [1, 117], 42: N }, s(i, [2, 10]), s(at, [2, 65]), s(i, [2, 18]), { 18: 118, 19: [1, 119], 51: 50, 52: 51, 56: M }, { 14: 120, 40: W, 50: Q, 70: X }, { 19: [1, 121] }, s(i, [2, 21]), s(i, [2, 9]), s(i, [2, 19])],
|
| 192 |
+
defaultActions: { 52: [2, 62], 72: [2, 57] },
|
| 193 |
+
parseError: /* @__PURE__ */ u(function(n, a) {
|
| 194 |
+
if (a.recoverable)
|
| 195 |
+
this.trace(n);
|
| 196 |
+
else {
|
| 197 |
+
var c = new Error(n);
|
| 198 |
+
throw c.hash = a, c;
|
| 199 |
+
}
|
| 200 |
+
}, "parseError"),
|
| 201 |
+
parse: /* @__PURE__ */ u(function(n) {
|
| 202 |
+
var a = this, c = [0], r = [], p = [null], t = [], K = this.table, e = "", H = 0, St = 0, xt = 2, Tt = 1, It = t.slice.call(arguments, 1), y = Object.create(this.lexer), x = { yy: {} };
|
| 203 |
+
for (var lt in this.yy)
|
| 204 |
+
Object.prototype.hasOwnProperty.call(this.yy, lt) && (x.yy[lt] = this.yy[lt]);
|
| 205 |
+
y.setInput(n, x.yy), x.yy.lexer = y, x.yy.parser = this, typeof y.yylloc > "u" && (y.yylloc = {});
|
| 206 |
+
var ot = y.yylloc;
|
| 207 |
+
t.push(ot);
|
| 208 |
+
var vt = y.options && y.options.ranges;
|
| 209 |
+
typeof x.yy.parseError == "function" ? this.parseError = x.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
| 210 |
+
function Ct(b) {
|
| 211 |
+
c.length = c.length - 2 * b, p.length = p.length - b, t.length = t.length - b;
|
| 212 |
+
}
|
| 213 |
+
u(Ct, "popStack");
|
| 214 |
+
function Ot() {
|
| 215 |
+
var b;
|
| 216 |
+
return b = r.pop() || y.lex() || Tt, typeof b != "number" && (b instanceof Array && (r = b, b = r.pop()), b = a.symbols_[b] || b), b;
|
| 217 |
+
}
|
| 218 |
+
u(Ot, "lex");
|
| 219 |
+
for (var g, I, m, ht, C = {}, J, k, At, $; ; ) {
|
| 220 |
+
if (I = c[c.length - 1], this.defaultActions[I] ? m = this.defaultActions[I] : ((g === null || typeof g > "u") && (g = Ot()), m = K[I] && K[I][g]), typeof m > "u" || !m.length || !m[0]) {
|
| 221 |
+
var ut = "";
|
| 222 |
+
$ = [];
|
| 223 |
+
for (J in K[I])
|
| 224 |
+
this.terminals_[J] && J > xt && $.push("'" + this.terminals_[J] + "'");
|
| 225 |
+
y.showPosition ? ut = "Parse error on line " + (H + 1) + `:
|
| 226 |
+
` + y.showPosition() + `
|
| 227 |
+
Expecting ` + $.join(", ") + ", got '" + (this.terminals_[g] || g) + "'" : ut = "Parse error on line " + (H + 1) + ": Unexpected " + (g == Tt ? "end of input" : "'" + (this.terminals_[g] || g) + "'"), this.parseError(ut, {
|
| 228 |
+
text: y.match,
|
| 229 |
+
token: this.terminals_[g] || g,
|
| 230 |
+
line: y.yylineno,
|
| 231 |
+
loc: ot,
|
| 232 |
+
expected: $
|
| 233 |
+
});
|
| 234 |
+
}
|
| 235 |
+
if (m[0] instanceof Array && m.length > 1)
|
| 236 |
+
throw new Error("Parse Error: multiple actions possible at state: " + I + ", token: " + g);
|
| 237 |
+
switch (m[0]) {
|
| 238 |
+
case 1:
|
| 239 |
+
c.push(g), p.push(y.yytext), t.push(y.yylloc), c.push(m[1]), g = null, St = y.yyleng, e = y.yytext, H = y.yylineno, ot = y.yylloc;
|
| 240 |
+
break;
|
| 241 |
+
case 2:
|
| 242 |
+
if (k = this.productions_[m[1]][1], C.$ = p[p.length - k], C._$ = {
|
| 243 |
+
first_line: t[t.length - (k || 1)].first_line,
|
| 244 |
+
last_line: t[t.length - 1].last_line,
|
| 245 |
+
first_column: t[t.length - (k || 1)].first_column,
|
| 246 |
+
last_column: t[t.length - 1].last_column
|
| 247 |
+
}, vt && (C._$.range = [
|
| 248 |
+
t[t.length - (k || 1)].range[0],
|
| 249 |
+
t[t.length - 1].range[1]
|
| 250 |
+
]), ht = this.performAction.apply(C, [
|
| 251 |
+
e,
|
| 252 |
+
St,
|
| 253 |
+
H,
|
| 254 |
+
x.yy,
|
| 255 |
+
m[1],
|
| 256 |
+
p,
|
| 257 |
+
t
|
| 258 |
+
].concat(It)), typeof ht < "u")
|
| 259 |
+
return ht;
|
| 260 |
+
k && (c = c.slice(0, -1 * k * 2), p = p.slice(0, -1 * k), t = t.slice(0, -1 * k)), c.push(this.productions_[m[1]][0]), p.push(C.$), t.push(C._$), At = K[c[c.length - 2]][c[c.length - 1]], c.push(At);
|
| 261 |
+
break;
|
| 262 |
+
case 3:
|
| 263 |
+
return !0;
|
| 264 |
+
}
|
| 265 |
+
}
|
| 266 |
+
return !0;
|
| 267 |
+
}, "parse")
|
| 268 |
+
}, Rt = /* @__PURE__ */ function() {
|
| 269 |
+
var R = {
|
| 270 |
+
EOF: 1,
|
| 271 |
+
parseError: /* @__PURE__ */ u(function(a, c) {
|
| 272 |
+
if (this.yy.parser)
|
| 273 |
+
this.yy.parser.parseError(a, c);
|
| 274 |
+
else
|
| 275 |
+
throw new Error(a);
|
| 276 |
+
}, "parseError"),
|
| 277 |
+
// resets the lexer, sets new input
|
| 278 |
+
setInput: /* @__PURE__ */ u(function(n, a) {
|
| 279 |
+
return this.yy = a || this.yy || {}, this._input = n, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
| 280 |
+
first_line: 1,
|
| 281 |
+
first_column: 0,
|
| 282 |
+
last_line: 1,
|
| 283 |
+
last_column: 0
|
| 284 |
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
| 285 |
+
}, "setInput"),
|
| 286 |
+
// consumes and returns one char from the input
|
| 287 |
+
input: /* @__PURE__ */ u(function() {
|
| 288 |
+
var n = this._input[0];
|
| 289 |
+
this.yytext += n, this.yyleng++, this.offset++, this.match += n, this.matched += n;
|
| 290 |
+
var a = n.match(/(?:\r\n?|\n).*/g);
|
| 291 |
+
return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), n;
|
| 292 |
+
}, "input"),
|
| 293 |
+
// unshifts one char (or a string) into the input
|
| 294 |
+
unput: /* @__PURE__ */ u(function(n) {
|
| 295 |
+
var a = n.length, c = n.split(/(?:\r\n?|\n)/g);
|
| 296 |
+
this._input = n + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
|
| 297 |
+
var r = this.match.split(/(?:\r\n?|\n)/g);
|
| 298 |
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), c.length - 1 && (this.yylineno -= c.length - 1);
|
| 299 |
+
var p = this.yylloc.range;
|
| 300 |
+
return this.yylloc = {
|
| 301 |
+
first_line: this.yylloc.first_line,
|
| 302 |
+
last_line: this.yylineno + 1,
|
| 303 |
+
first_column: this.yylloc.first_column,
|
| 304 |
+
last_column: c ? (c.length === r.length ? this.yylloc.first_column : 0) + r[r.length - c.length].length - c[0].length : this.yylloc.first_column - a
|
| 305 |
+
}, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
|
| 306 |
+
}, "unput"),
|
| 307 |
+
// When called from action, caches matched text and appends it on next action
|
| 308 |
+
more: /* @__PURE__ */ u(function() {
|
| 309 |
+
return this._more = !0, this;
|
| 310 |
+
}, "more"),
|
| 311 |
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
| 312 |
+
reject: /* @__PURE__ */ u(function() {
|
| 313 |
+
if (this.options.backtrack_lexer)
|
| 314 |
+
this._backtrack = !0;
|
| 315 |
+
else
|
| 316 |
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
| 317 |
+
` + this.showPosition(), {
|
| 318 |
+
text: "",
|
| 319 |
+
token: null,
|
| 320 |
+
line: this.yylineno
|
| 321 |
+
});
|
| 322 |
+
return this;
|
| 323 |
+
}, "reject"),
|
| 324 |
+
// retain first n characters of the match
|
| 325 |
+
less: /* @__PURE__ */ u(function(n) {
|
| 326 |
+
this.unput(this.match.slice(n));
|
| 327 |
+
}, "less"),
|
| 328 |
+
// displays already matched input, i.e. for error messages
|
| 329 |
+
pastInput: /* @__PURE__ */ u(function() {
|
| 330 |
+
var n = this.matched.substr(0, this.matched.length - this.match.length);
|
| 331 |
+
return (n.length > 20 ? "..." : "") + n.substr(-20).replace(/\n/g, "");
|
| 332 |
+
}, "pastInput"),
|
| 333 |
+
// displays upcoming input, i.e. for error messages
|
| 334 |
+
upcomingInput: /* @__PURE__ */ u(function() {
|
| 335 |
+
var n = this.match;
|
| 336 |
+
return n.length < 20 && (n += this._input.substr(0, 20 - n.length)), (n.substr(0, 20) + (n.length > 20 ? "..." : "")).replace(/\n/g, "");
|
| 337 |
+
}, "upcomingInput"),
|
| 338 |
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
| 339 |
+
showPosition: /* @__PURE__ */ u(function() {
|
| 340 |
+
var n = this.pastInput(), a = new Array(n.length + 1).join("-");
|
| 341 |
+
return n + this.upcomingInput() + `
|
| 342 |
+
` + a + "^";
|
| 343 |
+
}, "showPosition"),
|
| 344 |
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
| 345 |
+
test_match: /* @__PURE__ */ u(function(n, a) {
|
| 346 |
+
var c, r, p;
|
| 347 |
+
if (this.options.backtrack_lexer && (p = {
|
| 348 |
+
yylineno: this.yylineno,
|
| 349 |
+
yylloc: {
|
| 350 |
+
first_line: this.yylloc.first_line,
|
| 351 |
+
last_line: this.last_line,
|
| 352 |
+
first_column: this.yylloc.first_column,
|
| 353 |
+
last_column: this.yylloc.last_column
|
| 354 |
+
},
|
| 355 |
+
yytext: this.yytext,
|
| 356 |
+
match: this.match,
|
| 357 |
+
matches: this.matches,
|
| 358 |
+
matched: this.matched,
|
| 359 |
+
yyleng: this.yyleng,
|
| 360 |
+
offset: this.offset,
|
| 361 |
+
_more: this._more,
|
| 362 |
+
_input: this._input,
|
| 363 |
+
yy: this.yy,
|
| 364 |
+
conditionStack: this.conditionStack.slice(0),
|
| 365 |
+
done: this.done
|
| 366 |
+
}, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), r = n[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
|
| 367 |
+
first_line: this.yylloc.last_line,
|
| 368 |
+
last_line: this.yylineno + 1,
|
| 369 |
+
first_column: this.yylloc.last_column,
|
| 370 |
+
last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + n[0].length
|
| 371 |
+
}, this.yytext += n[0], this.match += n[0], this.matches = n, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(n[0].length), this.matched += n[0], c = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), c)
|
| 372 |
+
return c;
|
| 373 |
+
if (this._backtrack) {
|
| 374 |
+
for (var t in p)
|
| 375 |
+
this[t] = p[t];
|
| 376 |
+
return !1;
|
| 377 |
+
}
|
| 378 |
+
return !1;
|
| 379 |
+
}, "test_match"),
|
| 380 |
+
// return next match in input
|
| 381 |
+
next: /* @__PURE__ */ u(function() {
|
| 382 |
+
if (this.done)
|
| 383 |
+
return this.EOF;
|
| 384 |
+
this._input || (this.done = !0);
|
| 385 |
+
var n, a, c, r;
|
| 386 |
+
this._more || (this.yytext = "", this.match = "");
|
| 387 |
+
for (var p = this._currentRules(), t = 0; t < p.length; t++)
|
| 388 |
+
if (c = this._input.match(this.rules[p[t]]), c && (!a || c[0].length > a[0].length)) {
|
| 389 |
+
if (a = c, r = t, this.options.backtrack_lexer) {
|
| 390 |
+
if (n = this.test_match(c, p[t]), n !== !1)
|
| 391 |
+
return n;
|
| 392 |
+
if (this._backtrack) {
|
| 393 |
+
a = !1;
|
| 394 |
+
continue;
|
| 395 |
+
} else
|
| 396 |
+
return !1;
|
| 397 |
+
} else if (!this.options.flex)
|
| 398 |
+
break;
|
| 399 |
+
}
|
| 400 |
+
return a ? (n = this.test_match(a, p[r]), n !== !1 ? n : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
| 401 |
+
` + this.showPosition(), {
|
| 402 |
+
text: "",
|
| 403 |
+
token: null,
|
| 404 |
+
line: this.yylineno
|
| 405 |
+
});
|
| 406 |
+
}, "next"),
|
| 407 |
+
// return next match that has a token
|
| 408 |
+
lex: /* @__PURE__ */ u(function() {
|
| 409 |
+
var a = this.next();
|
| 410 |
+
return a || this.lex();
|
| 411 |
+
}, "lex"),
|
| 412 |
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
| 413 |
+
begin: /* @__PURE__ */ u(function(a) {
|
| 414 |
+
this.conditionStack.push(a);
|
| 415 |
+
}, "begin"),
|
| 416 |
+
// pop the previously active lexer condition state off the condition stack
|
| 417 |
+
popState: /* @__PURE__ */ u(function() {
|
| 418 |
+
var a = this.conditionStack.length - 1;
|
| 419 |
+
return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
| 420 |
+
}, "popState"),
|
| 421 |
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
| 422 |
+
_currentRules: /* @__PURE__ */ u(function() {
|
| 423 |
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
| 424 |
+
}, "_currentRules"),
|
| 425 |
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
| 426 |
+
topState: /* @__PURE__ */ u(function(a) {
|
| 427 |
+
return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
|
| 428 |
+
}, "topState"),
|
| 429 |
+
// alias for begin(condition)
|
| 430 |
+
pushState: /* @__PURE__ */ u(function(a) {
|
| 431 |
+
this.begin(a);
|
| 432 |
+
}, "pushState"),
|
| 433 |
+
// return the number of states currently on the stack
|
| 434 |
+
stateStackSize: /* @__PURE__ */ u(function() {
|
| 435 |
+
return this.conditionStack.length;
|
| 436 |
+
}, "stateStackSize"),
|
| 437 |
+
options: { "case-insensitive": !0 },
|
| 438 |
+
performAction: /* @__PURE__ */ u(function(a, c, r, p) {
|
| 439 |
+
switch (r) {
|
| 440 |
+
case 0:
|
| 441 |
+
return this.begin("acc_title"), 24;
|
| 442 |
+
case 1:
|
| 443 |
+
return this.popState(), "acc_title_value";
|
| 444 |
+
case 2:
|
| 445 |
+
return this.begin("acc_descr"), 26;
|
| 446 |
+
case 3:
|
| 447 |
+
return this.popState(), "acc_descr_value";
|
| 448 |
+
case 4:
|
| 449 |
+
this.begin("acc_descr_multiline");
|
| 450 |
+
break;
|
| 451 |
+
case 5:
|
| 452 |
+
this.popState();
|
| 453 |
+
break;
|
| 454 |
+
case 6:
|
| 455 |
+
return "acc_descr_multiline_value";
|
| 456 |
+
case 7:
|
| 457 |
+
return 33;
|
| 458 |
+
case 8:
|
| 459 |
+
return 34;
|
| 460 |
+
case 9:
|
| 461 |
+
return 35;
|
| 462 |
+
case 10:
|
| 463 |
+
return 36;
|
| 464 |
+
case 11:
|
| 465 |
+
return 10;
|
| 466 |
+
case 12:
|
| 467 |
+
break;
|
| 468 |
+
case 13:
|
| 469 |
+
return 8;
|
| 470 |
+
case 14:
|
| 471 |
+
return 50;
|
| 472 |
+
case 15:
|
| 473 |
+
return 70;
|
| 474 |
+
case 16:
|
| 475 |
+
return 4;
|
| 476 |
+
case 17:
|
| 477 |
+
return this.begin("block"), 17;
|
| 478 |
+
case 18:
|
| 479 |
+
return 49;
|
| 480 |
+
case 19:
|
| 481 |
+
return 49;
|
| 482 |
+
case 20:
|
| 483 |
+
return 42;
|
| 484 |
+
case 21:
|
| 485 |
+
return 15;
|
| 486 |
+
case 22:
|
| 487 |
+
return 13;
|
| 488 |
+
case 23:
|
| 489 |
+
break;
|
| 490 |
+
case 24:
|
| 491 |
+
return 59;
|
| 492 |
+
case 25:
|
| 493 |
+
return 56;
|
| 494 |
+
case 26:
|
| 495 |
+
return 56;
|
| 496 |
+
case 27:
|
| 497 |
+
return 60;
|
| 498 |
+
case 28:
|
| 499 |
+
break;
|
| 500 |
+
case 29:
|
| 501 |
+
return this.popState(), 19;
|
| 502 |
+
case 30:
|
| 503 |
+
return c.yytext[0];
|
| 504 |
+
case 31:
|
| 505 |
+
return 20;
|
| 506 |
+
case 32:
|
| 507 |
+
return 21;
|
| 508 |
+
case 33:
|
| 509 |
+
return this.begin("style"), 44;
|
| 510 |
+
case 34:
|
| 511 |
+
return this.popState(), 10;
|
| 512 |
+
case 35:
|
| 513 |
+
break;
|
| 514 |
+
case 36:
|
| 515 |
+
return 13;
|
| 516 |
+
case 37:
|
| 517 |
+
return 42;
|
| 518 |
+
case 38:
|
| 519 |
+
return 49;
|
| 520 |
+
case 39:
|
| 521 |
+
return this.begin("style"), 37;
|
| 522 |
+
case 40:
|
| 523 |
+
return 43;
|
| 524 |
+
case 41:
|
| 525 |
+
return 63;
|
| 526 |
+
case 42:
|
| 527 |
+
return 65;
|
| 528 |
+
case 43:
|
| 529 |
+
return 65;
|
| 530 |
+
case 44:
|
| 531 |
+
return 65;
|
| 532 |
+
case 45:
|
| 533 |
+
return 63;
|
| 534 |
+
case 46:
|
| 535 |
+
return 63;
|
| 536 |
+
case 47:
|
| 537 |
+
return 64;
|
| 538 |
+
case 48:
|
| 539 |
+
return 64;
|
| 540 |
+
case 49:
|
| 541 |
+
return 64;
|
| 542 |
+
case 50:
|
| 543 |
+
return 64;
|
| 544 |
+
case 51:
|
| 545 |
+
return 64;
|
| 546 |
+
case 52:
|
| 547 |
+
return 65;
|
| 548 |
+
case 53:
|
| 549 |
+
return 64;
|
| 550 |
+
case 54:
|
| 551 |
+
return 65;
|
| 552 |
+
case 55:
|
| 553 |
+
return 66;
|
| 554 |
+
case 56:
|
| 555 |
+
return 66;
|
| 556 |
+
case 57:
|
| 557 |
+
return 66;
|
| 558 |
+
case 58:
|
| 559 |
+
return 66;
|
| 560 |
+
case 59:
|
| 561 |
+
return 63;
|
| 562 |
+
case 60:
|
| 563 |
+
return 64;
|
| 564 |
+
case 61:
|
| 565 |
+
return 65;
|
| 566 |
+
case 62:
|
| 567 |
+
return 67;
|
| 568 |
+
case 63:
|
| 569 |
+
return 68;
|
| 570 |
+
case 64:
|
| 571 |
+
return 69;
|
| 572 |
+
case 65:
|
| 573 |
+
return 69;
|
| 574 |
+
case 66:
|
| 575 |
+
return 68;
|
| 576 |
+
case 67:
|
| 577 |
+
return 68;
|
| 578 |
+
case 68:
|
| 579 |
+
return 68;
|
| 580 |
+
case 69:
|
| 581 |
+
return 41;
|
| 582 |
+
case 70:
|
| 583 |
+
return 47;
|
| 584 |
+
case 71:
|
| 585 |
+
return 40;
|
| 586 |
+
case 72:
|
| 587 |
+
return 48;
|
| 588 |
+
case 73:
|
| 589 |
+
return c.yytext[0];
|
| 590 |
+
case 74:
|
| 591 |
+
return 6;
|
| 592 |
+
}
|
| 593 |
+
}, "anonymous"),
|
| 594 |
+
rules: [/^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:[\s]+)/i, /^(?:"[^"%\r\n\v\b\\]+")/i, /^(?:"[^"]*")/i, /^(?:erDiagram\b)/i, /^(?:\{)/i, /^(?:#)/i, /^(?:#)/i, /^(?:,)/i, /^(?::::)/i, /^(?::)/i, /^(?:\s+)/i, /^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i, /^(?:([^\s]*)[~].*[~]([^\s]*))/i, /^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\u00C0-\uFFFF\*]*))/i, /^(?:"[^"]*")/i, /^(?:[\n]+)/i, /^(?:\})/i, /^(?:.)/i, /^(?:\[)/i, /^(?:\])/i, /^(?:style\b)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?::)/i, /^(?:,)/i, /^(?:#)/i, /^(?:classDef\b)/i, /^(?:class\b)/i, /^(?:one or zero\b)/i, /^(?:one or more\b)/i, /^(?:one or many\b)/i, /^(?:1\+)/i, /^(?:\|o\b)/i, /^(?:zero or one\b)/i, /^(?:zero or more\b)/i, /^(?:zero or many\b)/i, /^(?:0\+)/i, /^(?:\}o\b)/i, /^(?:many\(0\))/i, /^(?:many\(1\))/i, /^(?:many\b)/i, /^(?:\}\|)/i, /^(?:one\b)/i, /^(?:only one\b)/i, /^(?:1\b)/i, /^(?:\|\|)/i, /^(?:o\|)/i, /^(?:o\{)/i, /^(?:\|\{)/i, /^(?:\s*u\b)/i, /^(?:\.\.)/i, /^(?:--)/i, /^(?:to\b)/i, /^(?:optionally to\b)/i, /^(?:\.-)/i, /^(?:-\.)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:;)/i, /^(?:([^\x00-\x7F]|\w|-|\*)+)/i, /^(?:[0-9])/i, /^(?:.)/i, /^(?:$)/i],
|
| 595 |
+
conditions: { style: { rules: [34, 35, 36, 37, 38, 69, 70], inclusive: !1 }, acc_descr_multiline: { rules: [5, 6], inclusive: !1 }, acc_descr: { rules: [3], inclusive: !1 }, acc_title: { rules: [1], inclusive: !1 }, block: { rules: [23, 24, 25, 26, 27, 28, 29, 30], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 31, 32, 33, 39, 40, 41, 42, 43, 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, 71, 72, 73, 74], inclusive: !0 } }
|
| 596 |
+
};
|
| 597 |
+
return R;
|
| 598 |
+
}();
|
| 599 |
+
ct.lexer = Rt;
|
| 600 |
+
function q() {
|
| 601 |
+
this.yy = {};
|
| 602 |
+
}
|
| 603 |
+
return u(q, "Parser"), q.prototype = ct, ct.Parser = q, new q();
|
| 604 |
+
}();
|
| 605 |
+
dt.parser = dt;
|
| 606 |
+
var Xt = dt, w, qt = (w = class {
|
| 607 |
+
constructor() {
|
| 608 |
+
this.entities = /* @__PURE__ */ new Map(), this.relationships = [], this.classes = /* @__PURE__ */ new Map(), this.direction = "TB", this.Cardinality = {
|
| 609 |
+
ZERO_OR_ONE: "ZERO_OR_ONE",
|
| 610 |
+
ZERO_OR_MORE: "ZERO_OR_MORE",
|
| 611 |
+
ONE_OR_MORE: "ONE_OR_MORE",
|
| 612 |
+
ONLY_ONE: "ONLY_ONE",
|
| 613 |
+
MD_PARENT: "MD_PARENT"
|
| 614 |
+
}, this.Identification = {
|
| 615 |
+
NON_IDENTIFYING: "NON_IDENTIFYING",
|
| 616 |
+
IDENTIFYING: "IDENTIFYING"
|
| 617 |
+
}, this.setAccTitle = Vt, this.getAccTitle = Lt, this.setAccDescription = Mt, this.getAccDescription = Bt, this.setDiagramTitle = Ft, this.getDiagramTitle = Yt, this.getConfig = /* @__PURE__ */ u(() => tt().er, "getConfig"), this.clear(), this.addEntity = this.addEntity.bind(this), this.addAttributes = this.addAttributes.bind(this), this.addRelationship = this.addRelationship.bind(this), this.setDirection = this.setDirection.bind(this), this.addCssStyles = this.addCssStyles.bind(this), this.addClass = this.addClass.bind(this), this.setClass = this.setClass.bind(this), this.setAccTitle = this.setAccTitle.bind(this), this.setAccDescription = this.setAccDescription.bind(this);
|
| 618 |
+
}
|
| 619 |
+
/**
|
| 620 |
+
* Add entity
|
| 621 |
+
* @param name - The name of the entity
|
| 622 |
+
* @param alias - The alias of the entity
|
| 623 |
+
*/
|
| 624 |
+
addEntity(i, h = "") {
|
| 625 |
+
var d;
|
| 626 |
+
return this.entities.has(i) ? !((d = this.entities.get(i)) != null && d.alias) && h && (this.entities.get(i).alias = h, D.info(`Add alias '${h}' to entity '${i}'`)) : (this.entities.set(i, {
|
| 627 |
+
id: `entity-${i}-${this.entities.size}`,
|
| 628 |
+
label: i,
|
| 629 |
+
attributes: [],
|
| 630 |
+
alias: h,
|
| 631 |
+
shape: "erBox",
|
| 632 |
+
look: tt().look ?? "default",
|
| 633 |
+
cssClasses: "default",
|
| 634 |
+
cssStyles: []
|
| 635 |
+
}), D.info("Added new entity :", i)), this.entities.get(i);
|
| 636 |
+
}
|
| 637 |
+
getEntity(i) {
|
| 638 |
+
return this.entities.get(i);
|
| 639 |
+
}
|
| 640 |
+
getEntities() {
|
| 641 |
+
return this.entities;
|
| 642 |
+
}
|
| 643 |
+
getClasses() {
|
| 644 |
+
return this.classes;
|
| 645 |
+
}
|
| 646 |
+
addAttributes(i, h) {
|
| 647 |
+
const d = this.addEntity(i);
|
| 648 |
+
let o;
|
| 649 |
+
for (o = h.length - 1; o >= 0; o--)
|
| 650 |
+
h[o].keys || (h[o].keys = []), h[o].comment || (h[o].comment = ""), d.attributes.push(h[o]), D.debug("Added attribute ", h[o].name);
|
| 651 |
+
}
|
| 652 |
+
/**
|
| 653 |
+
* Add a relationship
|
| 654 |
+
*
|
| 655 |
+
* @param entA - The first entity in the relationship
|
| 656 |
+
* @param rolA - The role played by the first entity in relation to the second
|
| 657 |
+
* @param entB - The second entity in the relationship
|
| 658 |
+
* @param rSpec - The details of the relationship between the two entities
|
| 659 |
+
*/
|
| 660 |
+
addRelationship(i, h, d, o) {
|
| 661 |
+
const l = this.entities.get(i), f = this.entities.get(d);
|
| 662 |
+
if (!l || !f)
|
| 663 |
+
return;
|
| 664 |
+
const _ = {
|
| 665 |
+
entityA: l.id,
|
| 666 |
+
roleA: h,
|
| 667 |
+
entityB: f.id,
|
| 668 |
+
relSpec: o
|
| 669 |
+
};
|
| 670 |
+
this.relationships.push(_), D.debug("Added new relationship :", _);
|
| 671 |
+
}
|
| 672 |
+
getRelationships() {
|
| 673 |
+
return this.relationships;
|
| 674 |
+
}
|
| 675 |
+
getDirection() {
|
| 676 |
+
return this.direction;
|
| 677 |
+
}
|
| 678 |
+
setDirection(i) {
|
| 679 |
+
this.direction = i;
|
| 680 |
+
}
|
| 681 |
+
getCompiledStyles(i) {
|
| 682 |
+
let h = [];
|
| 683 |
+
for (const d of i) {
|
| 684 |
+
const o = this.classes.get(d);
|
| 685 |
+
o != null && o.styles && (h = [...h, ...o.styles ?? []].map((l) => l.trim())), o != null && o.textStyles && (h = [...h, ...o.textStyles ?? []].map((l) => l.trim()));
|
| 686 |
+
}
|
| 687 |
+
return h;
|
| 688 |
+
}
|
| 689 |
+
addCssStyles(i, h) {
|
| 690 |
+
for (const d of i) {
|
| 691 |
+
const o = this.entities.get(d);
|
| 692 |
+
if (!h || !o)
|
| 693 |
+
return;
|
| 694 |
+
for (const l of h)
|
| 695 |
+
o.cssStyles.push(l);
|
| 696 |
+
}
|
| 697 |
+
}
|
| 698 |
+
addClass(i, h) {
|
| 699 |
+
i.forEach((d) => {
|
| 700 |
+
let o = this.classes.get(d);
|
| 701 |
+
o === void 0 && (o = { id: d, styles: [], textStyles: [] }, this.classes.set(d, o)), h && h.forEach(function(l) {
|
| 702 |
+
if (/color/.exec(l)) {
|
| 703 |
+
const f = l.replace("fill", "bgFill");
|
| 704 |
+
o.textStyles.push(f);
|
| 705 |
+
}
|
| 706 |
+
o.styles.push(l);
|
| 707 |
+
});
|
| 708 |
+
});
|
| 709 |
+
}
|
| 710 |
+
setClass(i, h) {
|
| 711 |
+
for (const d of i) {
|
| 712 |
+
const o = this.entities.get(d);
|
| 713 |
+
if (o)
|
| 714 |
+
for (const l of h)
|
| 715 |
+
o.cssClasses += " " + l;
|
| 716 |
+
}
|
| 717 |
+
}
|
| 718 |
+
clear() {
|
| 719 |
+
this.entities = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), this.relationships = [], Pt();
|
| 720 |
+
}
|
| 721 |
+
getData() {
|
| 722 |
+
const i = [], h = [], d = tt();
|
| 723 |
+
for (const l of this.entities.keys()) {
|
| 724 |
+
const f = this.entities.get(l);
|
| 725 |
+
f && (f.cssCompiledStyles = this.getCompiledStyles(f.cssClasses.split(" ")), i.push(f));
|
| 726 |
+
}
|
| 727 |
+
let o = 0;
|
| 728 |
+
for (const l of this.relationships) {
|
| 729 |
+
const f = {
|
| 730 |
+
id: zt(l.entityA, l.entityB, {
|
| 731 |
+
prefix: "id",
|
| 732 |
+
counter: o++
|
| 733 |
+
}),
|
| 734 |
+
type: "normal",
|
| 735 |
+
curve: "basis",
|
| 736 |
+
start: l.entityA,
|
| 737 |
+
end: l.entityB,
|
| 738 |
+
label: l.roleA,
|
| 739 |
+
labelpos: "c",
|
| 740 |
+
thickness: "normal",
|
| 741 |
+
classes: "relationshipLine",
|
| 742 |
+
arrowTypeStart: l.relSpec.cardB.toLowerCase(),
|
| 743 |
+
arrowTypeEnd: l.relSpec.cardA.toLowerCase(),
|
| 744 |
+
pattern: l.relSpec.relType == "IDENTIFYING" ? "solid" : "dashed",
|
| 745 |
+
look: d.look
|
| 746 |
+
};
|
| 747 |
+
h.push(f);
|
| 748 |
+
}
|
| 749 |
+
return { nodes: i, edges: h, other: {}, config: d, direction: "TB" };
|
| 750 |
+
}
|
| 751 |
+
}, u(w, "ErDB"), w), Nt = {};
|
| 752 |
+
Kt(Nt, {
|
| 753 |
+
draw: () => Ht
|
| 754 |
+
});
|
| 755 |
+
var Ht = /* @__PURE__ */ u(async function(s, i, h, d) {
|
| 756 |
+
D.info("REF0:"), D.info("Drawing er diagram (unified)", i);
|
| 757 |
+
const { securityLevel: o, er: l, layout: f } = tt(), _ = d.db.getData(), E = Dt(i, o);
|
| 758 |
+
_.type = d.type, _.layoutAlgorithm = Zt(f), _.config.flowchart.nodeSpacing = (l == null ? void 0 : l.nodeSpacing) || 140, _.config.flowchart.rankSpacing = (l == null ? void 0 : l.rankSpacing) || 80, _.direction = d.db.getDirection(), _.markers = ["only_one", "zero_or_one", "one_or_more", "zero_or_more"], _.diagramId = i, await Ut(_, E), _.layoutAlgorithm === "elk" && E.select(".edges").lower();
|
| 759 |
+
const V = E.selectAll('[id*="-background"]');
|
| 760 |
+
Array.from(V).length > 0 && V.each(function() {
|
| 761 |
+
const S = jt(this), U = S.attr("id").replace("-background", ""), T = E.select(`#${CSS.escape(U)}`);
|
| 762 |
+
if (!T.empty()) {
|
| 763 |
+
const L = T.attr("transform");
|
| 764 |
+
S.attr("transform", L);
|
| 765 |
+
}
|
| 766 |
+
});
|
| 767 |
+
const Z = 8;
|
| 768 |
+
Wt.insertTitle(
|
| 769 |
+
E,
|
| 770 |
+
"erDiagramTitleText",
|
| 771 |
+
(l == null ? void 0 : l.titleTopMargin) ?? 25,
|
| 772 |
+
d.db.getDiagramTitle()
|
| 773 |
+
), wt(E, Z, "erDiagram", (l == null ? void 0 : l.useMaxWidth) ?? !0);
|
| 774 |
+
}, "draw"), Jt = /* @__PURE__ */ u((s, i) => {
|
| 775 |
+
const h = Qt, d = h(s, "r"), o = h(s, "g"), l = h(s, "b");
|
| 776 |
+
return Gt(d, o, l, i);
|
| 777 |
+
}, "fade"), $t = /* @__PURE__ */ u((s) => `
|
| 778 |
+
.entityBox {
|
| 779 |
+
fill: ${s.mainBkg};
|
| 780 |
+
stroke: ${s.nodeBorder};
|
| 781 |
+
}
|
| 782 |
+
|
| 783 |
+
.relationshipLabelBox {
|
| 784 |
+
fill: ${s.tertiaryColor};
|
| 785 |
+
opacity: 0.7;
|
| 786 |
+
background-color: ${s.tertiaryColor};
|
| 787 |
+
rect {
|
| 788 |
+
opacity: 0.5;
|
| 789 |
+
}
|
| 790 |
+
}
|
| 791 |
+
|
| 792 |
+
.labelBkg {
|
| 793 |
+
background-color: ${Jt(s.tertiaryColor, 0.5)};
|
| 794 |
+
}
|
| 795 |
+
|
| 796 |
+
.edgeLabel .label {
|
| 797 |
+
fill: ${s.nodeBorder};
|
| 798 |
+
font-size: 14px;
|
| 799 |
+
}
|
| 800 |
+
|
| 801 |
+
.label {
|
| 802 |
+
font-family: ${s.fontFamily};
|
| 803 |
+
color: ${s.nodeTextColor || s.textColor};
|
| 804 |
+
}
|
| 805 |
+
|
| 806 |
+
.edge-pattern-dashed {
|
| 807 |
+
stroke-dasharray: 8,8;
|
| 808 |
+
}
|
| 809 |
+
|
| 810 |
+
.node rect,
|
| 811 |
+
.node circle,
|
| 812 |
+
.node ellipse,
|
| 813 |
+
.node polygon
|
| 814 |
+
{
|
| 815 |
+
fill: ${s.mainBkg};
|
| 816 |
+
stroke: ${s.nodeBorder};
|
| 817 |
+
stroke-width: 1px;
|
| 818 |
+
}
|
| 819 |
+
|
| 820 |
+
.relationshipLine {
|
| 821 |
+
stroke: ${s.lineColor};
|
| 822 |
+
stroke-width: 1;
|
| 823 |
+
fill: none;
|
| 824 |
+
}
|
| 825 |
+
|
| 826 |
+
.marker {
|
| 827 |
+
fill: none !important;
|
| 828 |
+
stroke: ${s.lineColor} !important;
|
| 829 |
+
stroke-width: 1;
|
| 830 |
+
}
|
| 831 |
+
`, "getStyles"), te = $t, re = {
|
| 832 |
+
parser: Xt,
|
| 833 |
+
get db() {
|
| 834 |
+
return new qt();
|
| 835 |
+
},
|
| 836 |
+
renderer: Nt,
|
| 837 |
+
styles: te
|
| 838 |
+
};
|
| 839 |
+
export {
|
| 840 |
+
re as diagram
|
| 841 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/flowDiagram-OUUYVNGO-y3hFWJ8o.js
ADDED
|
@@ -0,0 +1,1626 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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g as qt } from "./chunk-UIWBPB2F-DCnPuFaH.js";
|
| 2 |
+
import { _ as m, n as Ot, l as t1, c as b1, d as S1, o as Ht, r as Xt, u as it, b as Qt, s as Jt, p as Zt, a as $t, g as te, q as ee, k as se, t as ie, J as re, v as ae, x as st, y as ne, z as ue, A as oe } from "./mermaid.core-CfPtPiLZ.js";
|
| 3 |
+
import { g as le, s as ce } from "./chunk-HPOVUXKZ-Dn5Xnpaz.js";
|
| 4 |
+
import { c as he } from "./channel-DO4s0fWC.js";
|
| 5 |
+
var de = "flowchart-", P1, pe = (P1 = class {
|
| 6 |
+
// cspell:ignore funs
|
| 7 |
+
constructor() {
|
| 8 |
+
this.vertexCounter = 0, this.config = b1(), this.vertices = /* @__PURE__ */ new Map(), this.edges = [], this.classes = /* @__PURE__ */ new Map(), this.subGraphs = [], this.subGraphLookup = /* @__PURE__ */ new Map(), this.tooltips = /* @__PURE__ */ new Map(), this.subCount = 0, this.firstGraphFlag = !0, this.secCount = -1, this.posCrossRef = [], this.funs = [], this.setAccTitle = Qt, this.setAccDescription = Jt, this.setDiagramTitle = Zt, this.getAccTitle = $t, this.getAccDescription = te, this.getDiagramTitle = ee, this.funs.push(this.setupToolTips.bind(this)), this.addVertex = this.addVertex.bind(this), this.firstGraph = this.firstGraph.bind(this), this.setDirection = this.setDirection.bind(this), this.addSubGraph = this.addSubGraph.bind(this), this.addLink = this.addLink.bind(this), this.setLink = this.setLink.bind(this), this.updateLink = this.updateLink.bind(this), this.addClass = this.addClass.bind(this), this.setClass = this.setClass.bind(this), this.destructLink = this.destructLink.bind(this), this.setClickEvent = this.setClickEvent.bind(this), this.setTooltip = this.setTooltip.bind(this), this.updateLinkInterpolate = this.updateLinkInterpolate.bind(this), this.setClickFun = this.setClickFun.bind(this), this.bindFunctions = this.bindFunctions.bind(this), this.lex = {
|
| 9 |
+
firstGraph: this.firstGraph.bind(this)
|
| 10 |
+
}, this.clear(), this.setGen("gen-2");
|
| 11 |
+
}
|
| 12 |
+
sanitizeText(i) {
|
| 13 |
+
return se.sanitizeText(i, this.config);
|
| 14 |
+
}
|
| 15 |
+
/**
|
| 16 |
+
* Function to lookup domId from id in the graph definition.
|
| 17 |
+
*
|
| 18 |
+
* @param id - id of the node
|
| 19 |
+
*/
|
| 20 |
+
lookUpDomId(i) {
|
| 21 |
+
for (const a of this.vertices.values())
|
| 22 |
+
if (a.id === i)
|
| 23 |
+
return a.domId;
|
| 24 |
+
return i;
|
| 25 |
+
}
|
| 26 |
+
/**
|
| 27 |
+
* Function called by parser when a node definition has been found
|
| 28 |
+
*/
|
| 29 |
+
addVertex(i, a, n, u, o, f, c = {}, A) {
|
| 30 |
+
var L, C;
|
| 31 |
+
if (!i || i.trim().length === 0)
|
| 32 |
+
return;
|
| 33 |
+
let r;
|
| 34 |
+
if (A !== void 0) {
|
| 35 |
+
let p;
|
| 36 |
+
A.includes(`
|
| 37 |
+
`) ? p = A + `
|
| 38 |
+
` : p = `{
|
| 39 |
+
` + A + `
|
| 40 |
+
}`, r = ie(p, { schema: re });
|
| 41 |
+
}
|
| 42 |
+
const k = this.edges.find((p) => p.id === i);
|
| 43 |
+
if (k) {
|
| 44 |
+
const p = r;
|
| 45 |
+
(p == null ? void 0 : p.animate) !== void 0 && (k.animate = p.animate), (p == null ? void 0 : p.animation) !== void 0 && (k.animation = p.animation);
|
| 46 |
+
return;
|
| 47 |
+
}
|
| 48 |
+
let E, b = this.vertices.get(i);
|
| 49 |
+
if (b === void 0 && (b = {
|
| 50 |
+
id: i,
|
| 51 |
+
labelType: "text",
|
| 52 |
+
domId: de + i + "-" + this.vertexCounter,
|
| 53 |
+
styles: [],
|
| 54 |
+
classes: []
|
| 55 |
+
}, this.vertices.set(i, b)), this.vertexCounter++, a !== void 0 ? (this.config = b1(), E = this.sanitizeText(a.text.trim()), b.labelType = a.type, E.startsWith('"') && E.endsWith('"') && (E = E.substring(1, E.length - 1)), b.text = E) : b.text === void 0 && (b.text = i), n !== void 0 && (b.type = n), u != null && u.forEach((p) => {
|
| 56 |
+
b.styles.push(p);
|
| 57 |
+
}), o != null && o.forEach((p) => {
|
| 58 |
+
b.classes.push(p);
|
| 59 |
+
}), f !== void 0 && (b.dir = f), b.props === void 0 ? b.props = c : c !== void 0 && Object.assign(b.props, c), r !== void 0) {
|
| 60 |
+
if (r.shape) {
|
| 61 |
+
if (r.shape !== r.shape.toLowerCase() || r.shape.includes("_"))
|
| 62 |
+
throw new Error(`No such shape: ${r.shape}. Shape names should be lowercase.`);
|
| 63 |
+
if (!ae(r.shape))
|
| 64 |
+
throw new Error(`No such shape: ${r.shape}.`);
|
| 65 |
+
b.type = r == null ? void 0 : r.shape;
|
| 66 |
+
}
|
| 67 |
+
r != null && r.label && (b.text = r == null ? void 0 : r.label), r != null && r.icon && (b.icon = r == null ? void 0 : r.icon, !((L = r.label) != null && L.trim()) && b.text === i && (b.text = "")), r != null && r.form && (b.form = r == null ? void 0 : r.form), r != null && r.pos && (b.pos = r == null ? void 0 : r.pos), r != null && r.img && (b.img = r == null ? void 0 : r.img, !((C = r.label) != null && C.trim()) && b.text === i && (b.text = "")), r != null && r.constraint && (b.constraint = r.constraint), r.w && (b.assetWidth = Number(r.w)), r.h && (b.assetHeight = Number(r.h));
|
| 68 |
+
}
|
| 69 |
+
}
|
| 70 |
+
/**
|
| 71 |
+
* Function called by parser when a link/edge definition has been found
|
| 72 |
+
*
|
| 73 |
+
*/
|
| 74 |
+
addSingleLink(i, a, n, u) {
|
| 75 |
+
const c = {
|
| 76 |
+
start: i,
|
| 77 |
+
end: a,
|
| 78 |
+
type: void 0,
|
| 79 |
+
text: "",
|
| 80 |
+
labelType: "text",
|
| 81 |
+
classes: [],
|
| 82 |
+
isUserDefinedId: !1,
|
| 83 |
+
interpolate: this.edges.defaultInterpolate
|
| 84 |
+
};
|
| 85 |
+
t1.info("abc78 Got edge...", c);
|
| 86 |
+
const A = n.text;
|
| 87 |
+
if (A !== void 0 && (c.text = this.sanitizeText(A.text.trim()), c.text.startsWith('"') && c.text.endsWith('"') && (c.text = c.text.substring(1, c.text.length - 1)), c.labelType = A.type), n !== void 0 && (c.type = n.type, c.stroke = n.stroke, c.length = n.length > 10 ? 10 : n.length), u && !this.edges.some((r) => r.id === u))
|
| 88 |
+
c.id = u, c.isUserDefinedId = !0;
|
| 89 |
+
else {
|
| 90 |
+
const r = this.edges.filter((k) => k.start === c.start && k.end === c.end);
|
| 91 |
+
r.length === 0 ? c.id = st(c.start, c.end, { counter: 0, prefix: "L" }) : c.id = st(c.start, c.end, {
|
| 92 |
+
counter: r.length + 1,
|
| 93 |
+
prefix: "L"
|
| 94 |
+
});
|
| 95 |
+
}
|
| 96 |
+
if (this.edges.length < (this.config.maxEdges ?? 500))
|
| 97 |
+
t1.info("Pushing edge..."), this.edges.push(c);
|
| 98 |
+
else
|
| 99 |
+
throw new Error(
|
| 100 |
+
`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
| 101 |
+
|
| 102 |
+
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
| 103 |
+
You cannot set this config via configuration inside the diagram as it is a secure config.
|
| 104 |
+
You have to call mermaid.initialize.`
|
| 105 |
+
);
|
| 106 |
+
}
|
| 107 |
+
isLinkData(i) {
|
| 108 |
+
return i !== null && typeof i == "object" && "id" in i && typeof i.id == "string";
|
| 109 |
+
}
|
| 110 |
+
addLink(i, a, n) {
|
| 111 |
+
const u = this.isLinkData(n) ? n.id.replace("@", "") : void 0;
|
| 112 |
+
t1.info("addLink", i, a, u);
|
| 113 |
+
for (const o of i)
|
| 114 |
+
for (const f of a) {
|
| 115 |
+
const c = o === i[i.length - 1], A = f === a[0];
|
| 116 |
+
c && A ? this.addSingleLink(o, f, n, u) : this.addSingleLink(o, f, n, void 0);
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
/**
|
| 120 |
+
* Updates a link's line interpolation algorithm
|
| 121 |
+
*/
|
| 122 |
+
updateLinkInterpolate(i, a) {
|
| 123 |
+
i.forEach((n) => {
|
| 124 |
+
n === "default" ? this.edges.defaultInterpolate = a : this.edges[n].interpolate = a;
|
| 125 |
+
});
|
| 126 |
+
}
|
| 127 |
+
/**
|
| 128 |
+
* Updates a link with a style
|
| 129 |
+
*
|
| 130 |
+
*/
|
| 131 |
+
updateLink(i, a) {
|
| 132 |
+
i.forEach((n) => {
|
| 133 |
+
var u, o, f, c, A, r;
|
| 134 |
+
if (typeof n == "number" && n >= this.edges.length)
|
| 135 |
+
throw new Error(
|
| 136 |
+
`The index ${n} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length - 1}. (Help: Ensure that the index is within the range of existing edges.)`
|
| 137 |
+
);
|
| 138 |
+
n === "default" ? this.edges.defaultStyle = a : (this.edges[n].style = a, (((o = (u = this.edges[n]) == null ? void 0 : u.style) == null ? void 0 : o.length) ?? 0) > 0 && !((c = (f = this.edges[n]) == null ? void 0 : f.style) != null && c.some((k) => k == null ? void 0 : k.startsWith("fill"))) && ((r = (A = this.edges[n]) == null ? void 0 : A.style) == null || r.push("fill:none")));
|
| 139 |
+
});
|
| 140 |
+
}
|
| 141 |
+
addClass(i, a) {
|
| 142 |
+
const n = a.join().replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
|
| 143 |
+
i.split(",").forEach((u) => {
|
| 144 |
+
let o = this.classes.get(u);
|
| 145 |
+
o === void 0 && (o = { id: u, styles: [], textStyles: [] }, this.classes.set(u, o)), n != null && n.forEach((f) => {
|
| 146 |
+
if (/color/.exec(f)) {
|
| 147 |
+
const c = f.replace("fill", "bgFill");
|
| 148 |
+
o.textStyles.push(c);
|
| 149 |
+
}
|
| 150 |
+
o.styles.push(f);
|
| 151 |
+
});
|
| 152 |
+
});
|
| 153 |
+
}
|
| 154 |
+
/**
|
| 155 |
+
* Called by parser when a graph definition is found, stores the direction of the chart.
|
| 156 |
+
*
|
| 157 |
+
*/
|
| 158 |
+
setDirection(i) {
|
| 159 |
+
this.direction = i, /.*</.exec(this.direction) && (this.direction = "RL"), /.*\^/.exec(this.direction) && (this.direction = "BT"), /.*>/.exec(this.direction) && (this.direction = "LR"), /.*v/.exec(this.direction) && (this.direction = "TB"), this.direction === "TD" && (this.direction = "TB");
|
| 160 |
+
}
|
| 161 |
+
/**
|
| 162 |
+
* Called by parser when a special node is found, e.g. a clickable element.
|
| 163 |
+
*
|
| 164 |
+
* @param ids - Comma separated list of ids
|
| 165 |
+
* @param className - Class to add
|
| 166 |
+
*/
|
| 167 |
+
setClass(i, a) {
|
| 168 |
+
for (const n of i.split(",")) {
|
| 169 |
+
const u = this.vertices.get(n);
|
| 170 |
+
u && u.classes.push(a);
|
| 171 |
+
const o = this.edges.find((c) => c.id === n);
|
| 172 |
+
o && o.classes.push(a);
|
| 173 |
+
const f = this.subGraphLookup.get(n);
|
| 174 |
+
f && f.classes.push(a);
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
setTooltip(i, a) {
|
| 178 |
+
if (a !== void 0) {
|
| 179 |
+
a = this.sanitizeText(a);
|
| 180 |
+
for (const n of i.split(","))
|
| 181 |
+
this.tooltips.set(this.version === "gen-1" ? this.lookUpDomId(n) : n, a);
|
| 182 |
+
}
|
| 183 |
+
}
|
| 184 |
+
setClickFun(i, a, n) {
|
| 185 |
+
const u = this.lookUpDomId(i);
|
| 186 |
+
if (b1().securityLevel !== "loose" || a === void 0)
|
| 187 |
+
return;
|
| 188 |
+
let o = [];
|
| 189 |
+
if (typeof n == "string") {
|
| 190 |
+
o = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
|
| 191 |
+
for (let c = 0; c < o.length; c++) {
|
| 192 |
+
let A = o[c].trim();
|
| 193 |
+
A.startsWith('"') && A.endsWith('"') && (A = A.substr(1, A.length - 2)), o[c] = A;
|
| 194 |
+
}
|
| 195 |
+
}
|
| 196 |
+
o.length === 0 && o.push(i);
|
| 197 |
+
const f = this.vertices.get(i);
|
| 198 |
+
f && (f.haveCallback = !0, this.funs.push(() => {
|
| 199 |
+
const c = document.querySelector(`[id="${u}"]`);
|
| 200 |
+
c !== null && c.addEventListener(
|
| 201 |
+
"click",
|
| 202 |
+
() => {
|
| 203 |
+
it.runFunc(a, ...o);
|
| 204 |
+
},
|
| 205 |
+
!1
|
| 206 |
+
);
|
| 207 |
+
}));
|
| 208 |
+
}
|
| 209 |
+
/**
|
| 210 |
+
* Called by parser when a link is found. Adds the URL to the vertex data.
|
| 211 |
+
*
|
| 212 |
+
* @param ids - Comma separated list of ids
|
| 213 |
+
* @param linkStr - URL to create a link for
|
| 214 |
+
* @param target - Target attribute for the link
|
| 215 |
+
*/
|
| 216 |
+
setLink(i, a, n) {
|
| 217 |
+
i.split(",").forEach((u) => {
|
| 218 |
+
const o = this.vertices.get(u);
|
| 219 |
+
o !== void 0 && (o.link = it.formatUrl(a, this.config), o.linkTarget = n);
|
| 220 |
+
}), this.setClass(i, "clickable");
|
| 221 |
+
}
|
| 222 |
+
getTooltip(i) {
|
| 223 |
+
return this.tooltips.get(i);
|
| 224 |
+
}
|
| 225 |
+
/**
|
| 226 |
+
* Called by parser when a click definition is found. Registers an event handler.
|
| 227 |
+
*
|
| 228 |
+
* @param ids - Comma separated list of ids
|
| 229 |
+
* @param functionName - Function to be called on click
|
| 230 |
+
* @param functionArgs - Arguments to be passed to the function
|
| 231 |
+
*/
|
| 232 |
+
setClickEvent(i, a, n) {
|
| 233 |
+
i.split(",").forEach((u) => {
|
| 234 |
+
this.setClickFun(u, a, n);
|
| 235 |
+
}), this.setClass(i, "clickable");
|
| 236 |
+
}
|
| 237 |
+
bindFunctions(i) {
|
| 238 |
+
this.funs.forEach((a) => {
|
| 239 |
+
a(i);
|
| 240 |
+
});
|
| 241 |
+
}
|
| 242 |
+
getDirection() {
|
| 243 |
+
var i;
|
| 244 |
+
return (i = this.direction) == null ? void 0 : i.trim();
|
| 245 |
+
}
|
| 246 |
+
/**
|
| 247 |
+
* Retrieval function for fetching the found nodes after parsing has completed.
|
| 248 |
+
*
|
| 249 |
+
*/
|
| 250 |
+
getVertices() {
|
| 251 |
+
return this.vertices;
|
| 252 |
+
}
|
| 253 |
+
/**
|
| 254 |
+
* Retrieval function for fetching the found links after parsing has completed.
|
| 255 |
+
*
|
| 256 |
+
*/
|
| 257 |
+
getEdges() {
|
| 258 |
+
return this.edges;
|
| 259 |
+
}
|
| 260 |
+
/**
|
| 261 |
+
* Retrieval function for fetching the found class definitions after parsing has completed.
|
| 262 |
+
*
|
| 263 |
+
*/
|
| 264 |
+
getClasses() {
|
| 265 |
+
return this.classes;
|
| 266 |
+
}
|
| 267 |
+
setupToolTips(i) {
|
| 268 |
+
let a = S1(".mermaidTooltip");
|
| 269 |
+
(a._groups || a)[0][0] === null && (a = S1("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0)), S1(i).select("svg").selectAll("g.node").on("mouseover", (o) => {
|
| 270 |
+
var r;
|
| 271 |
+
const f = S1(o.currentTarget);
|
| 272 |
+
if (f.attr("title") === null)
|
| 273 |
+
return;
|
| 274 |
+
const A = (r = o.currentTarget) == null ? void 0 : r.getBoundingClientRect();
|
| 275 |
+
a.transition().duration(200).style("opacity", ".9"), a.text(f.attr("title")).style("left", window.scrollX + A.left + (A.right - A.left) / 2 + "px").style("top", window.scrollY + A.bottom + "px"), a.html(a.html().replace(/<br\/>/g, "<br/>")), f.classed("hover", !0);
|
| 276 |
+
}).on("mouseout", (o) => {
|
| 277 |
+
a.transition().duration(500).style("opacity", 0), S1(o.currentTarget).classed("hover", !1);
|
| 278 |
+
});
|
| 279 |
+
}
|
| 280 |
+
/**
|
| 281 |
+
* Clears the internal graph db so that a new graph can be parsed.
|
| 282 |
+
*
|
| 283 |
+
*/
|
| 284 |
+
clear(i = "gen-2") {
|
| 285 |
+
this.vertices = /* @__PURE__ */ new Map(), this.classes = /* @__PURE__ */ new Map(), this.edges = [], this.funs = [this.setupToolTips.bind(this)], this.subGraphs = [], this.subGraphLookup = /* @__PURE__ */ new Map(), this.subCount = 0, this.tooltips = /* @__PURE__ */ new Map(), this.firstGraphFlag = !0, this.version = i, this.config = b1(), ne();
|
| 286 |
+
}
|
| 287 |
+
setGen(i) {
|
| 288 |
+
this.version = i || "gen-2";
|
| 289 |
+
}
|
| 290 |
+
defaultStyle() {
|
| 291 |
+
return "fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;";
|
| 292 |
+
}
|
| 293 |
+
addSubGraph(i, a, n) {
|
| 294 |
+
let u = i.text.trim(), o = n.text;
|
| 295 |
+
i === n && /\s/.exec(n.text) && (u = void 0);
|
| 296 |
+
const c = (/* @__PURE__ */ m((b) => {
|
| 297 |
+
const L = { boolean: {}, number: {}, string: {} }, C = [];
|
| 298 |
+
let p;
|
| 299 |
+
return { nodeList: b.filter(function(W) {
|
| 300 |
+
const Z = typeof W;
|
| 301 |
+
return W.stmt && W.stmt === "dir" ? (p = W.value, !1) : W.trim() === "" ? !1 : Z in L ? L[Z].hasOwnProperty(W) ? !1 : L[Z][W] = !0 : C.includes(W) ? !1 : C.push(W);
|
| 302 |
+
}), dir: p };
|
| 303 |
+
}, "uniq"))(a.flat()), A = c.nodeList;
|
| 304 |
+
let r = c.dir;
|
| 305 |
+
const k = b1().flowchart ?? {};
|
| 306 |
+
if (r = r ?? (k.inheritDir ? this.getDirection() ?? b1().direction ?? void 0 : void 0), this.version === "gen-1")
|
| 307 |
+
for (let b = 0; b < A.length; b++)
|
| 308 |
+
A[b] = this.lookUpDomId(A[b]);
|
| 309 |
+
u = u ?? "subGraph" + this.subCount, o = o || "", o = this.sanitizeText(o), this.subCount = this.subCount + 1;
|
| 310 |
+
const E = {
|
| 311 |
+
id: u,
|
| 312 |
+
nodes: A,
|
| 313 |
+
title: o.trim(),
|
| 314 |
+
classes: [],
|
| 315 |
+
dir: r,
|
| 316 |
+
labelType: n.type
|
| 317 |
+
};
|
| 318 |
+
return t1.info("Adding", E.id, E.nodes, E.dir), E.nodes = this.makeUniq(E, this.subGraphs).nodes, this.subGraphs.push(E), this.subGraphLookup.set(u, E), u;
|
| 319 |
+
}
|
| 320 |
+
getPosForId(i) {
|
| 321 |
+
for (const [a, n] of this.subGraphs.entries())
|
| 322 |
+
if (n.id === i)
|
| 323 |
+
return a;
|
| 324 |
+
return -1;
|
| 325 |
+
}
|
| 326 |
+
indexNodes2(i, a) {
|
| 327 |
+
const n = this.subGraphs[a].nodes;
|
| 328 |
+
if (this.secCount = this.secCount + 1, this.secCount > 2e3)
|
| 329 |
+
return {
|
| 330 |
+
result: !1,
|
| 331 |
+
count: 0
|
| 332 |
+
};
|
| 333 |
+
if (this.posCrossRef[this.secCount] = a, this.subGraphs[a].id === i)
|
| 334 |
+
return {
|
| 335 |
+
result: !0,
|
| 336 |
+
count: 0
|
| 337 |
+
};
|
| 338 |
+
let u = 0, o = 1;
|
| 339 |
+
for (; u < n.length; ) {
|
| 340 |
+
const f = this.getPosForId(n[u]);
|
| 341 |
+
if (f >= 0) {
|
| 342 |
+
const c = this.indexNodes2(i, f);
|
| 343 |
+
if (c.result)
|
| 344 |
+
return {
|
| 345 |
+
result: !0,
|
| 346 |
+
count: o + c.count
|
| 347 |
+
};
|
| 348 |
+
o = o + c.count;
|
| 349 |
+
}
|
| 350 |
+
u = u + 1;
|
| 351 |
+
}
|
| 352 |
+
return {
|
| 353 |
+
result: !1,
|
| 354 |
+
count: o
|
| 355 |
+
};
|
| 356 |
+
}
|
| 357 |
+
getDepthFirstPos(i) {
|
| 358 |
+
return this.posCrossRef[i];
|
| 359 |
+
}
|
| 360 |
+
indexNodes() {
|
| 361 |
+
this.secCount = -1, this.subGraphs.length > 0 && this.indexNodes2("none", this.subGraphs.length - 1);
|
| 362 |
+
}
|
| 363 |
+
getSubGraphs() {
|
| 364 |
+
return this.subGraphs;
|
| 365 |
+
}
|
| 366 |
+
firstGraph() {
|
| 367 |
+
return this.firstGraphFlag ? (this.firstGraphFlag = !1, !0) : !1;
|
| 368 |
+
}
|
| 369 |
+
destructStartLink(i) {
|
| 370 |
+
let a = i.trim(), n = "arrow_open";
|
| 371 |
+
switch (a[0]) {
|
| 372 |
+
case "<":
|
| 373 |
+
n = "arrow_point", a = a.slice(1);
|
| 374 |
+
break;
|
| 375 |
+
case "x":
|
| 376 |
+
n = "arrow_cross", a = a.slice(1);
|
| 377 |
+
break;
|
| 378 |
+
case "o":
|
| 379 |
+
n = "arrow_circle", a = a.slice(1);
|
| 380 |
+
break;
|
| 381 |
+
}
|
| 382 |
+
let u = "normal";
|
| 383 |
+
return a.includes("=") && (u = "thick"), a.includes(".") && (u = "dotted"), { type: n, stroke: u };
|
| 384 |
+
}
|
| 385 |
+
countChar(i, a) {
|
| 386 |
+
const n = a.length;
|
| 387 |
+
let u = 0;
|
| 388 |
+
for (let o = 0; o < n; ++o)
|
| 389 |
+
a[o] === i && ++u;
|
| 390 |
+
return u;
|
| 391 |
+
}
|
| 392 |
+
destructEndLink(i) {
|
| 393 |
+
const a = i.trim();
|
| 394 |
+
let n = a.slice(0, -1), u = "arrow_open";
|
| 395 |
+
switch (a.slice(-1)) {
|
| 396 |
+
case "x":
|
| 397 |
+
u = "arrow_cross", a.startsWith("x") && (u = "double_" + u, n = n.slice(1));
|
| 398 |
+
break;
|
| 399 |
+
case ">":
|
| 400 |
+
u = "arrow_point", a.startsWith("<") && (u = "double_" + u, n = n.slice(1));
|
| 401 |
+
break;
|
| 402 |
+
case "o":
|
| 403 |
+
u = "arrow_circle", a.startsWith("o") && (u = "double_" + u, n = n.slice(1));
|
| 404 |
+
break;
|
| 405 |
+
}
|
| 406 |
+
let o = "normal", f = n.length - 1;
|
| 407 |
+
n.startsWith("=") && (o = "thick"), n.startsWith("~") && (o = "invisible");
|
| 408 |
+
const c = this.countChar(".", n);
|
| 409 |
+
return c && (o = "dotted", f = c), { type: u, stroke: o, length: f };
|
| 410 |
+
}
|
| 411 |
+
destructLink(i, a) {
|
| 412 |
+
const n = this.destructEndLink(i);
|
| 413 |
+
let u;
|
| 414 |
+
if (a) {
|
| 415 |
+
if (u = this.destructStartLink(a), u.stroke !== n.stroke)
|
| 416 |
+
return { type: "INVALID", stroke: "INVALID" };
|
| 417 |
+
if (u.type === "arrow_open")
|
| 418 |
+
u.type = n.type;
|
| 419 |
+
else {
|
| 420 |
+
if (u.type !== n.type)
|
| 421 |
+
return { type: "INVALID", stroke: "INVALID" };
|
| 422 |
+
u.type = "double_" + u.type;
|
| 423 |
+
}
|
| 424 |
+
return u.type === "double_arrow" && (u.type = "double_arrow_point"), u.length = n.length, u;
|
| 425 |
+
}
|
| 426 |
+
return n;
|
| 427 |
+
}
|
| 428 |
+
// Todo optimizer this by caching existing nodes
|
| 429 |
+
exists(i, a) {
|
| 430 |
+
for (const n of i)
|
| 431 |
+
if (n.nodes.includes(a))
|
| 432 |
+
return !0;
|
| 433 |
+
return !1;
|
| 434 |
+
}
|
| 435 |
+
/**
|
| 436 |
+
* Deletes an id from all subgraphs
|
| 437 |
+
*
|
| 438 |
+
*/
|
| 439 |
+
makeUniq(i, a) {
|
| 440 |
+
const n = [];
|
| 441 |
+
return i.nodes.forEach((u, o) => {
|
| 442 |
+
this.exists(a, u) || n.push(i.nodes[o]);
|
| 443 |
+
}), { nodes: n };
|
| 444 |
+
}
|
| 445 |
+
getTypeFromVertex(i) {
|
| 446 |
+
if (i.img)
|
| 447 |
+
return "imageSquare";
|
| 448 |
+
if (i.icon)
|
| 449 |
+
return i.form === "circle" ? "iconCircle" : i.form === "square" ? "iconSquare" : i.form === "rounded" ? "iconRounded" : "icon";
|
| 450 |
+
switch (i.type) {
|
| 451 |
+
case "square":
|
| 452 |
+
case void 0:
|
| 453 |
+
return "squareRect";
|
| 454 |
+
case "round":
|
| 455 |
+
return "roundedRect";
|
| 456 |
+
case "ellipse":
|
| 457 |
+
return "ellipse";
|
| 458 |
+
default:
|
| 459 |
+
return i.type;
|
| 460 |
+
}
|
| 461 |
+
}
|
| 462 |
+
findNode(i, a) {
|
| 463 |
+
return i.find((n) => n.id === a);
|
| 464 |
+
}
|
| 465 |
+
destructEdgeType(i) {
|
| 466 |
+
let a = "none", n = "arrow_point";
|
| 467 |
+
switch (i) {
|
| 468 |
+
case "arrow_point":
|
| 469 |
+
case "arrow_circle":
|
| 470 |
+
case "arrow_cross":
|
| 471 |
+
n = i;
|
| 472 |
+
break;
|
| 473 |
+
case "double_arrow_point":
|
| 474 |
+
case "double_arrow_circle":
|
| 475 |
+
case "double_arrow_cross":
|
| 476 |
+
a = i.replace("double_", ""), n = a;
|
| 477 |
+
break;
|
| 478 |
+
}
|
| 479 |
+
return { arrowTypeStart: a, arrowTypeEnd: n };
|
| 480 |
+
}
|
| 481 |
+
addNodeFromVertex(i, a, n, u, o, f) {
|
| 482 |
+
var k;
|
| 483 |
+
const c = n.get(i.id), A = u.get(i.id) ?? !1, r = this.findNode(a, i.id);
|
| 484 |
+
if (r)
|
| 485 |
+
r.cssStyles = i.styles, r.cssCompiledStyles = this.getCompiledStyles(i.classes), r.cssClasses = i.classes.join(" ");
|
| 486 |
+
else {
|
| 487 |
+
const E = {
|
| 488 |
+
id: i.id,
|
| 489 |
+
label: i.text,
|
| 490 |
+
labelStyle: "",
|
| 491 |
+
parentId: c,
|
| 492 |
+
padding: ((k = o.flowchart) == null ? void 0 : k.padding) || 8,
|
| 493 |
+
cssStyles: i.styles,
|
| 494 |
+
cssCompiledStyles: this.getCompiledStyles(["default", "node", ...i.classes]),
|
| 495 |
+
cssClasses: "default " + i.classes.join(" "),
|
| 496 |
+
dir: i.dir,
|
| 497 |
+
domId: i.domId,
|
| 498 |
+
look: f,
|
| 499 |
+
link: i.link,
|
| 500 |
+
linkTarget: i.linkTarget,
|
| 501 |
+
tooltip: this.getTooltip(i.id),
|
| 502 |
+
icon: i.icon,
|
| 503 |
+
pos: i.pos,
|
| 504 |
+
img: i.img,
|
| 505 |
+
assetWidth: i.assetWidth,
|
| 506 |
+
assetHeight: i.assetHeight,
|
| 507 |
+
constraint: i.constraint
|
| 508 |
+
};
|
| 509 |
+
A ? a.push({
|
| 510 |
+
...E,
|
| 511 |
+
isGroup: !0,
|
| 512 |
+
shape: "rect"
|
| 513 |
+
}) : a.push({
|
| 514 |
+
...E,
|
| 515 |
+
isGroup: !1,
|
| 516 |
+
shape: this.getTypeFromVertex(i)
|
| 517 |
+
});
|
| 518 |
+
}
|
| 519 |
+
}
|
| 520 |
+
getCompiledStyles(i) {
|
| 521 |
+
let a = [];
|
| 522 |
+
for (const n of i) {
|
| 523 |
+
const u = this.classes.get(n);
|
| 524 |
+
u != null && u.styles && (a = [...a, ...u.styles ?? []].map((o) => o.trim())), u != null && u.textStyles && (a = [...a, ...u.textStyles ?? []].map((o) => o.trim()));
|
| 525 |
+
}
|
| 526 |
+
return a;
|
| 527 |
+
}
|
| 528 |
+
getData() {
|
| 529 |
+
const i = b1(), a = [], n = [], u = this.getSubGraphs(), o = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
|
| 530 |
+
for (let r = u.length - 1; r >= 0; r--) {
|
| 531 |
+
const k = u[r];
|
| 532 |
+
k.nodes.length > 0 && f.set(k.id, !0);
|
| 533 |
+
for (const E of k.nodes)
|
| 534 |
+
o.set(E, k.id);
|
| 535 |
+
}
|
| 536 |
+
for (let r = u.length - 1; r >= 0; r--) {
|
| 537 |
+
const k = u[r];
|
| 538 |
+
a.push({
|
| 539 |
+
id: k.id,
|
| 540 |
+
label: k.title,
|
| 541 |
+
labelStyle: "",
|
| 542 |
+
parentId: o.get(k.id),
|
| 543 |
+
padding: 8,
|
| 544 |
+
cssCompiledStyles: this.getCompiledStyles(k.classes),
|
| 545 |
+
cssClasses: k.classes.join(" "),
|
| 546 |
+
shape: "rect",
|
| 547 |
+
dir: k.dir,
|
| 548 |
+
isGroup: !0,
|
| 549 |
+
look: i.look
|
| 550 |
+
});
|
| 551 |
+
}
|
| 552 |
+
this.getVertices().forEach((r) => {
|
| 553 |
+
this.addNodeFromVertex(r, a, o, f, i, i.look || "classic");
|
| 554 |
+
});
|
| 555 |
+
const A = this.getEdges();
|
| 556 |
+
return A.forEach((r, k) => {
|
| 557 |
+
var p;
|
| 558 |
+
const { arrowTypeStart: E, arrowTypeEnd: b } = this.destructEdgeType(r.type), L = [...A.defaultStyle ?? []];
|
| 559 |
+
r.style && L.push(...r.style);
|
| 560 |
+
const C = {
|
| 561 |
+
id: st(r.start, r.end, { counter: k, prefix: "L" }, r.id),
|
| 562 |
+
isUserDefinedId: r.isUserDefinedId,
|
| 563 |
+
start: r.start,
|
| 564 |
+
end: r.end,
|
| 565 |
+
type: r.type ?? "normal",
|
| 566 |
+
label: r.text,
|
| 567 |
+
labelpos: "c",
|
| 568 |
+
thickness: r.stroke,
|
| 569 |
+
minlen: r.length,
|
| 570 |
+
classes: (r == null ? void 0 : r.stroke) === "invisible" ? "" : "edge-thickness-normal edge-pattern-solid flowchart-link",
|
| 571 |
+
arrowTypeStart: (r == null ? void 0 : r.stroke) === "invisible" || (r == null ? void 0 : r.type) === "arrow_open" ? "none" : E,
|
| 572 |
+
arrowTypeEnd: (r == null ? void 0 : r.stroke) === "invisible" || (r == null ? void 0 : r.type) === "arrow_open" ? "none" : b,
|
| 573 |
+
arrowheadStyle: "fill: #333",
|
| 574 |
+
cssCompiledStyles: this.getCompiledStyles(r.classes),
|
| 575 |
+
labelStyle: L,
|
| 576 |
+
style: L,
|
| 577 |
+
pattern: r.stroke,
|
| 578 |
+
look: i.look,
|
| 579 |
+
animate: r.animate,
|
| 580 |
+
animation: r.animation,
|
| 581 |
+
curve: r.interpolate || this.edges.defaultInterpolate || ((p = i.flowchart) == null ? void 0 : p.curve)
|
| 582 |
+
};
|
| 583 |
+
n.push(C);
|
| 584 |
+
}), { nodes: a, edges: n, other: {}, config: i };
|
| 585 |
+
}
|
| 586 |
+
defaultConfig() {
|
| 587 |
+
return ue.flowchart;
|
| 588 |
+
}
|
| 589 |
+
}, m(P1, "FlowDB"), P1), fe = /* @__PURE__ */ m(function(s, i) {
|
| 590 |
+
return i.db.getClasses();
|
| 591 |
+
}, "getClasses"), ge = /* @__PURE__ */ m(async function(s, i, a, n) {
|
| 592 |
+
var L;
|
| 593 |
+
t1.info("REF0:"), t1.info("Drawing state diagram (v2)", i);
|
| 594 |
+
const { securityLevel: u, flowchart: o, layout: f } = b1();
|
| 595 |
+
let c;
|
| 596 |
+
u === "sandbox" && (c = S1("#i" + i));
|
| 597 |
+
const A = u === "sandbox" ? c.nodes()[0].contentDocument : document;
|
| 598 |
+
t1.debug("Before getData: ");
|
| 599 |
+
const r = n.db.getData();
|
| 600 |
+
t1.debug("Data: ", r);
|
| 601 |
+
const k = le(i, u), E = n.db.getDirection();
|
| 602 |
+
r.type = n.type, r.layoutAlgorithm = Ht(f), r.layoutAlgorithm === "dagre" && f === "elk" && t1.warn(
|
| 603 |
+
"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."
|
| 604 |
+
), r.direction = E, r.nodeSpacing = (o == null ? void 0 : o.nodeSpacing) || 50, r.rankSpacing = (o == null ? void 0 : o.rankSpacing) || 50, r.markers = ["point", "circle", "cross"], r.diagramId = i, t1.debug("REF1:", r), await Xt(r, k);
|
| 605 |
+
const b = ((L = r.config.flowchart) == null ? void 0 : L.diagramPadding) ?? 8;
|
| 606 |
+
it.insertTitle(
|
| 607 |
+
k,
|
| 608 |
+
"flowchartTitleText",
|
| 609 |
+
(o == null ? void 0 : o.titleTopMargin) || 0,
|
| 610 |
+
n.db.getDiagramTitle()
|
| 611 |
+
), ce(k, b, "flowchart", (o == null ? void 0 : o.useMaxWidth) || !1);
|
| 612 |
+
for (const C of r.nodes) {
|
| 613 |
+
const p = S1(`#${i} [id="${C.id}"]`);
|
| 614 |
+
if (!p || !C.link)
|
| 615 |
+
continue;
|
| 616 |
+
const J = A.createElementNS("http://www.w3.org/2000/svg", "a");
|
| 617 |
+
J.setAttributeNS("http://www.w3.org/2000/svg", "class", C.cssClasses), J.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), u === "sandbox" ? J.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : C.linkTarget && J.setAttributeNS("http://www.w3.org/2000/svg", "target", C.linkTarget);
|
| 618 |
+
const W = p.insert(function() {
|
| 619 |
+
return J;
|
| 620 |
+
}, ":first-child"), Z = p.select(".label-container");
|
| 621 |
+
Z && W.append(function() {
|
| 622 |
+
return Z.node();
|
| 623 |
+
});
|
| 624 |
+
const A1 = p.select(".label");
|
| 625 |
+
A1 && W.append(function() {
|
| 626 |
+
return A1.node();
|
| 627 |
+
});
|
| 628 |
+
}
|
| 629 |
+
}, "draw"), be = {
|
| 630 |
+
getClasses: fe,
|
| 631 |
+
draw: ge
|
| 632 |
+
}, rt = function() {
|
| 633 |
+
var s = /* @__PURE__ */ m(function(g1, h, d, g) {
|
| 634 |
+
for (d = d || {}, g = g1.length; g--; d[g1[g]] = h) ;
|
| 635 |
+
return d;
|
| 636 |
+
}, "o"), i = [1, 4], a = [1, 3], n = [1, 5], u = [1, 8, 9, 10, 11, 27, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124], o = [2, 2], f = [1, 13], c = [1, 14], A = [1, 15], r = [1, 16], k = [1, 23], E = [1, 25], b = [1, 26], L = [1, 27], C = [1, 49], p = [1, 48], J = [1, 29], W = [1, 30], Z = [1, 31], A1 = [1, 32], M1 = [1, 33], V = [1, 44], I = [1, 46], w = [1, 42], R = [1, 47], N = [1, 43], G = [1, 50], P = [1, 45], O = [1, 51], M = [1, 52], U1 = [1, 34], W1 = [1, 35], z1 = [1, 36], j1 = [1, 37], p1 = [1, 57], y = [1, 8, 9, 10, 11, 27, 32, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124], e1 = [1, 61], s1 = [1, 60], i1 = [1, 62], D1 = [8, 9, 11, 75, 77, 78], at = [1, 78], x1 = [1, 91], T1 = [1, 96], E1 = [1, 95], y1 = [1, 92], F1 = [1, 88], _1 = [1, 94], B1 = [1, 90], v1 = [1, 97], L1 = [1, 93], V1 = [1, 98], I1 = [1, 89], k1 = [8, 9, 10, 11, 40, 75, 77, 78], z = [8, 9, 10, 11, 40, 46, 75, 77, 78], q = [8, 9, 10, 11, 29, 40, 44, 46, 48, 50, 52, 54, 56, 58, 60, 63, 65, 67, 68, 70, 75, 77, 78, 89, 102, 105, 106, 109, 111, 114, 115, 116], nt = [8, 9, 11, 44, 60, 75, 77, 78, 89, 102, 105, 106, 109, 111, 114, 115, 116], w1 = [44, 60, 89, 102, 105, 106, 109, 111, 114, 115, 116], ut = [1, 121], ot = [1, 122], K1 = [1, 124], Y1 = [1, 123], lt = [44, 60, 62, 74, 89, 102, 105, 106, 109, 111, 114, 115, 116], ct = [1, 133], ht = [1, 147], dt = [1, 148], pt = [1, 149], ft = [1, 150], gt = [1, 135], bt = [1, 137], At = [1, 141], kt = [1, 142], mt = [1, 143], Ct = [1, 144], St = [1, 145], Dt = [1, 146], xt = [1, 151], Tt = [1, 152], Et = [1, 131], yt = [1, 132], Ft = [1, 139], _t = [1, 134], Bt = [1, 138], vt = [1, 136], Q1 = [8, 9, 10, 11, 27, 32, 34, 36, 38, 44, 60, 84, 85, 86, 87, 88, 89, 102, 105, 106, 109, 111, 114, 115, 116, 121, 122, 123, 124], Lt = [1, 154], Vt = [1, 156], B = [8, 9, 11], H = [8, 9, 10, 11, 14, 44, 60, 89, 105, 106, 109, 111, 114, 115, 116], S = [1, 176], j = [1, 172], K = [1, 173], D = [1, 177], x = [1, 174], T = [1, 175], R1 = [77, 116, 119], F = [8, 9, 10, 11, 12, 14, 27, 29, 32, 44, 60, 75, 84, 85, 86, 87, 88, 89, 90, 105, 109, 111, 114, 115, 116], It = [10, 106], f1 = [31, 49, 51, 53, 55, 57, 62, 64, 66, 67, 69, 71, 116, 117, 118], r1 = [1, 247], a1 = [1, 245], n1 = [1, 249], u1 = [1, 243], o1 = [1, 244], l1 = [1, 246], c1 = [1, 248], h1 = [1, 250], N1 = [1, 268], wt = [8, 9, 11, 106], $ = [8, 9, 10, 11, 60, 84, 105, 106, 109, 110, 111, 112], J1 = {
|
| 637 |
+
trace: /* @__PURE__ */ m(function() {
|
| 638 |
+
}, "trace"),
|
| 639 |
+
yy: {},
|
| 640 |
+
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, shapeData: 39, SHAPE_DATA: 40, link: 41, node: 42, styledVertex: 43, AMP: 44, vertex: 45, STYLE_SEPARATOR: 46, idString: 47, DOUBLECIRCLESTART: 48, DOUBLECIRCLEEND: 49, PS: 50, PE: 51, "(-": 52, "-)": 53, STADIUMSTART: 54, STADIUMEND: 55, SUBROUTINESTART: 56, SUBROUTINEEND: 57, VERTEX_WITH_PROPS_START: 58, "NODE_STRING[field]": 59, COLON: 60, "NODE_STRING[value]": 61, PIPE: 62, CYLINDERSTART: 63, CYLINDEREND: 64, DIAMOND_START: 65, DIAMOND_STOP: 66, TAGEND: 67, TRAPSTART: 68, TRAPEND: 69, INVTRAPSTART: 70, INVTRAPEND: 71, linkStatement: 72, arrowText: 73, TESTSTR: 74, START_LINK: 75, edgeText: 76, LINK: 77, LINK_ID: 78, edgeTextToken: 79, STR: 80, MD_STR: 81, textToken: 82, keywords: 83, STYLE: 84, LINKSTYLE: 85, CLASSDEF: 86, CLASS: 87, CLICK: 88, DOWN: 89, UP: 90, textNoTagsToken: 91, stylesOpt: 92, "idString[vertex]": 93, "idString[class]": 94, CALLBACKNAME: 95, CALLBACKARGS: 96, HREF: 97, LINK_TARGET: 98, "STR[link]": 99, "STR[tooltip]": 100, alphaNum: 101, DEFAULT: 102, numList: 103, INTERPOLATE: 104, NUM: 105, COMMA: 106, style: 107, styleComponent: 108, NODE_STRING: 109, UNIT: 110, BRKT: 111, PCT: 112, idStringToken: 113, MINUS: 114, MULT: 115, UNICODE_TEXT: 116, TEXT: 117, TAGSTART: 118, EDGE_TEXT: 119, alphaNumToken: 120, direction_tb: 121, direction_bt: 122, direction_rl: 123, direction_lr: 124, $accept: 0, $end: 1 },
|
| 641 |
+
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", 40: "SHAPE_DATA", 44: "AMP", 46: "STYLE_SEPARATOR", 48: "DOUBLECIRCLESTART", 49: "DOUBLECIRCLEEND", 50: "PS", 51: "PE", 52: "(-", 53: "-)", 54: "STADIUMSTART", 55: "STADIUMEND", 56: "SUBROUTINESTART", 57: "SUBROUTINEEND", 58: "VERTEX_WITH_PROPS_START", 59: "NODE_STRING[field]", 60: "COLON", 61: "NODE_STRING[value]", 62: "PIPE", 63: "CYLINDERSTART", 64: "CYLINDEREND", 65: "DIAMOND_START", 66: "DIAMOND_STOP", 67: "TAGEND", 68: "TRAPSTART", 69: "TRAPEND", 70: "INVTRAPSTART", 71: "INVTRAPEND", 74: "TESTSTR", 75: "START_LINK", 77: "LINK", 78: "LINK_ID", 80: "STR", 81: "MD_STR", 84: "STYLE", 85: "LINKSTYLE", 86: "CLASSDEF", 87: "CLASS", 88: "CLICK", 89: "DOWN", 90: "UP", 93: "idString[vertex]", 94: "idString[class]", 95: "CALLBACKNAME", 96: "CALLBACKARGS", 97: "HREF", 98: "LINK_TARGET", 99: "STR[link]", 100: "STR[tooltip]", 102: "DEFAULT", 104: "INTERPOLATE", 105: "NUM", 106: "COMMA", 109: "NODE_STRING", 110: "UNIT", 111: "BRKT", 112: "PCT", 114: "MINUS", 115: "MULT", 116: "UNICODE_TEXT", 117: "TEXT", 118: "TAGSTART", 119: "EDGE_TEXT", 121: "direction_tb", 122: "direction_bt", 123: "direction_rl", 124: "direction_lr" },
|
| 642 |
+
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], [39, 2], [39, 1], [20, 4], [20, 3], [20, 4], [20, 2], [20, 2], [20, 1], [42, 1], [42, 6], [42, 5], [43, 1], [43, 3], [45, 4], [45, 4], [45, 6], [45, 4], [45, 4], [45, 4], [45, 8], [45, 4], [45, 4], [45, 4], [45, 6], [45, 4], [45, 4], [45, 4], [45, 4], [45, 4], [45, 1], [41, 2], [41, 3], [41, 3], [41, 1], [41, 3], [41, 4], [76, 1], [76, 2], [76, 1], [76, 1], [72, 1], [72, 2], [73, 3], [30, 1], [30, 2], [30, 1], [30, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 1], [83, 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], [103, 1], [103, 3], [92, 1], [92, 3], [107, 1], [107, 2], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [108, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [113, 1], [82, 1], [82, 1], [82, 1], [82, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [91, 1], [79, 1], [79, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [120, 1], [47, 1], [47, 2], [101, 1], [101, 2], [33, 1], [33, 1], [33, 1], [33, 1]],
|
| 643 |
+
performAction: /* @__PURE__ */ m(function(h, d, g, l, _, t, O1) {
|
| 644 |
+
var e = t.length - 1;
|
| 645 |
+
switch (_) {
|
| 646 |
+
case 2:
|
| 647 |
+
this.$ = [];
|
| 648 |
+
break;
|
| 649 |
+
case 3:
|
| 650 |
+
(!Array.isArray(t[e]) || t[e].length > 0) && t[e - 1].push(t[e]), this.$ = t[e - 1];
|
| 651 |
+
break;
|
| 652 |
+
case 4:
|
| 653 |
+
case 183:
|
| 654 |
+
this.$ = t[e];
|
| 655 |
+
break;
|
| 656 |
+
case 11:
|
| 657 |
+
l.setDirection("TB"), this.$ = "TB";
|
| 658 |
+
break;
|
| 659 |
+
case 12:
|
| 660 |
+
l.setDirection(t[e - 1]), this.$ = t[e - 1];
|
| 661 |
+
break;
|
| 662 |
+
case 27:
|
| 663 |
+
this.$ = t[e - 1].nodes;
|
| 664 |
+
break;
|
| 665 |
+
case 28:
|
| 666 |
+
case 29:
|
| 667 |
+
case 30:
|
| 668 |
+
case 31:
|
| 669 |
+
case 32:
|
| 670 |
+
this.$ = [];
|
| 671 |
+
break;
|
| 672 |
+
case 33:
|
| 673 |
+
this.$ = l.addSubGraph(t[e - 6], t[e - 1], t[e - 4]);
|
| 674 |
+
break;
|
| 675 |
+
case 34:
|
| 676 |
+
this.$ = l.addSubGraph(t[e - 3], t[e - 1], t[e - 3]);
|
| 677 |
+
break;
|
| 678 |
+
case 35:
|
| 679 |
+
this.$ = l.addSubGraph(void 0, t[e - 1], void 0);
|
| 680 |
+
break;
|
| 681 |
+
case 37:
|
| 682 |
+
this.$ = t[e].trim(), l.setAccTitle(this.$);
|
| 683 |
+
break;
|
| 684 |
+
case 38:
|
| 685 |
+
case 39:
|
| 686 |
+
this.$ = t[e].trim(), l.setAccDescription(this.$);
|
| 687 |
+
break;
|
| 688 |
+
case 43:
|
| 689 |
+
this.$ = t[e - 1] + t[e];
|
| 690 |
+
break;
|
| 691 |
+
case 44:
|
| 692 |
+
this.$ = t[e];
|
| 693 |
+
break;
|
| 694 |
+
case 45:
|
| 695 |
+
l.addVertex(t[e - 1][t[e - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, t[e]), l.addLink(t[e - 3].stmt, t[e - 1], t[e - 2]), this.$ = { stmt: t[e - 1], nodes: t[e - 1].concat(t[e - 3].nodes) };
|
| 696 |
+
break;
|
| 697 |
+
case 46:
|
| 698 |
+
l.addLink(t[e - 2].stmt, t[e], t[e - 1]), this.$ = { stmt: t[e], nodes: t[e].concat(t[e - 2].nodes) };
|
| 699 |
+
break;
|
| 700 |
+
case 47:
|
| 701 |
+
l.addLink(t[e - 3].stmt, t[e - 1], t[e - 2]), this.$ = { stmt: t[e - 1], nodes: t[e - 1].concat(t[e - 3].nodes) };
|
| 702 |
+
break;
|
| 703 |
+
case 48:
|
| 704 |
+
this.$ = { stmt: t[e - 1], nodes: t[e - 1] };
|
| 705 |
+
break;
|
| 706 |
+
case 49:
|
| 707 |
+
l.addVertex(t[e - 1][t[e - 1].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, t[e]), this.$ = { stmt: t[e - 1], nodes: t[e - 1], shapeData: t[e] };
|
| 708 |
+
break;
|
| 709 |
+
case 50:
|
| 710 |
+
this.$ = { stmt: t[e], nodes: t[e] };
|
| 711 |
+
break;
|
| 712 |
+
case 51:
|
| 713 |
+
this.$ = [t[e]];
|
| 714 |
+
break;
|
| 715 |
+
case 52:
|
| 716 |
+
l.addVertex(t[e - 5][t[e - 5].length - 1], void 0, void 0, void 0, void 0, void 0, void 0, t[e - 4]), this.$ = t[e - 5].concat(t[e]);
|
| 717 |
+
break;
|
| 718 |
+
case 53:
|
| 719 |
+
this.$ = t[e - 4].concat(t[e]);
|
| 720 |
+
break;
|
| 721 |
+
case 54:
|
| 722 |
+
this.$ = t[e];
|
| 723 |
+
break;
|
| 724 |
+
case 55:
|
| 725 |
+
this.$ = t[e - 2], l.setClass(t[e - 2], t[e]);
|
| 726 |
+
break;
|
| 727 |
+
case 56:
|
| 728 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "square");
|
| 729 |
+
break;
|
| 730 |
+
case 57:
|
| 731 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "doublecircle");
|
| 732 |
+
break;
|
| 733 |
+
case 58:
|
| 734 |
+
this.$ = t[e - 5], l.addVertex(t[e - 5], t[e - 2], "circle");
|
| 735 |
+
break;
|
| 736 |
+
case 59:
|
| 737 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "ellipse");
|
| 738 |
+
break;
|
| 739 |
+
case 60:
|
| 740 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "stadium");
|
| 741 |
+
break;
|
| 742 |
+
case 61:
|
| 743 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "subroutine");
|
| 744 |
+
break;
|
| 745 |
+
case 62:
|
| 746 |
+
this.$ = t[e - 7], l.addVertex(t[e - 7], t[e - 1], "rect", void 0, void 0, void 0, Object.fromEntries([[t[e - 5], t[e - 3]]]));
|
| 747 |
+
break;
|
| 748 |
+
case 63:
|
| 749 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "cylinder");
|
| 750 |
+
break;
|
| 751 |
+
case 64:
|
| 752 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "round");
|
| 753 |
+
break;
|
| 754 |
+
case 65:
|
| 755 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "diamond");
|
| 756 |
+
break;
|
| 757 |
+
case 66:
|
| 758 |
+
this.$ = t[e - 5], l.addVertex(t[e - 5], t[e - 2], "hexagon");
|
| 759 |
+
break;
|
| 760 |
+
case 67:
|
| 761 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "odd");
|
| 762 |
+
break;
|
| 763 |
+
case 68:
|
| 764 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "trapezoid");
|
| 765 |
+
break;
|
| 766 |
+
case 69:
|
| 767 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "inv_trapezoid");
|
| 768 |
+
break;
|
| 769 |
+
case 70:
|
| 770 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "lean_right");
|
| 771 |
+
break;
|
| 772 |
+
case 71:
|
| 773 |
+
this.$ = t[e - 3], l.addVertex(t[e - 3], t[e - 1], "lean_left");
|
| 774 |
+
break;
|
| 775 |
+
case 72:
|
| 776 |
+
this.$ = t[e], l.addVertex(t[e]);
|
| 777 |
+
break;
|
| 778 |
+
case 73:
|
| 779 |
+
t[e - 1].text = t[e], this.$ = t[e - 1];
|
| 780 |
+
break;
|
| 781 |
+
case 74:
|
| 782 |
+
case 75:
|
| 783 |
+
t[e - 2].text = t[e - 1], this.$ = t[e - 2];
|
| 784 |
+
break;
|
| 785 |
+
case 76:
|
| 786 |
+
this.$ = t[e];
|
| 787 |
+
break;
|
| 788 |
+
case 77:
|
| 789 |
+
var v = l.destructLink(t[e], t[e - 2]);
|
| 790 |
+
this.$ = { type: v.type, stroke: v.stroke, length: v.length, text: t[e - 1] };
|
| 791 |
+
break;
|
| 792 |
+
case 78:
|
| 793 |
+
var v = l.destructLink(t[e], t[e - 2]);
|
| 794 |
+
this.$ = { type: v.type, stroke: v.stroke, length: v.length, text: t[e - 1], id: t[e - 3] };
|
| 795 |
+
break;
|
| 796 |
+
case 79:
|
| 797 |
+
this.$ = { text: t[e], type: "text" };
|
| 798 |
+
break;
|
| 799 |
+
case 80:
|
| 800 |
+
this.$ = { text: t[e - 1].text + "" + t[e], type: t[e - 1].type };
|
| 801 |
+
break;
|
| 802 |
+
case 81:
|
| 803 |
+
this.$ = { text: t[e], type: "string" };
|
| 804 |
+
break;
|
| 805 |
+
case 82:
|
| 806 |
+
this.$ = { text: t[e], type: "markdown" };
|
| 807 |
+
break;
|
| 808 |
+
case 83:
|
| 809 |
+
var v = l.destructLink(t[e]);
|
| 810 |
+
this.$ = { type: v.type, stroke: v.stroke, length: v.length };
|
| 811 |
+
break;
|
| 812 |
+
case 84:
|
| 813 |
+
var v = l.destructLink(t[e]);
|
| 814 |
+
this.$ = { type: v.type, stroke: v.stroke, length: v.length, id: t[e - 1] };
|
| 815 |
+
break;
|
| 816 |
+
case 85:
|
| 817 |
+
this.$ = t[e - 1];
|
| 818 |
+
break;
|
| 819 |
+
case 86:
|
| 820 |
+
this.$ = { text: t[e], type: "text" };
|
| 821 |
+
break;
|
| 822 |
+
case 87:
|
| 823 |
+
this.$ = { text: t[e - 1].text + "" + t[e], type: t[e - 1].type };
|
| 824 |
+
break;
|
| 825 |
+
case 88:
|
| 826 |
+
this.$ = { text: t[e], type: "string" };
|
| 827 |
+
break;
|
| 828 |
+
case 89:
|
| 829 |
+
case 104:
|
| 830 |
+
this.$ = { text: t[e], type: "markdown" };
|
| 831 |
+
break;
|
| 832 |
+
case 101:
|
| 833 |
+
this.$ = { text: t[e], type: "text" };
|
| 834 |
+
break;
|
| 835 |
+
case 102:
|
| 836 |
+
this.$ = { text: t[e - 1].text + "" + t[e], type: t[e - 1].type };
|
| 837 |
+
break;
|
| 838 |
+
case 103:
|
| 839 |
+
this.$ = { text: t[e], type: "text" };
|
| 840 |
+
break;
|
| 841 |
+
case 105:
|
| 842 |
+
this.$ = t[e - 4], l.addClass(t[e - 2], t[e]);
|
| 843 |
+
break;
|
| 844 |
+
case 106:
|
| 845 |
+
this.$ = t[e - 4], l.setClass(t[e - 2], t[e]);
|
| 846 |
+
break;
|
| 847 |
+
case 107:
|
| 848 |
+
case 115:
|
| 849 |
+
this.$ = t[e - 1], l.setClickEvent(t[e - 1], t[e]);
|
| 850 |
+
break;
|
| 851 |
+
case 108:
|
| 852 |
+
case 116:
|
| 853 |
+
this.$ = t[e - 3], l.setClickEvent(t[e - 3], t[e - 2]), l.setTooltip(t[e - 3], t[e]);
|
| 854 |
+
break;
|
| 855 |
+
case 109:
|
| 856 |
+
this.$ = t[e - 2], l.setClickEvent(t[e - 2], t[e - 1], t[e]);
|
| 857 |
+
break;
|
| 858 |
+
case 110:
|
| 859 |
+
this.$ = t[e - 4], l.setClickEvent(t[e - 4], t[e - 3], t[e - 2]), l.setTooltip(t[e - 4], t[e]);
|
| 860 |
+
break;
|
| 861 |
+
case 111:
|
| 862 |
+
this.$ = t[e - 2], l.setLink(t[e - 2], t[e]);
|
| 863 |
+
break;
|
| 864 |
+
case 112:
|
| 865 |
+
this.$ = t[e - 4], l.setLink(t[e - 4], t[e - 2]), l.setTooltip(t[e - 4], t[e]);
|
| 866 |
+
break;
|
| 867 |
+
case 113:
|
| 868 |
+
this.$ = t[e - 4], l.setLink(t[e - 4], t[e - 2], t[e]);
|
| 869 |
+
break;
|
| 870 |
+
case 114:
|
| 871 |
+
this.$ = t[e - 6], l.setLink(t[e - 6], t[e - 4], t[e]), l.setTooltip(t[e - 6], t[e - 2]);
|
| 872 |
+
break;
|
| 873 |
+
case 117:
|
| 874 |
+
this.$ = t[e - 1], l.setLink(t[e - 1], t[e]);
|
| 875 |
+
break;
|
| 876 |
+
case 118:
|
| 877 |
+
this.$ = t[e - 3], l.setLink(t[e - 3], t[e - 2]), l.setTooltip(t[e - 3], t[e]);
|
| 878 |
+
break;
|
| 879 |
+
case 119:
|
| 880 |
+
this.$ = t[e - 3], l.setLink(t[e - 3], t[e - 2], t[e]);
|
| 881 |
+
break;
|
| 882 |
+
case 120:
|
| 883 |
+
this.$ = t[e - 5], l.setLink(t[e - 5], t[e - 4], t[e]), l.setTooltip(t[e - 5], t[e - 2]);
|
| 884 |
+
break;
|
| 885 |
+
case 121:
|
| 886 |
+
this.$ = t[e - 4], l.addVertex(t[e - 2], void 0, void 0, t[e]);
|
| 887 |
+
break;
|
| 888 |
+
case 122:
|
| 889 |
+
this.$ = t[e - 4], l.updateLink([t[e - 2]], t[e]);
|
| 890 |
+
break;
|
| 891 |
+
case 123:
|
| 892 |
+
this.$ = t[e - 4], l.updateLink(t[e - 2], t[e]);
|
| 893 |
+
break;
|
| 894 |
+
case 124:
|
| 895 |
+
this.$ = t[e - 8], l.updateLinkInterpolate([t[e - 6]], t[e - 2]), l.updateLink([t[e - 6]], t[e]);
|
| 896 |
+
break;
|
| 897 |
+
case 125:
|
| 898 |
+
this.$ = t[e - 8], l.updateLinkInterpolate(t[e - 6], t[e - 2]), l.updateLink(t[e - 6], t[e]);
|
| 899 |
+
break;
|
| 900 |
+
case 126:
|
| 901 |
+
this.$ = t[e - 6], l.updateLinkInterpolate([t[e - 4]], t[e]);
|
| 902 |
+
break;
|
| 903 |
+
case 127:
|
| 904 |
+
this.$ = t[e - 6], l.updateLinkInterpolate(t[e - 4], t[e]);
|
| 905 |
+
break;
|
| 906 |
+
case 128:
|
| 907 |
+
case 130:
|
| 908 |
+
this.$ = [t[e]];
|
| 909 |
+
break;
|
| 910 |
+
case 129:
|
| 911 |
+
case 131:
|
| 912 |
+
t[e - 2].push(t[e]), this.$ = t[e - 2];
|
| 913 |
+
break;
|
| 914 |
+
case 133:
|
| 915 |
+
this.$ = t[e - 1] + t[e];
|
| 916 |
+
break;
|
| 917 |
+
case 181:
|
| 918 |
+
this.$ = t[e];
|
| 919 |
+
break;
|
| 920 |
+
case 182:
|
| 921 |
+
this.$ = t[e - 1] + "" + t[e];
|
| 922 |
+
break;
|
| 923 |
+
case 184:
|
| 924 |
+
this.$ = t[e - 1] + "" + t[e];
|
| 925 |
+
break;
|
| 926 |
+
case 185:
|
| 927 |
+
this.$ = { stmt: "dir", value: "TB" };
|
| 928 |
+
break;
|
| 929 |
+
case 186:
|
| 930 |
+
this.$ = { stmt: "dir", value: "BT" };
|
| 931 |
+
break;
|
| 932 |
+
case 187:
|
| 933 |
+
this.$ = { stmt: "dir", value: "RL" };
|
| 934 |
+
break;
|
| 935 |
+
case 188:
|
| 936 |
+
this.$ = { stmt: "dir", value: "LR" };
|
| 937 |
+
break;
|
| 938 |
+
}
|
| 939 |
+
}, "anonymous"),
|
| 940 |
+
table: [{ 3: 1, 4: 2, 9: i, 10: a, 12: n }, { 1: [3] }, s(u, o, { 5: 6 }), { 4: 7, 9: i, 10: a, 12: n }, { 4: 8, 9: i, 10: a, 12: n }, { 13: [1, 9], 14: [1, 10] }, { 1: [2, 1], 6: 11, 7: 12, 8: f, 9: c, 10: A, 11: r, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: k, 33: 24, 34: E, 36: b, 38: L, 42: 28, 43: 38, 44: C, 45: 39, 47: 40, 60: p, 84: J, 85: W, 86: Z, 87: A1, 88: M1, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M, 121: U1, 122: W1, 123: z1, 124: j1 }, s(u, [2, 9]), s(u, [2, 10]), s(u, [2, 11]), { 8: [1, 54], 9: [1, 55], 10: p1, 15: 53, 18: 56 }, s(y, [2, 3]), s(y, [2, 4]), s(y, [2, 5]), s(y, [2, 6]), s(y, [2, 7]), s(y, [2, 8]), { 8: e1, 9: s1, 11: i1, 21: 58, 41: 59, 72: 63, 75: [1, 64], 77: [1, 66], 78: [1, 65] }, { 8: e1, 9: s1, 11: i1, 21: 67 }, { 8: e1, 9: s1, 11: i1, 21: 68 }, { 8: e1, 9: s1, 11: i1, 21: 69 }, { 8: e1, 9: s1, 11: i1, 21: 70 }, { 8: e1, 9: s1, 11: i1, 21: 71 }, { 8: e1, 9: s1, 10: [1, 72], 11: i1, 21: 73 }, s(y, [2, 36]), { 35: [1, 74] }, { 37: [1, 75] }, s(y, [2, 39]), s(D1, [2, 50], { 18: 76, 39: 77, 10: p1, 40: at }), { 10: [1, 79] }, { 10: [1, 80] }, { 10: [1, 81] }, { 10: [1, 82] }, { 14: x1, 44: T1, 60: E1, 80: [1, 86], 89: y1, 95: [1, 83], 97: [1, 84], 101: 85, 105: F1, 106: _1, 109: B1, 111: v1, 114: L1, 115: V1, 116: I1, 120: 87 }, s(y, [2, 185]), s(y, [2, 186]), s(y, [2, 187]), s(y, [2, 188]), s(k1, [2, 51]), s(k1, [2, 54], { 46: [1, 99] }), s(z, [2, 72], { 113: 112, 29: [1, 100], 44: C, 48: [1, 101], 50: [1, 102], 52: [1, 103], 54: [1, 104], 56: [1, 105], 58: [1, 106], 60: p, 63: [1, 107], 65: [1, 108], 67: [1, 109], 68: [1, 110], 70: [1, 111], 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 114: P, 115: O, 116: M }), s(q, [2, 181]), s(q, [2, 142]), s(q, [2, 143]), s(q, [2, 144]), s(q, [2, 145]), s(q, [2, 146]), s(q, [2, 147]), s(q, [2, 148]), s(q, [2, 149]), s(q, [2, 150]), s(q, [2, 151]), s(q, [2, 152]), s(u, [2, 12]), s(u, [2, 18]), s(u, [2, 19]), { 9: [1, 113] }, s(nt, [2, 26], { 18: 114, 10: p1 }), s(y, [2, 27]), { 42: 115, 43: 38, 44: C, 45: 39, 47: 40, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, s(y, [2, 40]), s(y, [2, 41]), s(y, [2, 42]), s(w1, [2, 76], { 73: 116, 62: [1, 118], 74: [1, 117] }), { 76: 119, 79: 120, 80: ut, 81: ot, 116: K1, 119: Y1 }, { 75: [1, 125], 77: [1, 126] }, s(lt, [2, 83]), s(y, [2, 28]), s(y, [2, 29]), s(y, [2, 30]), s(y, [2, 31]), s(y, [2, 32]), { 10: ct, 12: ht, 14: dt, 27: pt, 28: 127, 32: ft, 44: gt, 60: bt, 75: At, 80: [1, 129], 81: [1, 130], 83: 140, 84: kt, 85: mt, 86: Ct, 87: St, 88: Dt, 89: xt, 90: Tt, 91: 128, 105: Et, 109: yt, 111: Ft, 114: _t, 115: Bt, 116: vt }, s(Q1, o, { 5: 153 }), s(y, [2, 37]), s(y, [2, 38]), s(D1, [2, 48], { 44: Lt }), s(D1, [2, 49], { 18: 155, 10: p1, 40: Vt }), s(k1, [2, 44]), { 44: C, 47: 157, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, { 102: [1, 158], 103: 159, 105: [1, 160] }, { 44: C, 47: 161, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, { 44: C, 47: 162, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, s(B, [2, 107], { 10: [1, 163], 96: [1, 164] }), { 80: [1, 165] }, s(B, [2, 115], { 120: 167, 10: [1, 166], 14: x1, 44: T1, 60: E1, 89: y1, 105: F1, 106: _1, 109: B1, 111: v1, 114: L1, 115: V1, 116: I1 }), s(B, [2, 117], { 10: [1, 168] }), s(H, [2, 183]), s(H, [2, 170]), s(H, [2, 171]), s(H, [2, 172]), s(H, [2, 173]), s(H, [2, 174]), s(H, [2, 175]), s(H, [2, 176]), s(H, [2, 177]), s(H, [2, 178]), s(H, [2, 179]), s(H, [2, 180]), { 44: C, 47: 169, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, { 30: 170, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 178, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 180, 50: [1, 179], 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 181, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 182, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 183, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 109: [1, 184] }, { 30: 185, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 186, 65: [1, 187], 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 188, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 189, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 30: 190, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, s(q, [2, 182]), s(u, [2, 20]), s(nt, [2, 25]), s(D1, [2, 46], { 39: 191, 18: 192, 10: p1, 40: at }), s(w1, [2, 73], { 10: [1, 193] }), { 10: [1, 194] }, { 30: 195, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 77: [1, 196], 79: 197, 116: K1, 119: Y1 }, s(R1, [2, 79]), s(R1, [2, 81]), s(R1, [2, 82]), s(R1, [2, 168]), s(R1, [2, 169]), { 76: 198, 79: 120, 80: ut, 81: ot, 116: K1, 119: Y1 }, s(lt, [2, 84]), { 8: e1, 9: s1, 10: ct, 11: i1, 12: ht, 14: dt, 21: 200, 27: pt, 29: [1, 199], 32: ft, 44: gt, 60: bt, 75: At, 83: 140, 84: kt, 85: mt, 86: Ct, 87: St, 88: Dt, 89: xt, 90: Tt, 91: 201, 105: Et, 109: yt, 111: Ft, 114: _t, 115: Bt, 116: vt }, s(F, [2, 101]), s(F, [2, 103]), s(F, [2, 104]), s(F, [2, 157]), s(F, [2, 158]), s(F, [2, 159]), s(F, [2, 160]), s(F, [2, 161]), s(F, [2, 162]), s(F, [2, 163]), s(F, [2, 164]), s(F, [2, 165]), s(F, [2, 166]), s(F, [2, 167]), s(F, [2, 90]), s(F, [2, 91]), s(F, [2, 92]), s(F, [2, 93]), s(F, [2, 94]), s(F, [2, 95]), s(F, [2, 96]), s(F, [2, 97]), s(F, [2, 98]), s(F, [2, 99]), s(F, [2, 100]), { 6: 11, 7: 12, 8: f, 9: c, 10: A, 11: r, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: k, 32: [1, 202], 33: 24, 34: E, 36: b, 38: L, 42: 28, 43: 38, 44: C, 45: 39, 47: 40, 60: p, 84: J, 85: W, 86: Z, 87: A1, 88: M1, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M, 121: U1, 122: W1, 123: z1, 124: j1 }, { 10: p1, 18: 203 }, { 44: [1, 204] }, s(k1, [2, 43]), { 10: [1, 205], 44: C, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 112, 114: P, 115: O, 116: M }, { 10: [1, 206] }, { 10: [1, 207], 106: [1, 208] }, s(It, [2, 128]), { 10: [1, 209], 44: C, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 112, 114: P, 115: O, 116: M }, { 10: [1, 210], 44: C, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 112, 114: P, 115: O, 116: M }, { 80: [1, 211] }, s(B, [2, 109], { 10: [1, 212] }), s(B, [2, 111], { 10: [1, 213] }), { 80: [1, 214] }, s(H, [2, 184]), { 80: [1, 215], 98: [1, 216] }, s(k1, [2, 55], { 113: 112, 44: C, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 114: P, 115: O, 116: M }), { 31: [1, 217], 67: S, 82: 218, 116: D, 117: x, 118: T }, s(f1, [2, 86]), s(f1, [2, 88]), s(f1, [2, 89]), s(f1, [2, 153]), s(f1, [2, 154]), s(f1, [2, 155]), s(f1, [2, 156]), { 49: [1, 219], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 30: 220, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 51: [1, 221], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 53: [1, 222], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 55: [1, 223], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 57: [1, 224], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 60: [1, 225] }, { 64: [1, 226], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 66: [1, 227], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 30: 228, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, { 31: [1, 229], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 67: S, 69: [1, 230], 71: [1, 231], 82: 218, 116: D, 117: x, 118: T }, { 67: S, 69: [1, 233], 71: [1, 232], 82: 218, 116: D, 117: x, 118: T }, s(D1, [2, 45], { 18: 155, 10: p1, 40: Vt }), s(D1, [2, 47], { 44: Lt }), s(w1, [2, 75]), s(w1, [2, 74]), { 62: [1, 234], 67: S, 82: 218, 116: D, 117: x, 118: T }, s(w1, [2, 77]), s(R1, [2, 80]), { 77: [1, 235], 79: 197, 116: K1, 119: Y1 }, { 30: 236, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, s(Q1, o, { 5: 237 }), s(F, [2, 102]), s(y, [2, 35]), { 43: 238, 44: C, 45: 39, 47: 40, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, { 10: p1, 18: 239 }, { 10: r1, 60: a1, 84: n1, 92: 240, 105: u1, 107: 241, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, { 10: r1, 60: a1, 84: n1, 92: 251, 104: [1, 252], 105: u1, 107: 241, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, { 10: r1, 60: a1, 84: n1, 92: 253, 104: [1, 254], 105: u1, 107: 241, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, { 105: [1, 255] }, { 10: r1, 60: a1, 84: n1, 92: 256, 105: u1, 107: 241, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, { 44: C, 47: 257, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, s(B, [2, 108]), { 80: [1, 258] }, { 80: [1, 259], 98: [1, 260] }, s(B, [2, 116]), s(B, [2, 118], { 10: [1, 261] }), s(B, [2, 119]), s(z, [2, 56]), s(f1, [2, 87]), s(z, [2, 57]), { 51: [1, 262], 67: S, 82: 218, 116: D, 117: x, 118: T }, s(z, [2, 64]), s(z, [2, 59]), s(z, [2, 60]), s(z, [2, 61]), { 109: [1, 263] }, s(z, [2, 63]), s(z, [2, 65]), { 66: [1, 264], 67: S, 82: 218, 116: D, 117: x, 118: T }, s(z, [2, 67]), s(z, [2, 68]), s(z, [2, 70]), s(z, [2, 69]), s(z, [2, 71]), s([10, 44, 60, 89, 102, 105, 106, 109, 111, 114, 115, 116], [2, 85]), s(w1, [2, 78]), { 31: [1, 265], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 6: 11, 7: 12, 8: f, 9: c, 10: A, 11: r, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: k, 32: [1, 266], 33: 24, 34: E, 36: b, 38: L, 42: 28, 43: 38, 44: C, 45: 39, 47: 40, 60: p, 84: J, 85: W, 86: Z, 87: A1, 88: M1, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M, 121: U1, 122: W1, 123: z1, 124: j1 }, s(k1, [2, 53]), { 43: 267, 44: C, 45: 39, 47: 40, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M }, s(B, [2, 121], { 106: N1 }), s(wt, [2, 130], { 108: 269, 10: r1, 60: a1, 84: n1, 105: u1, 109: o1, 110: l1, 111: c1, 112: h1 }), s($, [2, 132]), s($, [2, 134]), s($, [2, 135]), s($, [2, 136]), s($, [2, 137]), s($, [2, 138]), s($, [2, 139]), s($, [2, 140]), s($, [2, 141]), s(B, [2, 122], { 106: N1 }), { 10: [1, 270] }, s(B, [2, 123], { 106: N1 }), { 10: [1, 271] }, s(It, [2, 129]), s(B, [2, 105], { 106: N1 }), s(B, [2, 106], { 113: 112, 44: C, 60: p, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 114: P, 115: O, 116: M }), s(B, [2, 110]), s(B, [2, 112], { 10: [1, 272] }), s(B, [2, 113]), { 98: [1, 273] }, { 51: [1, 274] }, { 62: [1, 275] }, { 66: [1, 276] }, { 8: e1, 9: s1, 11: i1, 21: 277 }, s(y, [2, 34]), s(k1, [2, 52]), { 10: r1, 60: a1, 84: n1, 105: u1, 107: 278, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, s($, [2, 133]), { 14: x1, 44: T1, 60: E1, 89: y1, 101: 279, 105: F1, 106: _1, 109: B1, 111: v1, 114: L1, 115: V1, 116: I1, 120: 87 }, { 14: x1, 44: T1, 60: E1, 89: y1, 101: 280, 105: F1, 106: _1, 109: B1, 111: v1, 114: L1, 115: V1, 116: I1, 120: 87 }, { 98: [1, 281] }, s(B, [2, 120]), s(z, [2, 58]), { 30: 282, 67: S, 80: j, 81: K, 82: 171, 116: D, 117: x, 118: T }, s(z, [2, 66]), s(Q1, o, { 5: 283 }), s(wt, [2, 131], { 108: 269, 10: r1, 60: a1, 84: n1, 105: u1, 109: o1, 110: l1, 111: c1, 112: h1 }), s(B, [2, 126], { 120: 167, 10: [1, 284], 14: x1, 44: T1, 60: E1, 89: y1, 105: F1, 106: _1, 109: B1, 111: v1, 114: L1, 115: V1, 116: I1 }), s(B, [2, 127], { 120: 167, 10: [1, 285], 14: x1, 44: T1, 60: E1, 89: y1, 105: F1, 106: _1, 109: B1, 111: v1, 114: L1, 115: V1, 116: I1 }), s(B, [2, 114]), { 31: [1, 286], 67: S, 82: 218, 116: D, 117: x, 118: T }, { 6: 11, 7: 12, 8: f, 9: c, 10: A, 11: r, 20: 17, 22: 18, 23: 19, 24: 20, 25: 21, 26: 22, 27: k, 32: [1, 287], 33: 24, 34: E, 36: b, 38: L, 42: 28, 43: 38, 44: C, 45: 39, 47: 40, 60: p, 84: J, 85: W, 86: Z, 87: A1, 88: M1, 89: V, 102: I, 105: w, 106: R, 109: N, 111: G, 113: 41, 114: P, 115: O, 116: M, 121: U1, 122: W1, 123: z1, 124: j1 }, { 10: r1, 60: a1, 84: n1, 92: 288, 105: u1, 107: 241, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, { 10: r1, 60: a1, 84: n1, 92: 289, 105: u1, 107: 241, 108: 242, 109: o1, 110: l1, 111: c1, 112: h1 }, s(z, [2, 62]), s(y, [2, 33]), s(B, [2, 124], { 106: N1 }), s(B, [2, 125], { 106: N1 })],
|
| 941 |
+
defaultActions: {},
|
| 942 |
+
parseError: /* @__PURE__ */ m(function(h, d) {
|
| 943 |
+
if (d.recoverable)
|
| 944 |
+
this.trace(h);
|
| 945 |
+
else {
|
| 946 |
+
var g = new Error(h);
|
| 947 |
+
throw g.hash = d, g;
|
| 948 |
+
}
|
| 949 |
+
}, "parseError"),
|
| 950 |
+
parse: /* @__PURE__ */ m(function(h) {
|
| 951 |
+
var d = this, g = [0], l = [], _ = [null], t = [], O1 = this.table, e = "", v = 0, Rt = 0, zt = 2, Nt = 1, jt = t.slice.call(arguments, 1), U = Object.create(this.lexer), m1 = { yy: {} };
|
| 952 |
+
for (var Z1 in this.yy)
|
| 953 |
+
Object.prototype.hasOwnProperty.call(this.yy, Z1) && (m1.yy[Z1] = this.yy[Z1]);
|
| 954 |
+
U.setInput(h, m1.yy), m1.yy.lexer = U, m1.yy.parser = this, typeof U.yylloc > "u" && (U.yylloc = {});
|
| 955 |
+
var $1 = U.yylloc;
|
| 956 |
+
t.push($1);
|
| 957 |
+
var Kt = U.options && U.options.ranges;
|
| 958 |
+
typeof m1.yy.parseError == "function" ? this.parseError = m1.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
| 959 |
+
function Yt(X) {
|
| 960 |
+
g.length = g.length - 2 * X, _.length = _.length - X, t.length = t.length - X;
|
| 961 |
+
}
|
| 962 |
+
m(Yt, "popStack");
|
| 963 |
+
function Gt() {
|
| 964 |
+
var X;
|
| 965 |
+
return X = l.pop() || U.lex() || Nt, typeof X != "number" && (X instanceof Array && (l = X, X = l.pop()), X = d.symbols_[X] || X), X;
|
| 966 |
+
}
|
| 967 |
+
m(Gt, "lex");
|
| 968 |
+
for (var Y, C1, Q, tt, G1 = {}, H1, d1, Pt, X1; ; ) {
|
| 969 |
+
if (C1 = g[g.length - 1], this.defaultActions[C1] ? Q = this.defaultActions[C1] : ((Y === null || typeof Y > "u") && (Y = Gt()), Q = O1[C1] && O1[C1][Y]), typeof Q > "u" || !Q.length || !Q[0]) {
|
| 970 |
+
var et = "";
|
| 971 |
+
X1 = [];
|
| 972 |
+
for (H1 in O1[C1])
|
| 973 |
+
this.terminals_[H1] && H1 > zt && X1.push("'" + this.terminals_[H1] + "'");
|
| 974 |
+
U.showPosition ? et = "Parse error on line " + (v + 1) + `:
|
| 975 |
+
` + U.showPosition() + `
|
| 976 |
+
Expecting ` + X1.join(", ") + ", got '" + (this.terminals_[Y] || Y) + "'" : et = "Parse error on line " + (v + 1) + ": Unexpected " + (Y == Nt ? "end of input" : "'" + (this.terminals_[Y] || Y) + "'"), this.parseError(et, {
|
| 977 |
+
text: U.match,
|
| 978 |
+
token: this.terminals_[Y] || Y,
|
| 979 |
+
line: U.yylineno,
|
| 980 |
+
loc: $1,
|
| 981 |
+
expected: X1
|
| 982 |
+
});
|
| 983 |
+
}
|
| 984 |
+
if (Q[0] instanceof Array && Q.length > 1)
|
| 985 |
+
throw new Error("Parse Error: multiple actions possible at state: " + C1 + ", token: " + Y);
|
| 986 |
+
switch (Q[0]) {
|
| 987 |
+
case 1:
|
| 988 |
+
g.push(Y), _.push(U.yytext), t.push(U.yylloc), g.push(Q[1]), Y = null, Rt = U.yyleng, e = U.yytext, v = U.yylineno, $1 = U.yylloc;
|
| 989 |
+
break;
|
| 990 |
+
case 2:
|
| 991 |
+
if (d1 = this.productions_[Q[1]][1], G1.$ = _[_.length - d1], G1._$ = {
|
| 992 |
+
first_line: t[t.length - (d1 || 1)].first_line,
|
| 993 |
+
last_line: t[t.length - 1].last_line,
|
| 994 |
+
first_column: t[t.length - (d1 || 1)].first_column,
|
| 995 |
+
last_column: t[t.length - 1].last_column
|
| 996 |
+
}, Kt && (G1._$.range = [
|
| 997 |
+
t[t.length - (d1 || 1)].range[0],
|
| 998 |
+
t[t.length - 1].range[1]
|
| 999 |
+
]), tt = this.performAction.apply(G1, [
|
| 1000 |
+
e,
|
| 1001 |
+
Rt,
|
| 1002 |
+
v,
|
| 1003 |
+
m1.yy,
|
| 1004 |
+
Q[1],
|
| 1005 |
+
_,
|
| 1006 |
+
t
|
| 1007 |
+
].concat(jt)), typeof tt < "u")
|
| 1008 |
+
return tt;
|
| 1009 |
+
d1 && (g = g.slice(0, -1 * d1 * 2), _ = _.slice(0, -1 * d1), t = t.slice(0, -1 * d1)), g.push(this.productions_[Q[1]][0]), _.push(G1.$), t.push(G1._$), Pt = O1[g[g.length - 2]][g[g.length - 1]], g.push(Pt);
|
| 1010 |
+
break;
|
| 1011 |
+
case 3:
|
| 1012 |
+
return !0;
|
| 1013 |
+
}
|
| 1014 |
+
}
|
| 1015 |
+
return !0;
|
| 1016 |
+
}, "parse")
|
| 1017 |
+
}, Wt = /* @__PURE__ */ function() {
|
| 1018 |
+
var g1 = {
|
| 1019 |
+
EOF: 1,
|
| 1020 |
+
parseError: /* @__PURE__ */ m(function(d, g) {
|
| 1021 |
+
if (this.yy.parser)
|
| 1022 |
+
this.yy.parser.parseError(d, g);
|
| 1023 |
+
else
|
| 1024 |
+
throw new Error(d);
|
| 1025 |
+
}, "parseError"),
|
| 1026 |
+
// resets the lexer, sets new input
|
| 1027 |
+
setInput: /* @__PURE__ */ m(function(h, d) {
|
| 1028 |
+
return this.yy = d || this.yy || {}, this._input = h, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
| 1029 |
+
first_line: 1,
|
| 1030 |
+
first_column: 0,
|
| 1031 |
+
last_line: 1,
|
| 1032 |
+
last_column: 0
|
| 1033 |
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
| 1034 |
+
}, "setInput"),
|
| 1035 |
+
// consumes and returns one char from the input
|
| 1036 |
+
input: /* @__PURE__ */ m(function() {
|
| 1037 |
+
var h = this._input[0];
|
| 1038 |
+
this.yytext += h, this.yyleng++, this.offset++, this.match += h, this.matched += h;
|
| 1039 |
+
var d = h.match(/(?:\r\n?|\n).*/g);
|
| 1040 |
+
return d ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), h;
|
| 1041 |
+
}, "input"),
|
| 1042 |
+
// unshifts one char (or a string) into the input
|
| 1043 |
+
unput: /* @__PURE__ */ m(function(h) {
|
| 1044 |
+
var d = h.length, g = h.split(/(?:\r\n?|\n)/g);
|
| 1045 |
+
this._input = h + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - d), this.offset -= d;
|
| 1046 |
+
var l = this.match.split(/(?:\r\n?|\n)/g);
|
| 1047 |
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), g.length - 1 && (this.yylineno -= g.length - 1);
|
| 1048 |
+
var _ = this.yylloc.range;
|
| 1049 |
+
return this.yylloc = {
|
| 1050 |
+
first_line: this.yylloc.first_line,
|
| 1051 |
+
last_line: this.yylineno + 1,
|
| 1052 |
+
first_column: this.yylloc.first_column,
|
| 1053 |
+
last_column: g ? (g.length === l.length ? this.yylloc.first_column : 0) + l[l.length - g.length].length - g[0].length : this.yylloc.first_column - d
|
| 1054 |
+
}, this.options.ranges && (this.yylloc.range = [_[0], _[0] + this.yyleng - d]), this.yyleng = this.yytext.length, this;
|
| 1055 |
+
}, "unput"),
|
| 1056 |
+
// When called from action, caches matched text and appends it on next action
|
| 1057 |
+
more: /* @__PURE__ */ m(function() {
|
| 1058 |
+
return this._more = !0, this;
|
| 1059 |
+
}, "more"),
|
| 1060 |
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
| 1061 |
+
reject: /* @__PURE__ */ m(function() {
|
| 1062 |
+
if (this.options.backtrack_lexer)
|
| 1063 |
+
this._backtrack = !0;
|
| 1064 |
+
else
|
| 1065 |
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
| 1066 |
+
` + this.showPosition(), {
|
| 1067 |
+
text: "",
|
| 1068 |
+
token: null,
|
| 1069 |
+
line: this.yylineno
|
| 1070 |
+
});
|
| 1071 |
+
return this;
|
| 1072 |
+
}, "reject"),
|
| 1073 |
+
// retain first n characters of the match
|
| 1074 |
+
less: /* @__PURE__ */ m(function(h) {
|
| 1075 |
+
this.unput(this.match.slice(h));
|
| 1076 |
+
}, "less"),
|
| 1077 |
+
// displays already matched input, i.e. for error messages
|
| 1078 |
+
pastInput: /* @__PURE__ */ m(function() {
|
| 1079 |
+
var h = this.matched.substr(0, this.matched.length - this.match.length);
|
| 1080 |
+
return (h.length > 20 ? "..." : "") + h.substr(-20).replace(/\n/g, "");
|
| 1081 |
+
}, "pastInput"),
|
| 1082 |
+
// displays upcoming input, i.e. for error messages
|
| 1083 |
+
upcomingInput: /* @__PURE__ */ m(function() {
|
| 1084 |
+
var h = this.match;
|
| 1085 |
+
return h.length < 20 && (h += this._input.substr(0, 20 - h.length)), (h.substr(0, 20) + (h.length > 20 ? "..." : "")).replace(/\n/g, "");
|
| 1086 |
+
}, "upcomingInput"),
|
| 1087 |
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
| 1088 |
+
showPosition: /* @__PURE__ */ m(function() {
|
| 1089 |
+
var h = this.pastInput(), d = new Array(h.length + 1).join("-");
|
| 1090 |
+
return h + this.upcomingInput() + `
|
| 1091 |
+
` + d + "^";
|
| 1092 |
+
}, "showPosition"),
|
| 1093 |
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
| 1094 |
+
test_match: /* @__PURE__ */ m(function(h, d) {
|
| 1095 |
+
var g, l, _;
|
| 1096 |
+
if (this.options.backtrack_lexer && (_ = {
|
| 1097 |
+
yylineno: this.yylineno,
|
| 1098 |
+
yylloc: {
|
| 1099 |
+
first_line: this.yylloc.first_line,
|
| 1100 |
+
last_line: this.last_line,
|
| 1101 |
+
first_column: this.yylloc.first_column,
|
| 1102 |
+
last_column: this.yylloc.last_column
|
| 1103 |
+
},
|
| 1104 |
+
yytext: this.yytext,
|
| 1105 |
+
match: this.match,
|
| 1106 |
+
matches: this.matches,
|
| 1107 |
+
matched: this.matched,
|
| 1108 |
+
yyleng: this.yyleng,
|
| 1109 |
+
offset: this.offset,
|
| 1110 |
+
_more: this._more,
|
| 1111 |
+
_input: this._input,
|
| 1112 |
+
yy: this.yy,
|
| 1113 |
+
conditionStack: this.conditionStack.slice(0),
|
| 1114 |
+
done: this.done
|
| 1115 |
+
}, this.options.ranges && (_.yylloc.range = this.yylloc.range.slice(0))), l = h[0].match(/(?:\r\n?|\n).*/g), l && (this.yylineno += l.length), this.yylloc = {
|
| 1116 |
+
first_line: this.yylloc.last_line,
|
| 1117 |
+
last_line: this.yylineno + 1,
|
| 1118 |
+
first_column: this.yylloc.last_column,
|
| 1119 |
+
last_column: l ? l[l.length - 1].length - l[l.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + h[0].length
|
| 1120 |
+
}, this.yytext += h[0], this.match += h[0], this.matches = h, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(h[0].length), this.matched += h[0], g = this.performAction.call(this, this.yy, this, d, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), g)
|
| 1121 |
+
return g;
|
| 1122 |
+
if (this._backtrack) {
|
| 1123 |
+
for (var t in _)
|
| 1124 |
+
this[t] = _[t];
|
| 1125 |
+
return !1;
|
| 1126 |
+
}
|
| 1127 |
+
return !1;
|
| 1128 |
+
}, "test_match"),
|
| 1129 |
+
// return next match in input
|
| 1130 |
+
next: /* @__PURE__ */ m(function() {
|
| 1131 |
+
if (this.done)
|
| 1132 |
+
return this.EOF;
|
| 1133 |
+
this._input || (this.done = !0);
|
| 1134 |
+
var h, d, g, l;
|
| 1135 |
+
this._more || (this.yytext = "", this.match = "");
|
| 1136 |
+
for (var _ = this._currentRules(), t = 0; t < _.length; t++)
|
| 1137 |
+
if (g = this._input.match(this.rules[_[t]]), g && (!d || g[0].length > d[0].length)) {
|
| 1138 |
+
if (d = g, l = t, this.options.backtrack_lexer) {
|
| 1139 |
+
if (h = this.test_match(g, _[t]), h !== !1)
|
| 1140 |
+
return h;
|
| 1141 |
+
if (this._backtrack) {
|
| 1142 |
+
d = !1;
|
| 1143 |
+
continue;
|
| 1144 |
+
} else
|
| 1145 |
+
return !1;
|
| 1146 |
+
} else if (!this.options.flex)
|
| 1147 |
+
break;
|
| 1148 |
+
}
|
| 1149 |
+
return d ? (h = this.test_match(d, _[l]), h !== !1 ? h : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
| 1150 |
+
` + this.showPosition(), {
|
| 1151 |
+
text: "",
|
| 1152 |
+
token: null,
|
| 1153 |
+
line: this.yylineno
|
| 1154 |
+
});
|
| 1155 |
+
}, "next"),
|
| 1156 |
+
// return next match that has a token
|
| 1157 |
+
lex: /* @__PURE__ */ m(function() {
|
| 1158 |
+
var d = this.next();
|
| 1159 |
+
return d || this.lex();
|
| 1160 |
+
}, "lex"),
|
| 1161 |
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
| 1162 |
+
begin: /* @__PURE__ */ m(function(d) {
|
| 1163 |
+
this.conditionStack.push(d);
|
| 1164 |
+
}, "begin"),
|
| 1165 |
+
// pop the previously active lexer condition state off the condition stack
|
| 1166 |
+
popState: /* @__PURE__ */ m(function() {
|
| 1167 |
+
var d = this.conditionStack.length - 1;
|
| 1168 |
+
return d > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
| 1169 |
+
}, "popState"),
|
| 1170 |
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
| 1171 |
+
_currentRules: /* @__PURE__ */ m(function() {
|
| 1172 |
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
| 1173 |
+
}, "_currentRules"),
|
| 1174 |
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
| 1175 |
+
topState: /* @__PURE__ */ m(function(d) {
|
| 1176 |
+
return d = this.conditionStack.length - 1 - Math.abs(d || 0), d >= 0 ? this.conditionStack[d] : "INITIAL";
|
| 1177 |
+
}, "topState"),
|
| 1178 |
+
// alias for begin(condition)
|
| 1179 |
+
pushState: /* @__PURE__ */ m(function(d) {
|
| 1180 |
+
this.begin(d);
|
| 1181 |
+
}, "pushState"),
|
| 1182 |
+
// return the number of states currently on the stack
|
| 1183 |
+
stateStackSize: /* @__PURE__ */ m(function() {
|
| 1184 |
+
return this.conditionStack.length;
|
| 1185 |
+
}, "stateStackSize"),
|
| 1186 |
+
options: {},
|
| 1187 |
+
performAction: /* @__PURE__ */ m(function(d, g, l, _) {
|
| 1188 |
+
switch (l) {
|
| 1189 |
+
case 0:
|
| 1190 |
+
return this.begin("acc_title"), 34;
|
| 1191 |
+
case 1:
|
| 1192 |
+
return this.popState(), "acc_title_value";
|
| 1193 |
+
case 2:
|
| 1194 |
+
return this.begin("acc_descr"), 36;
|
| 1195 |
+
case 3:
|
| 1196 |
+
return this.popState(), "acc_descr_value";
|
| 1197 |
+
case 4:
|
| 1198 |
+
this.begin("acc_descr_multiline");
|
| 1199 |
+
break;
|
| 1200 |
+
case 5:
|
| 1201 |
+
this.popState();
|
| 1202 |
+
break;
|
| 1203 |
+
case 6:
|
| 1204 |
+
return "acc_descr_multiline_value";
|
| 1205 |
+
case 7:
|
| 1206 |
+
return this.pushState("shapeData"), g.yytext = "", 40;
|
| 1207 |
+
case 8:
|
| 1208 |
+
return this.pushState("shapeDataStr"), 40;
|
| 1209 |
+
case 9:
|
| 1210 |
+
return this.popState(), 40;
|
| 1211 |
+
case 10:
|
| 1212 |
+
const t = /\n\s*/g;
|
| 1213 |
+
return g.yytext = g.yytext.replace(t, "<br/>"), 40;
|
| 1214 |
+
case 11:
|
| 1215 |
+
return 40;
|
| 1216 |
+
case 12:
|
| 1217 |
+
this.popState();
|
| 1218 |
+
break;
|
| 1219 |
+
case 13:
|
| 1220 |
+
this.begin("callbackname");
|
| 1221 |
+
break;
|
| 1222 |
+
case 14:
|
| 1223 |
+
this.popState();
|
| 1224 |
+
break;
|
| 1225 |
+
case 15:
|
| 1226 |
+
this.popState(), this.begin("callbackargs");
|
| 1227 |
+
break;
|
| 1228 |
+
case 16:
|
| 1229 |
+
return 95;
|
| 1230 |
+
case 17:
|
| 1231 |
+
this.popState();
|
| 1232 |
+
break;
|
| 1233 |
+
case 18:
|
| 1234 |
+
return 96;
|
| 1235 |
+
case 19:
|
| 1236 |
+
return "MD_STR";
|
| 1237 |
+
case 20:
|
| 1238 |
+
this.popState();
|
| 1239 |
+
break;
|
| 1240 |
+
case 21:
|
| 1241 |
+
this.begin("md_string");
|
| 1242 |
+
break;
|
| 1243 |
+
case 22:
|
| 1244 |
+
return "STR";
|
| 1245 |
+
case 23:
|
| 1246 |
+
this.popState();
|
| 1247 |
+
break;
|
| 1248 |
+
case 24:
|
| 1249 |
+
this.pushState("string");
|
| 1250 |
+
break;
|
| 1251 |
+
case 25:
|
| 1252 |
+
return 84;
|
| 1253 |
+
case 26:
|
| 1254 |
+
return 102;
|
| 1255 |
+
case 27:
|
| 1256 |
+
return 85;
|
| 1257 |
+
case 28:
|
| 1258 |
+
return 104;
|
| 1259 |
+
case 29:
|
| 1260 |
+
return 86;
|
| 1261 |
+
case 30:
|
| 1262 |
+
return 87;
|
| 1263 |
+
case 31:
|
| 1264 |
+
return 97;
|
| 1265 |
+
case 32:
|
| 1266 |
+
this.begin("click");
|
| 1267 |
+
break;
|
| 1268 |
+
case 33:
|
| 1269 |
+
this.popState();
|
| 1270 |
+
break;
|
| 1271 |
+
case 34:
|
| 1272 |
+
return 88;
|
| 1273 |
+
case 35:
|
| 1274 |
+
return d.lex.firstGraph() && this.begin("dir"), 12;
|
| 1275 |
+
case 36:
|
| 1276 |
+
return d.lex.firstGraph() && this.begin("dir"), 12;
|
| 1277 |
+
case 37:
|
| 1278 |
+
return d.lex.firstGraph() && this.begin("dir"), 12;
|
| 1279 |
+
case 38:
|
| 1280 |
+
return 27;
|
| 1281 |
+
case 39:
|
| 1282 |
+
return 32;
|
| 1283 |
+
case 40:
|
| 1284 |
+
return 98;
|
| 1285 |
+
case 41:
|
| 1286 |
+
return 98;
|
| 1287 |
+
case 42:
|
| 1288 |
+
return 98;
|
| 1289 |
+
case 43:
|
| 1290 |
+
return 98;
|
| 1291 |
+
case 44:
|
| 1292 |
+
return this.popState(), 13;
|
| 1293 |
+
case 45:
|
| 1294 |
+
return this.popState(), 14;
|
| 1295 |
+
case 46:
|
| 1296 |
+
return this.popState(), 14;
|
| 1297 |
+
case 47:
|
| 1298 |
+
return this.popState(), 14;
|
| 1299 |
+
case 48:
|
| 1300 |
+
return this.popState(), 14;
|
| 1301 |
+
case 49:
|
| 1302 |
+
return this.popState(), 14;
|
| 1303 |
+
case 50:
|
| 1304 |
+
return this.popState(), 14;
|
| 1305 |
+
case 51:
|
| 1306 |
+
return this.popState(), 14;
|
| 1307 |
+
case 52:
|
| 1308 |
+
return this.popState(), 14;
|
| 1309 |
+
case 53:
|
| 1310 |
+
return this.popState(), 14;
|
| 1311 |
+
case 54:
|
| 1312 |
+
return this.popState(), 14;
|
| 1313 |
+
case 55:
|
| 1314 |
+
return 121;
|
| 1315 |
+
case 56:
|
| 1316 |
+
return 122;
|
| 1317 |
+
case 57:
|
| 1318 |
+
return 123;
|
| 1319 |
+
case 58:
|
| 1320 |
+
return 124;
|
| 1321 |
+
case 59:
|
| 1322 |
+
return 78;
|
| 1323 |
+
case 60:
|
| 1324 |
+
return 105;
|
| 1325 |
+
case 61:
|
| 1326 |
+
return 111;
|
| 1327 |
+
case 62:
|
| 1328 |
+
return 46;
|
| 1329 |
+
case 63:
|
| 1330 |
+
return 60;
|
| 1331 |
+
case 64:
|
| 1332 |
+
return 44;
|
| 1333 |
+
case 65:
|
| 1334 |
+
return 8;
|
| 1335 |
+
case 66:
|
| 1336 |
+
return 106;
|
| 1337 |
+
case 67:
|
| 1338 |
+
return 115;
|
| 1339 |
+
case 68:
|
| 1340 |
+
return this.popState(), 77;
|
| 1341 |
+
case 69:
|
| 1342 |
+
return this.pushState("edgeText"), 75;
|
| 1343 |
+
case 70:
|
| 1344 |
+
return 119;
|
| 1345 |
+
case 71:
|
| 1346 |
+
return this.popState(), 77;
|
| 1347 |
+
case 72:
|
| 1348 |
+
return this.pushState("thickEdgeText"), 75;
|
| 1349 |
+
case 73:
|
| 1350 |
+
return 119;
|
| 1351 |
+
case 74:
|
| 1352 |
+
return this.popState(), 77;
|
| 1353 |
+
case 75:
|
| 1354 |
+
return this.pushState("dottedEdgeText"), 75;
|
| 1355 |
+
case 76:
|
| 1356 |
+
return 119;
|
| 1357 |
+
case 77:
|
| 1358 |
+
return 77;
|
| 1359 |
+
case 78:
|
| 1360 |
+
return this.popState(), 53;
|
| 1361 |
+
case 79:
|
| 1362 |
+
return "TEXT";
|
| 1363 |
+
case 80:
|
| 1364 |
+
return this.pushState("ellipseText"), 52;
|
| 1365 |
+
case 81:
|
| 1366 |
+
return this.popState(), 55;
|
| 1367 |
+
case 82:
|
| 1368 |
+
return this.pushState("text"), 54;
|
| 1369 |
+
case 83:
|
| 1370 |
+
return this.popState(), 57;
|
| 1371 |
+
case 84:
|
| 1372 |
+
return this.pushState("text"), 56;
|
| 1373 |
+
case 85:
|
| 1374 |
+
return 58;
|
| 1375 |
+
case 86:
|
| 1376 |
+
return this.pushState("text"), 67;
|
| 1377 |
+
case 87:
|
| 1378 |
+
return this.popState(), 64;
|
| 1379 |
+
case 88:
|
| 1380 |
+
return this.pushState("text"), 63;
|
| 1381 |
+
case 89:
|
| 1382 |
+
return this.popState(), 49;
|
| 1383 |
+
case 90:
|
| 1384 |
+
return this.pushState("text"), 48;
|
| 1385 |
+
case 91:
|
| 1386 |
+
return this.popState(), 69;
|
| 1387 |
+
case 92:
|
| 1388 |
+
return this.popState(), 71;
|
| 1389 |
+
case 93:
|
| 1390 |
+
return 117;
|
| 1391 |
+
case 94:
|
| 1392 |
+
return this.pushState("trapText"), 68;
|
| 1393 |
+
case 95:
|
| 1394 |
+
return this.pushState("trapText"), 70;
|
| 1395 |
+
case 96:
|
| 1396 |
+
return 118;
|
| 1397 |
+
case 97:
|
| 1398 |
+
return 67;
|
| 1399 |
+
case 98:
|
| 1400 |
+
return 90;
|
| 1401 |
+
case 99:
|
| 1402 |
+
return "SEP";
|
| 1403 |
+
case 100:
|
| 1404 |
+
return 89;
|
| 1405 |
+
case 101:
|
| 1406 |
+
return 115;
|
| 1407 |
+
case 102:
|
| 1408 |
+
return 111;
|
| 1409 |
+
case 103:
|
| 1410 |
+
return 44;
|
| 1411 |
+
case 104:
|
| 1412 |
+
return 109;
|
| 1413 |
+
case 105:
|
| 1414 |
+
return 114;
|
| 1415 |
+
case 106:
|
| 1416 |
+
return 116;
|
| 1417 |
+
case 107:
|
| 1418 |
+
return this.popState(), 62;
|
| 1419 |
+
case 108:
|
| 1420 |
+
return this.pushState("text"), 62;
|
| 1421 |
+
case 109:
|
| 1422 |
+
return this.popState(), 51;
|
| 1423 |
+
case 110:
|
| 1424 |
+
return this.pushState("text"), 50;
|
| 1425 |
+
case 111:
|
| 1426 |
+
return this.popState(), 31;
|
| 1427 |
+
case 112:
|
| 1428 |
+
return this.pushState("text"), 29;
|
| 1429 |
+
case 113:
|
| 1430 |
+
return this.popState(), 66;
|
| 1431 |
+
case 114:
|
| 1432 |
+
return this.pushState("text"), 65;
|
| 1433 |
+
case 115:
|
| 1434 |
+
return "TEXT";
|
| 1435 |
+
case 116:
|
| 1436 |
+
return "QUOTE";
|
| 1437 |
+
case 117:
|
| 1438 |
+
return 9;
|
| 1439 |
+
case 118:
|
| 1440 |
+
return 10;
|
| 1441 |
+
case 119:
|
| 1442 |
+
return 11;
|
| 1443 |
+
}
|
| 1444 |
+
}, "anonymous"),
|
| 1445 |
+
rules: [/^(?:accTitle\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*:\s*)/, /^(?:(?!\n||)*[^\n]*)/, /^(?:accDescr\s*\{\s*)/, /^(?:[\}])/, /^(?:[^\}]*)/, /^(?:@\{)/, /^(?:["])/, /^(?:["])/, /^(?:[^\"]+)/, /^(?:[^}^"]+)/, /^(?:\})/, /^(?:call[\s]+)/, /^(?:\([\s]*\))/, /^(?:\()/, /^(?:[^(]*)/, /^(?:\))/, /^(?:[^)]*)/, /^(?:[^`"]+)/, /^(?:[`]["])/, /^(?:["][`])/, /^(?:[^"]+)/, /^(?:["])/, /^(?:["])/, /^(?:style\b)/, /^(?:default\b)/, /^(?:linkStyle\b)/, /^(?:interpolate\b)/, /^(?:classDef\b)/, /^(?:class\b)/, /^(?:href[\s])/, /^(?:click[\s]+)/, /^(?:[\s\n])/, /^(?:[^\s\n]*)/, /^(?:flowchart-elk\b)/, /^(?:graph\b)/, /^(?:flowchart\b)/, /^(?:subgraph\b)/, /^(?:end\b\s*)/, /^(?:_self\b)/, /^(?:_blank\b)/, /^(?:_parent\b)/, /^(?:_top\b)/, /^(?:(\r?\n)*\s*\n)/, /^(?:\s*LR\b)/, /^(?:\s*RL\b)/, /^(?:\s*TB\b)/, /^(?:\s*BT\b)/, /^(?:\s*TD\b)/, /^(?:\s*BR\b)/, /^(?:\s*<)/, /^(?:\s*>)/, /^(?:\s*\^)/, /^(?:\s*v\b)/, /^(?:.*direction\s+TB[^\n]*)/, /^(?:.*direction\s+BT[^\n]*)/, /^(?:.*direction\s+RL[^\n]*)/, /^(?:.*direction\s+LR[^\n]*)/, /^(?:[^\s\"]+@(?=[^\{\"]))/, /^(?:[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)/, /^(?:$)/],
|
| 1446 |
+
conditions: { shapeDataEndBracket: { rules: [21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, shapeDataStr: { rules: [9, 10, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, shapeData: { rules: [8, 11, 12, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, callbackargs: { rules: [17, 18, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, callbackname: { rules: [14, 15, 16, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, href: { rules: [21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, click: { rules: [21, 24, 33, 34, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, dottedEdgeText: { rules: [21, 24, 74, 76, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, thickEdgeText: { rules: [21, 24, 71, 73, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, edgeText: { rules: [21, 24, 68, 70, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, trapText: { rules: [21, 24, 77, 80, 82, 84, 88, 90, 91, 92, 93, 94, 95, 108, 110, 112, 114], inclusive: !1 }, ellipseText: { rules: [21, 24, 77, 78, 79, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, text: { rules: [21, 24, 77, 80, 81, 82, 83, 84, 87, 88, 89, 90, 94, 95, 107, 108, 109, 110, 111, 112, 113, 114, 115], inclusive: !1 }, vertex: { rules: [21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, dir: { rules: [21, 24, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, acc_descr_multiline: { rules: [5, 6, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, acc_descr: { rules: [3, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, acc_title: { rules: [1, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, md_string: { rules: [19, 20, 21, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, string: { rules: [21, 22, 23, 24, 77, 80, 82, 84, 88, 90, 94, 95, 108, 110, 112, 114], inclusive: !1 }, INITIAL: { rules: [0, 2, 4, 7, 13, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 35, 36, 37, 38, 39, 40, 41, 42, 43, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 74, 75, 77, 80, 82, 84, 85, 86, 88, 90, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 108, 110, 112, 114, 116, 117, 118, 119], inclusive: !0 } }
|
| 1447 |
+
};
|
| 1448 |
+
return g1;
|
| 1449 |
+
}();
|
| 1450 |
+
J1.lexer = Wt;
|
| 1451 |
+
function q1() {
|
| 1452 |
+
this.yy = {};
|
| 1453 |
+
}
|
| 1454 |
+
return m(q1, "Parser"), q1.prototype = J1, J1.Parser = q1, new q1();
|
| 1455 |
+
}();
|
| 1456 |
+
rt.parser = rt;
|
| 1457 |
+
var Mt = rt, Ut = Object.assign({}, Mt);
|
| 1458 |
+
Ut.parse = (s) => {
|
| 1459 |
+
const i = s.replace(/}\s*\n/g, `}
|
| 1460 |
+
`);
|
| 1461 |
+
return Mt.parse(i);
|
| 1462 |
+
};
|
| 1463 |
+
var Ae = Ut, ke = /* @__PURE__ */ m((s, i) => {
|
| 1464 |
+
const a = he, n = a(s, "r"), u = a(s, "g"), o = a(s, "b");
|
| 1465 |
+
return oe(n, u, o, i);
|
| 1466 |
+
}, "fade"), me = /* @__PURE__ */ m((s) => `.label {
|
| 1467 |
+
font-family: ${s.fontFamily};
|
| 1468 |
+
color: ${s.nodeTextColor || s.textColor};
|
| 1469 |
+
}
|
| 1470 |
+
.cluster-label text {
|
| 1471 |
+
fill: ${s.titleColor};
|
| 1472 |
+
}
|
| 1473 |
+
.cluster-label span {
|
| 1474 |
+
color: ${s.titleColor};
|
| 1475 |
+
}
|
| 1476 |
+
.cluster-label span p {
|
| 1477 |
+
background-color: transparent;
|
| 1478 |
+
}
|
| 1479 |
+
|
| 1480 |
+
.label text,span {
|
| 1481 |
+
fill: ${s.nodeTextColor || s.textColor};
|
| 1482 |
+
color: ${s.nodeTextColor || s.textColor};
|
| 1483 |
+
}
|
| 1484 |
+
|
| 1485 |
+
.node rect,
|
| 1486 |
+
.node circle,
|
| 1487 |
+
.node ellipse,
|
| 1488 |
+
.node polygon,
|
| 1489 |
+
.node path {
|
| 1490 |
+
fill: ${s.mainBkg};
|
| 1491 |
+
stroke: ${s.nodeBorder};
|
| 1492 |
+
stroke-width: 1px;
|
| 1493 |
+
}
|
| 1494 |
+
.rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
|
| 1495 |
+
text-anchor: middle;
|
| 1496 |
+
}
|
| 1497 |
+
// .flowchart-label .text-outer-tspan {
|
| 1498 |
+
// text-anchor: middle;
|
| 1499 |
+
// }
|
| 1500 |
+
// .flowchart-label .text-inner-tspan {
|
| 1501 |
+
// text-anchor: start;
|
| 1502 |
+
// }
|
| 1503 |
+
|
| 1504 |
+
.node .katex path {
|
| 1505 |
+
fill: #000;
|
| 1506 |
+
stroke: #000;
|
| 1507 |
+
stroke-width: 1px;
|
| 1508 |
+
}
|
| 1509 |
+
|
| 1510 |
+
.rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
|
| 1511 |
+
text-align: center;
|
| 1512 |
+
}
|
| 1513 |
+
.node.clickable {
|
| 1514 |
+
cursor: pointer;
|
| 1515 |
+
}
|
| 1516 |
+
|
| 1517 |
+
|
| 1518 |
+
.root .anchor path {
|
| 1519 |
+
fill: ${s.lineColor} !important;
|
| 1520 |
+
stroke-width: 0;
|
| 1521 |
+
stroke: ${s.lineColor};
|
| 1522 |
+
}
|
| 1523 |
+
|
| 1524 |
+
.arrowheadPath {
|
| 1525 |
+
fill: ${s.arrowheadColor};
|
| 1526 |
+
}
|
| 1527 |
+
|
| 1528 |
+
.edgePath .path {
|
| 1529 |
+
stroke: ${s.lineColor};
|
| 1530 |
+
stroke-width: 2.0px;
|
| 1531 |
+
}
|
| 1532 |
+
|
| 1533 |
+
.flowchart-link {
|
| 1534 |
+
stroke: ${s.lineColor};
|
| 1535 |
+
fill: none;
|
| 1536 |
+
}
|
| 1537 |
+
|
| 1538 |
+
.edgeLabel {
|
| 1539 |
+
background-color: ${s.edgeLabelBackground};
|
| 1540 |
+
p {
|
| 1541 |
+
background-color: ${s.edgeLabelBackground};
|
| 1542 |
+
}
|
| 1543 |
+
rect {
|
| 1544 |
+
opacity: 0.5;
|
| 1545 |
+
background-color: ${s.edgeLabelBackground};
|
| 1546 |
+
fill: ${s.edgeLabelBackground};
|
| 1547 |
+
}
|
| 1548 |
+
text-align: center;
|
| 1549 |
+
}
|
| 1550 |
+
|
| 1551 |
+
/* For html labels only */
|
| 1552 |
+
.labelBkg {
|
| 1553 |
+
background-color: ${ke(s.edgeLabelBackground, 0.5)};
|
| 1554 |
+
// background-color:
|
| 1555 |
+
}
|
| 1556 |
+
|
| 1557 |
+
.cluster rect {
|
| 1558 |
+
fill: ${s.clusterBkg};
|
| 1559 |
+
stroke: ${s.clusterBorder};
|
| 1560 |
+
stroke-width: 1px;
|
| 1561 |
+
}
|
| 1562 |
+
|
| 1563 |
+
.cluster text {
|
| 1564 |
+
fill: ${s.titleColor};
|
| 1565 |
+
}
|
| 1566 |
+
|
| 1567 |
+
.cluster span {
|
| 1568 |
+
color: ${s.titleColor};
|
| 1569 |
+
}
|
| 1570 |
+
/* .cluster div {
|
| 1571 |
+
color: ${s.titleColor};
|
| 1572 |
+
} */
|
| 1573 |
+
|
| 1574 |
+
div.mermaidTooltip {
|
| 1575 |
+
position: absolute;
|
| 1576 |
+
text-align: center;
|
| 1577 |
+
max-width: 200px;
|
| 1578 |
+
padding: 2px;
|
| 1579 |
+
font-family: ${s.fontFamily};
|
| 1580 |
+
font-size: 12px;
|
| 1581 |
+
background: ${s.tertiaryColor};
|
| 1582 |
+
border: 1px solid ${s.border2};
|
| 1583 |
+
border-radius: 2px;
|
| 1584 |
+
pointer-events: none;
|
| 1585 |
+
z-index: 100;
|
| 1586 |
+
}
|
| 1587 |
+
|
| 1588 |
+
.flowchartTitleText {
|
| 1589 |
+
text-anchor: middle;
|
| 1590 |
+
font-size: 18px;
|
| 1591 |
+
fill: ${s.textColor};
|
| 1592 |
+
}
|
| 1593 |
+
|
| 1594 |
+
rect.text {
|
| 1595 |
+
fill: none;
|
| 1596 |
+
stroke-width: 0;
|
| 1597 |
+
}
|
| 1598 |
+
|
| 1599 |
+
.icon-shape, .image-shape {
|
| 1600 |
+
background-color: ${s.edgeLabelBackground};
|
| 1601 |
+
p {
|
| 1602 |
+
background-color: ${s.edgeLabelBackground};
|
| 1603 |
+
padding: 2px;
|
| 1604 |
+
}
|
| 1605 |
+
rect {
|
| 1606 |
+
opacity: 0.5;
|
| 1607 |
+
background-color: ${s.edgeLabelBackground};
|
| 1608 |
+
fill: ${s.edgeLabelBackground};
|
| 1609 |
+
}
|
| 1610 |
+
text-align: center;
|
| 1611 |
+
}
|
| 1612 |
+
${qt()}
|
| 1613 |
+
`, "getStyles"), Ce = me, Ee = {
|
| 1614 |
+
parser: Ae,
|
| 1615 |
+
get db() {
|
| 1616 |
+
return new pe();
|
| 1617 |
+
},
|
| 1618 |
+
renderer: be,
|
| 1619 |
+
styles: Ce,
|
| 1620 |
+
init: /* @__PURE__ */ m((s) => {
|
| 1621 |
+
s.flowchart || (s.flowchart = {}), s.layout && Ot({ layout: s.layout }), s.flowchart.arrowMarkerAbsolute = s.arrowMarkerAbsolute, Ot({ flowchart: { arrowMarkerAbsolute: s.arrowMarkerAbsolute } });
|
| 1622 |
+
}, "init")
|
| 1623 |
+
};
|
| 1624 |
+
export {
|
| 1625 |
+
Ee as diagram
|
| 1626 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/ganttDiagram-Y4ZJHTSR-54wJrCeT.js
ADDED
|
@@ -0,0 +1,2502 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { aT as $e, aU as Un, aV as Je, aW as Ke, aX as tn, aY as re, aZ as En, _ as d, g as Ln, s as An, q as In, p as Wn, a as Hn, b as On, c as _t, d as Bt, e as Nn, a_ as it, l as Qt, k as Vn, j as zn, y as Pn, u as Rn } from "./mermaid.core-CfPtPiLZ.js";
|
| 2 |
+
import { c as Te, g as be } from "./Index-DiS7y4tI.js";
|
| 3 |
+
import { b as Zn, t as Ie, c as Bn, a as qn, l as Xn } from "./linear-Cldj0_Rh.js";
|
| 4 |
+
import { i as Gn } from "./init-DjUOC4st.js";
|
| 5 |
+
function jn(t, e) {
|
| 6 |
+
let n;
|
| 7 |
+
if (e === void 0)
|
| 8 |
+
for (const r of t)
|
| 9 |
+
r != null && (n < r || n === void 0 && r >= r) && (n = r);
|
| 10 |
+
else {
|
| 11 |
+
let r = -1;
|
| 12 |
+
for (let i of t)
|
| 13 |
+
(i = e(i, ++r, t)) != null && (n < i || n === void 0 && i >= i) && (n = i);
|
| 14 |
+
}
|
| 15 |
+
return n;
|
| 16 |
+
}
|
| 17 |
+
function Qn(t, e) {
|
| 18 |
+
let n;
|
| 19 |
+
if (e === void 0)
|
| 20 |
+
for (const r of t)
|
| 21 |
+
r != null && (n > r || n === void 0 && r >= r) && (n = r);
|
| 22 |
+
else {
|
| 23 |
+
let r = -1;
|
| 24 |
+
for (let i of t)
|
| 25 |
+
(i = e(i, ++r, t)) != null && (n > i || n === void 0 && i >= i) && (n = i);
|
| 26 |
+
}
|
| 27 |
+
return n;
|
| 28 |
+
}
|
| 29 |
+
function $n(t) {
|
| 30 |
+
return t;
|
| 31 |
+
}
|
| 32 |
+
var Xt = 1, ie = 2, me = 3, qt = 4, We = 1e-6;
|
| 33 |
+
function Jn(t) {
|
| 34 |
+
return "translate(" + t + ",0)";
|
| 35 |
+
}
|
| 36 |
+
function Kn(t) {
|
| 37 |
+
return "translate(0," + t + ")";
|
| 38 |
+
}
|
| 39 |
+
function tr(t) {
|
| 40 |
+
return (e) => +t(e);
|
| 41 |
+
}
|
| 42 |
+
function er(t, e) {
|
| 43 |
+
return e = Math.max(0, t.bandwidth() - e * 2) / 2, t.round() && (e = Math.round(e)), (n) => +t(n) + e;
|
| 44 |
+
}
|
| 45 |
+
function nr() {
|
| 46 |
+
return !this.__axis;
|
| 47 |
+
}
|
| 48 |
+
function en(t, e) {
|
| 49 |
+
var n = [], r = null, i = null, a = 6, s = 6, p = 3, M = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, T = t === Xt || t === qt ? -1 : 1, g = t === qt || t === ie ? "x" : "y", U = t === Xt || t === me ? Jn : Kn;
|
| 50 |
+
function C(b) {
|
| 51 |
+
var X = r ?? (e.ticks ? e.ticks.apply(e, n) : e.domain()), H = i ?? (e.tickFormat ? e.tickFormat.apply(e, n) : $n), D = Math.max(a, 0) + p, I = e.range(), V = +I[0] + M, W = +I[I.length - 1] + M, B = (e.bandwidth ? er : tr)(e.copy(), M), Q = b.selection ? b.selection() : b, w = Q.selectAll(".domain").data([null]), O = Q.selectAll(".tick").data(X, e).order(), x = O.exit(), F = O.enter().append("g").attr("class", "tick"), S = O.select("line"), _ = O.select("text");
|
| 52 |
+
w = w.merge(w.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), O = O.merge(F), S = S.merge(F.append("line").attr("stroke", "currentColor").attr(g + "2", T * a)), _ = _.merge(F.append("text").attr("fill", "currentColor").attr(g, T * D).attr("dy", t === Xt ? "0em" : t === me ? "0.71em" : "0.32em")), b !== Q && (w = w.transition(b), O = O.transition(b), S = S.transition(b), _ = _.transition(b), x = x.transition(b).attr("opacity", We).attr("transform", function(k) {
|
| 53 |
+
return isFinite(k = B(k)) ? U(k + M) : this.getAttribute("transform");
|
| 54 |
+
}), F.attr("opacity", We).attr("transform", function(k) {
|
| 55 |
+
var Y = this.parentNode.__axis;
|
| 56 |
+
return U((Y && isFinite(Y = Y(k)) ? Y : B(k)) + M);
|
| 57 |
+
})), x.remove(), w.attr("d", t === qt || t === ie ? s ? "M" + T * s + "," + V + "H" + M + "V" + W + "H" + T * s : "M" + M + "," + V + "V" + W : s ? "M" + V + "," + T * s + "V" + M + "H" + W + "V" + T * s : "M" + V + "," + M + "H" + W), O.attr("opacity", 1).attr("transform", function(k) {
|
| 58 |
+
return U(B(k) + M);
|
| 59 |
+
}), S.attr(g + "2", T * a), _.attr(g, T * D).text(H), Q.filter(nr).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", t === ie ? "start" : t === qt ? "end" : "middle"), Q.each(function() {
|
| 60 |
+
this.__axis = B;
|
| 61 |
+
});
|
| 62 |
+
}
|
| 63 |
+
return C.scale = function(b) {
|
| 64 |
+
return arguments.length ? (e = b, C) : e;
|
| 65 |
+
}, C.ticks = function() {
|
| 66 |
+
return n = Array.from(arguments), C;
|
| 67 |
+
}, C.tickArguments = function(b) {
|
| 68 |
+
return arguments.length ? (n = b == null ? [] : Array.from(b), C) : n.slice();
|
| 69 |
+
}, C.tickValues = function(b) {
|
| 70 |
+
return arguments.length ? (r = b == null ? null : Array.from(b), C) : r && r.slice();
|
| 71 |
+
}, C.tickFormat = function(b) {
|
| 72 |
+
return arguments.length ? (i = b, C) : i;
|
| 73 |
+
}, C.tickSize = function(b) {
|
| 74 |
+
return arguments.length ? (a = s = +b, C) : a;
|
| 75 |
+
}, C.tickSizeInner = function(b) {
|
| 76 |
+
return arguments.length ? (a = +b, C) : a;
|
| 77 |
+
}, C.tickSizeOuter = function(b) {
|
| 78 |
+
return arguments.length ? (s = +b, C) : s;
|
| 79 |
+
}, C.tickPadding = function(b) {
|
| 80 |
+
return arguments.length ? (p = +b, C) : p;
|
| 81 |
+
}, C.offset = function(b) {
|
| 82 |
+
return arguments.length ? (M = +b, C) : M;
|
| 83 |
+
}, C;
|
| 84 |
+
}
|
| 85 |
+
function rr(t) {
|
| 86 |
+
return en(Xt, t);
|
| 87 |
+
}
|
| 88 |
+
function ir(t) {
|
| 89 |
+
return en(me, t);
|
| 90 |
+
}
|
| 91 |
+
const ar = Math.PI / 180, sr = 180 / Math.PI, $t = 18, nn = 0.96422, rn = 1, an = 0.82521, sn = 4 / 29, St = 6 / 29, on = 3 * St * St, or = St * St * St;
|
| 92 |
+
function cn(t) {
|
| 93 |
+
if (t instanceof ft) return new ft(t.l, t.a, t.b, t.opacity);
|
| 94 |
+
if (t instanceof dt) return ln(t);
|
| 95 |
+
t instanceof $e || (t = Un(t));
|
| 96 |
+
var e = ce(t.r), n = ce(t.g), r = ce(t.b), i = ae((0.2225045 * e + 0.7168786 * n + 0.0606169 * r) / rn), a, s;
|
| 97 |
+
return e === n && n === r ? a = s = i : (a = ae((0.4360747 * e + 0.3850649 * n + 0.1430804 * r) / nn), s = ae((0.0139322 * e + 0.0971045 * n + 0.7141733 * r) / an)), new ft(116 * i - 16, 500 * (a - i), 200 * (i - s), t.opacity);
|
| 98 |
+
}
|
| 99 |
+
function cr(t, e, n, r) {
|
| 100 |
+
return arguments.length === 1 ? cn(t) : new ft(t, e, n, r ?? 1);
|
| 101 |
+
}
|
| 102 |
+
function ft(t, e, n, r) {
|
| 103 |
+
this.l = +t, this.a = +e, this.b = +n, this.opacity = +r;
|
| 104 |
+
}
|
| 105 |
+
Je(ft, cr, Ke(tn, {
|
| 106 |
+
brighter(t) {
|
| 107 |
+
return new ft(this.l + $t * (t ?? 1), this.a, this.b, this.opacity);
|
| 108 |
+
},
|
| 109 |
+
darker(t) {
|
| 110 |
+
return new ft(this.l - $t * (t ?? 1), this.a, this.b, this.opacity);
|
| 111 |
+
},
|
| 112 |
+
rgb() {
|
| 113 |
+
var t = (this.l + 16) / 116, e = isNaN(this.a) ? t : t + this.a / 500, n = isNaN(this.b) ? t : t - this.b / 200;
|
| 114 |
+
return e = nn * se(e), t = rn * se(t), n = an * se(n), new $e(
|
| 115 |
+
oe(3.1338561 * e - 1.6168667 * t - 0.4906146 * n),
|
| 116 |
+
oe(-0.9787684 * e + 1.9161415 * t + 0.033454 * n),
|
| 117 |
+
oe(0.0719453 * e - 0.2289914 * t + 1.4052427 * n),
|
| 118 |
+
this.opacity
|
| 119 |
+
);
|
| 120 |
+
}
|
| 121 |
+
}));
|
| 122 |
+
function ae(t) {
|
| 123 |
+
return t > or ? Math.pow(t, 1 / 3) : t / on + sn;
|
| 124 |
+
}
|
| 125 |
+
function se(t) {
|
| 126 |
+
return t > St ? t * t * t : on * (t - sn);
|
| 127 |
+
}
|
| 128 |
+
function oe(t) {
|
| 129 |
+
return 255 * (t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055);
|
| 130 |
+
}
|
| 131 |
+
function ce(t) {
|
| 132 |
+
return (t /= 255) <= 0.04045 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
|
| 133 |
+
}
|
| 134 |
+
function lr(t) {
|
| 135 |
+
if (t instanceof dt) return new dt(t.h, t.c, t.l, t.opacity);
|
| 136 |
+
if (t instanceof ft || (t = cn(t)), t.a === 0 && t.b === 0) return new dt(NaN, 0 < t.l && t.l < 100 ? 0 : NaN, t.l, t.opacity);
|
| 137 |
+
var e = Math.atan2(t.b, t.a) * sr;
|
| 138 |
+
return new dt(e < 0 ? e + 360 : e, Math.sqrt(t.a * t.a + t.b * t.b), t.l, t.opacity);
|
| 139 |
+
}
|
| 140 |
+
function ge(t, e, n, r) {
|
| 141 |
+
return arguments.length === 1 ? lr(t) : new dt(t, e, n, r ?? 1);
|
| 142 |
+
}
|
| 143 |
+
function dt(t, e, n, r) {
|
| 144 |
+
this.h = +t, this.c = +e, this.l = +n, this.opacity = +r;
|
| 145 |
+
}
|
| 146 |
+
function ln(t) {
|
| 147 |
+
if (isNaN(t.h)) return new ft(t.l, 0, 0, t.opacity);
|
| 148 |
+
var e = t.h * ar;
|
| 149 |
+
return new ft(t.l, Math.cos(e) * t.c, Math.sin(e) * t.c, t.opacity);
|
| 150 |
+
}
|
| 151 |
+
Je(dt, ge, Ke(tn, {
|
| 152 |
+
brighter(t) {
|
| 153 |
+
return new dt(this.h, this.c, this.l + $t * (t ?? 1), this.opacity);
|
| 154 |
+
},
|
| 155 |
+
darker(t) {
|
| 156 |
+
return new dt(this.h, this.c, this.l - $t * (t ?? 1), this.opacity);
|
| 157 |
+
},
|
| 158 |
+
rgb() {
|
| 159 |
+
return ln(this).rgb();
|
| 160 |
+
}
|
| 161 |
+
}));
|
| 162 |
+
function ur(t) {
|
| 163 |
+
return function(e, n) {
|
| 164 |
+
var r = t((e = ge(e)).h, (n = ge(n)).h), i = re(e.c, n.c), a = re(e.l, n.l), s = re(e.opacity, n.opacity);
|
| 165 |
+
return function(p) {
|
| 166 |
+
return e.h = r(p), e.c = i(p), e.l = a(p), e.opacity = s(p), e + "";
|
| 167 |
+
};
|
| 168 |
+
};
|
| 169 |
+
}
|
| 170 |
+
const fr = ur(En);
|
| 171 |
+
function hr(t, e) {
|
| 172 |
+
t = t.slice();
|
| 173 |
+
var n = 0, r = t.length - 1, i = t[n], a = t[r], s;
|
| 174 |
+
return a < i && (s = n, n = r, r = s, s = i, i = a, a = s), t[n] = e.floor(i), t[r] = e.ceil(a), t;
|
| 175 |
+
}
|
| 176 |
+
const le = /* @__PURE__ */ new Date(), ue = /* @__PURE__ */ new Date();
|
| 177 |
+
function et(t, e, n, r) {
|
| 178 |
+
function i(a) {
|
| 179 |
+
return t(a = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+a)), a;
|
| 180 |
+
}
|
| 181 |
+
return i.floor = (a) => (t(a = /* @__PURE__ */ new Date(+a)), a), i.ceil = (a) => (t(a = new Date(a - 1)), e(a, 1), t(a), a), i.round = (a) => {
|
| 182 |
+
const s = i(a), p = i.ceil(a);
|
| 183 |
+
return a - s < p - a ? s : p;
|
| 184 |
+
}, i.offset = (a, s) => (e(a = /* @__PURE__ */ new Date(+a), s == null ? 1 : Math.floor(s)), a), i.range = (a, s, p) => {
|
| 185 |
+
const M = [];
|
| 186 |
+
if (a = i.ceil(a), p = p == null ? 1 : Math.floor(p), !(a < s) || !(p > 0)) return M;
|
| 187 |
+
let T;
|
| 188 |
+
do
|
| 189 |
+
M.push(T = /* @__PURE__ */ new Date(+a)), e(a, p), t(a);
|
| 190 |
+
while (T < a && a < s);
|
| 191 |
+
return M;
|
| 192 |
+
}, i.filter = (a) => et((s) => {
|
| 193 |
+
if (s >= s) for (; t(s), !a(s); ) s.setTime(s - 1);
|
| 194 |
+
}, (s, p) => {
|
| 195 |
+
if (s >= s)
|
| 196 |
+
if (p < 0) for (; ++p <= 0; )
|
| 197 |
+
for (; e(s, -1), !a(s); )
|
| 198 |
+
;
|
| 199 |
+
else for (; --p >= 0; )
|
| 200 |
+
for (; e(s, 1), !a(s); )
|
| 201 |
+
;
|
| 202 |
+
}), n && (i.count = (a, s) => (le.setTime(+a), ue.setTime(+s), t(le), t(ue), Math.floor(n(le, ue))), i.every = (a) => (a = Math.floor(a), !isFinite(a) || !(a > 0) ? null : a > 1 ? i.filter(r ? (s) => r(s) % a === 0 : (s) => i.count(0, s) % a === 0) : i)), i;
|
| 203 |
+
}
|
| 204 |
+
const Yt = et(() => {
|
| 205 |
+
}, (t, e) => {
|
| 206 |
+
t.setTime(+t + e);
|
| 207 |
+
}, (t, e) => e - t);
|
| 208 |
+
Yt.every = (t) => (t = Math.floor(t), !isFinite(t) || !(t > 0) ? null : t > 1 ? et((e) => {
|
| 209 |
+
e.setTime(Math.floor(e / t) * t);
|
| 210 |
+
}, (e, n) => {
|
| 211 |
+
e.setTime(+e + n * t);
|
| 212 |
+
}, (e, n) => (n - e) / t) : Yt);
|
| 213 |
+
Yt.range;
|
| 214 |
+
const mt = 1e3, ct = mt * 60, gt = ct * 60, yt = gt * 24, xe = yt * 7, He = yt * 30, fe = yt * 365, vt = et((t) => {
|
| 215 |
+
t.setTime(t - t.getMilliseconds());
|
| 216 |
+
}, (t, e) => {
|
| 217 |
+
t.setTime(+t + e * mt);
|
| 218 |
+
}, (t, e) => (e - t) / mt, (t) => t.getUTCSeconds());
|
| 219 |
+
vt.range;
|
| 220 |
+
const Wt = et((t) => {
|
| 221 |
+
t.setTime(t - t.getMilliseconds() - t.getSeconds() * mt);
|
| 222 |
+
}, (t, e) => {
|
| 223 |
+
t.setTime(+t + e * ct);
|
| 224 |
+
}, (t, e) => (e - t) / ct, (t) => t.getMinutes());
|
| 225 |
+
Wt.range;
|
| 226 |
+
const dr = et((t) => {
|
| 227 |
+
t.setUTCSeconds(0, 0);
|
| 228 |
+
}, (t, e) => {
|
| 229 |
+
t.setTime(+t + e * ct);
|
| 230 |
+
}, (t, e) => (e - t) / ct, (t) => t.getUTCMinutes());
|
| 231 |
+
dr.range;
|
| 232 |
+
const Ht = et((t) => {
|
| 233 |
+
t.setTime(t - t.getMilliseconds() - t.getSeconds() * mt - t.getMinutes() * ct);
|
| 234 |
+
}, (t, e) => {
|
| 235 |
+
t.setTime(+t + e * gt);
|
| 236 |
+
}, (t, e) => (e - t) / gt, (t) => t.getHours());
|
| 237 |
+
Ht.range;
|
| 238 |
+
const mr = et((t) => {
|
| 239 |
+
t.setUTCMinutes(0, 0, 0);
|
| 240 |
+
}, (t, e) => {
|
| 241 |
+
t.setTime(+t + e * gt);
|
| 242 |
+
}, (t, e) => (e - t) / gt, (t) => t.getUTCHours());
|
| 243 |
+
mr.range;
|
| 244 |
+
const Tt = et(
|
| 245 |
+
(t) => t.setHours(0, 0, 0, 0),
|
| 246 |
+
(t, e) => t.setDate(t.getDate() + e),
|
| 247 |
+
(t, e) => (e - t - (e.getTimezoneOffset() - t.getTimezoneOffset()) * ct) / yt,
|
| 248 |
+
(t) => t.getDate() - 1
|
| 249 |
+
);
|
| 250 |
+
Tt.range;
|
| 251 |
+
const we = et((t) => {
|
| 252 |
+
t.setUTCHours(0, 0, 0, 0);
|
| 253 |
+
}, (t, e) => {
|
| 254 |
+
t.setUTCDate(t.getUTCDate() + e);
|
| 255 |
+
}, (t, e) => (e - t) / yt, (t) => t.getUTCDate() - 1);
|
| 256 |
+
we.range;
|
| 257 |
+
const gr = et((t) => {
|
| 258 |
+
t.setUTCHours(0, 0, 0, 0);
|
| 259 |
+
}, (t, e) => {
|
| 260 |
+
t.setUTCDate(t.getUTCDate() + e);
|
| 261 |
+
}, (t, e) => (e - t) / yt, (t) => Math.floor(t / yt));
|
| 262 |
+
gr.range;
|
| 263 |
+
function wt(t) {
|
| 264 |
+
return et((e) => {
|
| 265 |
+
e.setDate(e.getDate() - (e.getDay() + 7 - t) % 7), e.setHours(0, 0, 0, 0);
|
| 266 |
+
}, (e, n) => {
|
| 267 |
+
e.setDate(e.getDate() + n * 7);
|
| 268 |
+
}, (e, n) => (n - e - (n.getTimezoneOffset() - e.getTimezoneOffset()) * ct) / xe);
|
| 269 |
+
}
|
| 270 |
+
const Vt = wt(0), Ot = wt(1), un = wt(2), fn = wt(3), bt = wt(4), hn = wt(5), dn = wt(6);
|
| 271 |
+
Vt.range;
|
| 272 |
+
Ot.range;
|
| 273 |
+
un.range;
|
| 274 |
+
fn.range;
|
| 275 |
+
bt.range;
|
| 276 |
+
hn.range;
|
| 277 |
+
dn.range;
|
| 278 |
+
function Ct(t) {
|
| 279 |
+
return et((e) => {
|
| 280 |
+
e.setUTCDate(e.getUTCDate() - (e.getUTCDay() + 7 - t) % 7), e.setUTCHours(0, 0, 0, 0);
|
| 281 |
+
}, (e, n) => {
|
| 282 |
+
e.setUTCDate(e.getUTCDate() + n * 7);
|
| 283 |
+
}, (e, n) => (n - e) / xe);
|
| 284 |
+
}
|
| 285 |
+
const mn = Ct(0), Jt = Ct(1), yr = Ct(2), kr = Ct(3), Ut = Ct(4), pr = Ct(5), vr = Ct(6);
|
| 286 |
+
mn.range;
|
| 287 |
+
Jt.range;
|
| 288 |
+
yr.range;
|
| 289 |
+
kr.range;
|
| 290 |
+
Ut.range;
|
| 291 |
+
pr.range;
|
| 292 |
+
vr.range;
|
| 293 |
+
const Nt = et((t) => {
|
| 294 |
+
t.setDate(1), t.setHours(0, 0, 0, 0);
|
| 295 |
+
}, (t, e) => {
|
| 296 |
+
t.setMonth(t.getMonth() + e);
|
| 297 |
+
}, (t, e) => e.getMonth() - t.getMonth() + (e.getFullYear() - t.getFullYear()) * 12, (t) => t.getMonth());
|
| 298 |
+
Nt.range;
|
| 299 |
+
const Tr = et((t) => {
|
| 300 |
+
t.setUTCDate(1), t.setUTCHours(0, 0, 0, 0);
|
| 301 |
+
}, (t, e) => {
|
| 302 |
+
t.setUTCMonth(t.getUTCMonth() + e);
|
| 303 |
+
}, (t, e) => e.getUTCMonth() - t.getUTCMonth() + (e.getUTCFullYear() - t.getUTCFullYear()) * 12, (t) => t.getUTCMonth());
|
| 304 |
+
Tr.range;
|
| 305 |
+
const kt = et((t) => {
|
| 306 |
+
t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
|
| 307 |
+
}, (t, e) => {
|
| 308 |
+
t.setFullYear(t.getFullYear() + e);
|
| 309 |
+
}, (t, e) => e.getFullYear() - t.getFullYear(), (t) => t.getFullYear());
|
| 310 |
+
kt.every = (t) => !isFinite(t = Math.floor(t)) || !(t > 0) ? null : et((e) => {
|
| 311 |
+
e.setFullYear(Math.floor(e.getFullYear() / t) * t), e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
|
| 312 |
+
}, (e, n) => {
|
| 313 |
+
e.setFullYear(e.getFullYear() + n * t);
|
| 314 |
+
});
|
| 315 |
+
kt.range;
|
| 316 |
+
const xt = et((t) => {
|
| 317 |
+
t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
|
| 318 |
+
}, (t, e) => {
|
| 319 |
+
t.setUTCFullYear(t.getUTCFullYear() + e);
|
| 320 |
+
}, (t, e) => e.getUTCFullYear() - t.getUTCFullYear(), (t) => t.getUTCFullYear());
|
| 321 |
+
xt.every = (t) => !isFinite(t = Math.floor(t)) || !(t > 0) ? null : et((e) => {
|
| 322 |
+
e.setUTCFullYear(Math.floor(e.getUTCFullYear() / t) * t), e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
|
| 323 |
+
}, (e, n) => {
|
| 324 |
+
e.setUTCFullYear(e.getUTCFullYear() + n * t);
|
| 325 |
+
});
|
| 326 |
+
xt.range;
|
| 327 |
+
function br(t, e, n, r, i, a) {
|
| 328 |
+
const s = [
|
| 329 |
+
[vt, 1, mt],
|
| 330 |
+
[vt, 5, 5 * mt],
|
| 331 |
+
[vt, 15, 15 * mt],
|
| 332 |
+
[vt, 30, 30 * mt],
|
| 333 |
+
[a, 1, ct],
|
| 334 |
+
[a, 5, 5 * ct],
|
| 335 |
+
[a, 15, 15 * ct],
|
| 336 |
+
[a, 30, 30 * ct],
|
| 337 |
+
[i, 1, gt],
|
| 338 |
+
[i, 3, 3 * gt],
|
| 339 |
+
[i, 6, 6 * gt],
|
| 340 |
+
[i, 12, 12 * gt],
|
| 341 |
+
[r, 1, yt],
|
| 342 |
+
[r, 2, 2 * yt],
|
| 343 |
+
[n, 1, xe],
|
| 344 |
+
[e, 1, He],
|
| 345 |
+
[e, 3, 3 * He],
|
| 346 |
+
[t, 1, fe]
|
| 347 |
+
];
|
| 348 |
+
function p(T, g, U) {
|
| 349 |
+
const C = g < T;
|
| 350 |
+
C && ([T, g] = [g, T]);
|
| 351 |
+
const b = U && typeof U.range == "function" ? U : M(T, g, U), X = b ? b.range(T, +g + 1) : [];
|
| 352 |
+
return C ? X.reverse() : X;
|
| 353 |
+
}
|
| 354 |
+
function M(T, g, U) {
|
| 355 |
+
const C = Math.abs(g - T) / U, b = Zn(([, , D]) => D).right(s, C);
|
| 356 |
+
if (b === s.length) return t.every(Ie(T / fe, g / fe, U));
|
| 357 |
+
if (b === 0) return Yt.every(Math.max(Ie(T, g, U), 1));
|
| 358 |
+
const [X, H] = s[C / s[b - 1][2] < s[b][2] / C ? b - 1 : b];
|
| 359 |
+
return X.every(H);
|
| 360 |
+
}
|
| 361 |
+
return [p, M];
|
| 362 |
+
}
|
| 363 |
+
const [xr, wr] = br(kt, Nt, Vt, Tt, Ht, Wt);
|
| 364 |
+
function he(t) {
|
| 365 |
+
if (0 <= t.y && t.y < 100) {
|
| 366 |
+
var e = new Date(-1, t.m, t.d, t.H, t.M, t.S, t.L);
|
| 367 |
+
return e.setFullYear(t.y), e;
|
| 368 |
+
}
|
| 369 |
+
return new Date(t.y, t.m, t.d, t.H, t.M, t.S, t.L);
|
| 370 |
+
}
|
| 371 |
+
function de(t) {
|
| 372 |
+
if (0 <= t.y && t.y < 100) {
|
| 373 |
+
var e = new Date(Date.UTC(-1, t.m, t.d, t.H, t.M, t.S, t.L));
|
| 374 |
+
return e.setUTCFullYear(t.y), e;
|
| 375 |
+
}
|
| 376 |
+
return new Date(Date.UTC(t.y, t.m, t.d, t.H, t.M, t.S, t.L));
|
| 377 |
+
}
|
| 378 |
+
function Lt(t, e, n) {
|
| 379 |
+
return { y: t, m: e, d: n, H: 0, M: 0, S: 0, L: 0 };
|
| 380 |
+
}
|
| 381 |
+
function Cr(t) {
|
| 382 |
+
var e = t.dateTime, n = t.date, r = t.time, i = t.periods, a = t.days, s = t.shortDays, p = t.months, M = t.shortMonths, T = At(i), g = It(i), U = At(a), C = It(a), b = At(s), X = It(s), H = At(p), D = It(p), I = At(M), V = It(M), W = {
|
| 383 |
+
a: m,
|
| 384 |
+
A: E,
|
| 385 |
+
b: c,
|
| 386 |
+
B: l,
|
| 387 |
+
c: null,
|
| 388 |
+
d: Re,
|
| 389 |
+
e: Re,
|
| 390 |
+
f: Xr,
|
| 391 |
+
g: ri,
|
| 392 |
+
G: ai,
|
| 393 |
+
H: Zr,
|
| 394 |
+
I: Br,
|
| 395 |
+
j: qr,
|
| 396 |
+
L: gn,
|
| 397 |
+
m: Gr,
|
| 398 |
+
M: jr,
|
| 399 |
+
p: o,
|
| 400 |
+
q: R,
|
| 401 |
+
Q: qe,
|
| 402 |
+
s: Xe,
|
| 403 |
+
S: Qr,
|
| 404 |
+
u: $r,
|
| 405 |
+
U: Jr,
|
| 406 |
+
V: Kr,
|
| 407 |
+
w: ti,
|
| 408 |
+
W: ei,
|
| 409 |
+
x: null,
|
| 410 |
+
X: null,
|
| 411 |
+
y: ni,
|
| 412 |
+
Y: ii,
|
| 413 |
+
Z: si,
|
| 414 |
+
"%": Be
|
| 415 |
+
}, B = {
|
| 416 |
+
a: z,
|
| 417 |
+
A: P,
|
| 418 |
+
b: K,
|
| 419 |
+
B: G,
|
| 420 |
+
c: null,
|
| 421 |
+
d: Ze,
|
| 422 |
+
e: Ze,
|
| 423 |
+
f: ui,
|
| 424 |
+
g: Ti,
|
| 425 |
+
G: xi,
|
| 426 |
+
H: oi,
|
| 427 |
+
I: ci,
|
| 428 |
+
j: li,
|
| 429 |
+
L: kn,
|
| 430 |
+
m: fi,
|
| 431 |
+
M: hi,
|
| 432 |
+
p: $,
|
| 433 |
+
q: at,
|
| 434 |
+
Q: qe,
|
| 435 |
+
s: Xe,
|
| 436 |
+
S: di,
|
| 437 |
+
u: mi,
|
| 438 |
+
U: gi,
|
| 439 |
+
V: yi,
|
| 440 |
+
w: ki,
|
| 441 |
+
W: pi,
|
| 442 |
+
x: null,
|
| 443 |
+
X: null,
|
| 444 |
+
y: vi,
|
| 445 |
+
Y: bi,
|
| 446 |
+
Z: wi,
|
| 447 |
+
"%": Be
|
| 448 |
+
}, Q = {
|
| 449 |
+
a: S,
|
| 450 |
+
A: _,
|
| 451 |
+
b: k,
|
| 452 |
+
B: Y,
|
| 453 |
+
c: u,
|
| 454 |
+
d: ze,
|
| 455 |
+
e: ze,
|
| 456 |
+
f: Vr,
|
| 457 |
+
g: Ve,
|
| 458 |
+
G: Ne,
|
| 459 |
+
H: Pe,
|
| 460 |
+
I: Pe,
|
| 461 |
+
j: Wr,
|
| 462 |
+
L: Nr,
|
| 463 |
+
m: Ir,
|
| 464 |
+
M: Hr,
|
| 465 |
+
p: F,
|
| 466 |
+
q: Ar,
|
| 467 |
+
Q: Pr,
|
| 468 |
+
s: Rr,
|
| 469 |
+
S: Or,
|
| 470 |
+
u: Fr,
|
| 471 |
+
U: Yr,
|
| 472 |
+
V: Ur,
|
| 473 |
+
w: Sr,
|
| 474 |
+
W: Er,
|
| 475 |
+
x: h,
|
| 476 |
+
X: y,
|
| 477 |
+
y: Ve,
|
| 478 |
+
Y: Ne,
|
| 479 |
+
Z: Lr,
|
| 480 |
+
"%": zr
|
| 481 |
+
};
|
| 482 |
+
W.x = w(n, W), W.X = w(r, W), W.c = w(e, W), B.x = w(n, B), B.X = w(r, B), B.c = w(e, B);
|
| 483 |
+
function w(v, A) {
|
| 484 |
+
return function(N) {
|
| 485 |
+
var f = [], J = -1, L = 0, j = v.length, q, rt, st;
|
| 486 |
+
for (N instanceof Date || (N = /* @__PURE__ */ new Date(+N)); ++J < j; )
|
| 487 |
+
v.charCodeAt(J) === 37 && (f.push(v.slice(L, J)), (rt = Oe[q = v.charAt(++J)]) != null ? q = v.charAt(++J) : rt = q === "e" ? " " : "0", (st = A[q]) && (q = st(N, rt)), f.push(q), L = J + 1);
|
| 488 |
+
return f.push(v.slice(L, J)), f.join("");
|
| 489 |
+
};
|
| 490 |
+
}
|
| 491 |
+
function O(v, A) {
|
| 492 |
+
return function(N) {
|
| 493 |
+
var f = Lt(1900, void 0, 1), J = x(f, v, N += "", 0), L, j;
|
| 494 |
+
if (J != N.length) return null;
|
| 495 |
+
if ("Q" in f) return new Date(f.Q);
|
| 496 |
+
if ("s" in f) return new Date(f.s * 1e3 + ("L" in f ? f.L : 0));
|
| 497 |
+
if (A && !("Z" in f) && (f.Z = 0), "p" in f && (f.H = f.H % 12 + f.p * 12), f.m === void 0 && (f.m = "q" in f ? f.q : 0), "V" in f) {
|
| 498 |
+
if (f.V < 1 || f.V > 53) return null;
|
| 499 |
+
"w" in f || (f.w = 1), "Z" in f ? (L = de(Lt(f.y, 0, 1)), j = L.getUTCDay(), L = j > 4 || j === 0 ? Jt.ceil(L) : Jt(L), L = we.offset(L, (f.V - 1) * 7), f.y = L.getUTCFullYear(), f.m = L.getUTCMonth(), f.d = L.getUTCDate() + (f.w + 6) % 7) : (L = he(Lt(f.y, 0, 1)), j = L.getDay(), L = j > 4 || j === 0 ? Ot.ceil(L) : Ot(L), L = Tt.offset(L, (f.V - 1) * 7), f.y = L.getFullYear(), f.m = L.getMonth(), f.d = L.getDate() + (f.w + 6) % 7);
|
| 500 |
+
} else ("W" in f || "U" in f) && ("w" in f || (f.w = "u" in f ? f.u % 7 : "W" in f ? 1 : 0), j = "Z" in f ? de(Lt(f.y, 0, 1)).getUTCDay() : he(Lt(f.y, 0, 1)).getDay(), f.m = 0, f.d = "W" in f ? (f.w + 6) % 7 + f.W * 7 - (j + 5) % 7 : f.w + f.U * 7 - (j + 6) % 7);
|
| 501 |
+
return "Z" in f ? (f.H += f.Z / 100 | 0, f.M += f.Z % 100, de(f)) : he(f);
|
| 502 |
+
};
|
| 503 |
+
}
|
| 504 |
+
function x(v, A, N, f) {
|
| 505 |
+
for (var J = 0, L = A.length, j = N.length, q, rt; J < L; ) {
|
| 506 |
+
if (f >= j) return -1;
|
| 507 |
+
if (q = A.charCodeAt(J++), q === 37) {
|
| 508 |
+
if (q = A.charAt(J++), rt = Q[q in Oe ? A.charAt(J++) : q], !rt || (f = rt(v, N, f)) < 0) return -1;
|
| 509 |
+
} else if (q != N.charCodeAt(f++))
|
| 510 |
+
return -1;
|
| 511 |
+
}
|
| 512 |
+
return f;
|
| 513 |
+
}
|
| 514 |
+
function F(v, A, N) {
|
| 515 |
+
var f = T.exec(A.slice(N));
|
| 516 |
+
return f ? (v.p = g.get(f[0].toLowerCase()), N + f[0].length) : -1;
|
| 517 |
+
}
|
| 518 |
+
function S(v, A, N) {
|
| 519 |
+
var f = b.exec(A.slice(N));
|
| 520 |
+
return f ? (v.w = X.get(f[0].toLowerCase()), N + f[0].length) : -1;
|
| 521 |
+
}
|
| 522 |
+
function _(v, A, N) {
|
| 523 |
+
var f = U.exec(A.slice(N));
|
| 524 |
+
return f ? (v.w = C.get(f[0].toLowerCase()), N + f[0].length) : -1;
|
| 525 |
+
}
|
| 526 |
+
function k(v, A, N) {
|
| 527 |
+
var f = I.exec(A.slice(N));
|
| 528 |
+
return f ? (v.m = V.get(f[0].toLowerCase()), N + f[0].length) : -1;
|
| 529 |
+
}
|
| 530 |
+
function Y(v, A, N) {
|
| 531 |
+
var f = H.exec(A.slice(N));
|
| 532 |
+
return f ? (v.m = D.get(f[0].toLowerCase()), N + f[0].length) : -1;
|
| 533 |
+
}
|
| 534 |
+
function u(v, A, N) {
|
| 535 |
+
return x(v, e, A, N);
|
| 536 |
+
}
|
| 537 |
+
function h(v, A, N) {
|
| 538 |
+
return x(v, n, A, N);
|
| 539 |
+
}
|
| 540 |
+
function y(v, A, N) {
|
| 541 |
+
return x(v, r, A, N);
|
| 542 |
+
}
|
| 543 |
+
function m(v) {
|
| 544 |
+
return s[v.getDay()];
|
| 545 |
+
}
|
| 546 |
+
function E(v) {
|
| 547 |
+
return a[v.getDay()];
|
| 548 |
+
}
|
| 549 |
+
function c(v) {
|
| 550 |
+
return M[v.getMonth()];
|
| 551 |
+
}
|
| 552 |
+
function l(v) {
|
| 553 |
+
return p[v.getMonth()];
|
| 554 |
+
}
|
| 555 |
+
function o(v) {
|
| 556 |
+
return i[+(v.getHours() >= 12)];
|
| 557 |
+
}
|
| 558 |
+
function R(v) {
|
| 559 |
+
return 1 + ~~(v.getMonth() / 3);
|
| 560 |
+
}
|
| 561 |
+
function z(v) {
|
| 562 |
+
return s[v.getUTCDay()];
|
| 563 |
+
}
|
| 564 |
+
function P(v) {
|
| 565 |
+
return a[v.getUTCDay()];
|
| 566 |
+
}
|
| 567 |
+
function K(v) {
|
| 568 |
+
return M[v.getUTCMonth()];
|
| 569 |
+
}
|
| 570 |
+
function G(v) {
|
| 571 |
+
return p[v.getUTCMonth()];
|
| 572 |
+
}
|
| 573 |
+
function $(v) {
|
| 574 |
+
return i[+(v.getUTCHours() >= 12)];
|
| 575 |
+
}
|
| 576 |
+
function at(v) {
|
| 577 |
+
return 1 + ~~(v.getUTCMonth() / 3);
|
| 578 |
+
}
|
| 579 |
+
return {
|
| 580 |
+
format: function(v) {
|
| 581 |
+
var A = w(v += "", W);
|
| 582 |
+
return A.toString = function() {
|
| 583 |
+
return v;
|
| 584 |
+
}, A;
|
| 585 |
+
},
|
| 586 |
+
parse: function(v) {
|
| 587 |
+
var A = O(v += "", !1);
|
| 588 |
+
return A.toString = function() {
|
| 589 |
+
return v;
|
| 590 |
+
}, A;
|
| 591 |
+
},
|
| 592 |
+
utcFormat: function(v) {
|
| 593 |
+
var A = w(v += "", B);
|
| 594 |
+
return A.toString = function() {
|
| 595 |
+
return v;
|
| 596 |
+
}, A;
|
| 597 |
+
},
|
| 598 |
+
utcParse: function(v) {
|
| 599 |
+
var A = O(v += "", !0);
|
| 600 |
+
return A.toString = function() {
|
| 601 |
+
return v;
|
| 602 |
+
}, A;
|
| 603 |
+
}
|
| 604 |
+
};
|
| 605 |
+
}
|
| 606 |
+
var Oe = { "-": "", _: " ", 0: "0" }, nt = /^\s*\d+/, Dr = /^%/, Mr = /[\\^$*+?|[\]().{}]/g;
|
| 607 |
+
function Z(t, e, n) {
|
| 608 |
+
var r = t < 0 ? "-" : "", i = (r ? -t : t) + "", a = i.length;
|
| 609 |
+
return r + (a < n ? new Array(n - a + 1).join(e) + i : i);
|
| 610 |
+
}
|
| 611 |
+
function _r(t) {
|
| 612 |
+
return t.replace(Mr, "\\$&");
|
| 613 |
+
}
|
| 614 |
+
function At(t) {
|
| 615 |
+
return new RegExp("^(?:" + t.map(_r).join("|") + ")", "i");
|
| 616 |
+
}
|
| 617 |
+
function It(t) {
|
| 618 |
+
return new Map(t.map((e, n) => [e.toLowerCase(), n]));
|
| 619 |
+
}
|
| 620 |
+
function Sr(t, e, n) {
|
| 621 |
+
var r = nt.exec(e.slice(n, n + 1));
|
| 622 |
+
return r ? (t.w = +r[0], n + r[0].length) : -1;
|
| 623 |
+
}
|
| 624 |
+
function Fr(t, e, n) {
|
| 625 |
+
var r = nt.exec(e.slice(n, n + 1));
|
| 626 |
+
return r ? (t.u = +r[0], n + r[0].length) : -1;
|
| 627 |
+
}
|
| 628 |
+
function Yr(t, e, n) {
|
| 629 |
+
var r = nt.exec(e.slice(n, n + 2));
|
| 630 |
+
return r ? (t.U = +r[0], n + r[0].length) : -1;
|
| 631 |
+
}
|
| 632 |
+
function Ur(t, e, n) {
|
| 633 |
+
var r = nt.exec(e.slice(n, n + 2));
|
| 634 |
+
return r ? (t.V = +r[0], n + r[0].length) : -1;
|
| 635 |
+
}
|
| 636 |
+
function Er(t, e, n) {
|
| 637 |
+
var r = nt.exec(e.slice(n, n + 2));
|
| 638 |
+
return r ? (t.W = +r[0], n + r[0].length) : -1;
|
| 639 |
+
}
|
| 640 |
+
function Ne(t, e, n) {
|
| 641 |
+
var r = nt.exec(e.slice(n, n + 4));
|
| 642 |
+
return r ? (t.y = +r[0], n + r[0].length) : -1;
|
| 643 |
+
}
|
| 644 |
+
function Ve(t, e, n) {
|
| 645 |
+
var r = nt.exec(e.slice(n, n + 2));
|
| 646 |
+
return r ? (t.y = +r[0] + (+r[0] > 68 ? 1900 : 2e3), n + r[0].length) : -1;
|
| 647 |
+
}
|
| 648 |
+
function Lr(t, e, n) {
|
| 649 |
+
var r = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n, n + 6));
|
| 650 |
+
return r ? (t.Z = r[1] ? 0 : -(r[2] + (r[3] || "00")), n + r[0].length) : -1;
|
| 651 |
+
}
|
| 652 |
+
function Ar(t, e, n) {
|
| 653 |
+
var r = nt.exec(e.slice(n, n + 1));
|
| 654 |
+
return r ? (t.q = r[0] * 3 - 3, n + r[0].length) : -1;
|
| 655 |
+
}
|
| 656 |
+
function Ir(t, e, n) {
|
| 657 |
+
var r = nt.exec(e.slice(n, n + 2));
|
| 658 |
+
return r ? (t.m = r[0] - 1, n + r[0].length) : -1;
|
| 659 |
+
}
|
| 660 |
+
function ze(t, e, n) {
|
| 661 |
+
var r = nt.exec(e.slice(n, n + 2));
|
| 662 |
+
return r ? (t.d = +r[0], n + r[0].length) : -1;
|
| 663 |
+
}
|
| 664 |
+
function Wr(t, e, n) {
|
| 665 |
+
var r = nt.exec(e.slice(n, n + 3));
|
| 666 |
+
return r ? (t.m = 0, t.d = +r[0], n + r[0].length) : -1;
|
| 667 |
+
}
|
| 668 |
+
function Pe(t, e, n) {
|
| 669 |
+
var r = nt.exec(e.slice(n, n + 2));
|
| 670 |
+
return r ? (t.H = +r[0], n + r[0].length) : -1;
|
| 671 |
+
}
|
| 672 |
+
function Hr(t, e, n) {
|
| 673 |
+
var r = nt.exec(e.slice(n, n + 2));
|
| 674 |
+
return r ? (t.M = +r[0], n + r[0].length) : -1;
|
| 675 |
+
}
|
| 676 |
+
function Or(t, e, n) {
|
| 677 |
+
var r = nt.exec(e.slice(n, n + 2));
|
| 678 |
+
return r ? (t.S = +r[0], n + r[0].length) : -1;
|
| 679 |
+
}
|
| 680 |
+
function Nr(t, e, n) {
|
| 681 |
+
var r = nt.exec(e.slice(n, n + 3));
|
| 682 |
+
return r ? (t.L = +r[0], n + r[0].length) : -1;
|
| 683 |
+
}
|
| 684 |
+
function Vr(t, e, n) {
|
| 685 |
+
var r = nt.exec(e.slice(n, n + 6));
|
| 686 |
+
return r ? (t.L = Math.floor(r[0] / 1e3), n + r[0].length) : -1;
|
| 687 |
+
}
|
| 688 |
+
function zr(t, e, n) {
|
| 689 |
+
var r = Dr.exec(e.slice(n, n + 1));
|
| 690 |
+
return r ? n + r[0].length : -1;
|
| 691 |
+
}
|
| 692 |
+
function Pr(t, e, n) {
|
| 693 |
+
var r = nt.exec(e.slice(n));
|
| 694 |
+
return r ? (t.Q = +r[0], n + r[0].length) : -1;
|
| 695 |
+
}
|
| 696 |
+
function Rr(t, e, n) {
|
| 697 |
+
var r = nt.exec(e.slice(n));
|
| 698 |
+
return r ? (t.s = +r[0], n + r[0].length) : -1;
|
| 699 |
+
}
|
| 700 |
+
function Re(t, e) {
|
| 701 |
+
return Z(t.getDate(), e, 2);
|
| 702 |
+
}
|
| 703 |
+
function Zr(t, e) {
|
| 704 |
+
return Z(t.getHours(), e, 2);
|
| 705 |
+
}
|
| 706 |
+
function Br(t, e) {
|
| 707 |
+
return Z(t.getHours() % 12 || 12, e, 2);
|
| 708 |
+
}
|
| 709 |
+
function qr(t, e) {
|
| 710 |
+
return Z(1 + Tt.count(kt(t), t), e, 3);
|
| 711 |
+
}
|
| 712 |
+
function gn(t, e) {
|
| 713 |
+
return Z(t.getMilliseconds(), e, 3);
|
| 714 |
+
}
|
| 715 |
+
function Xr(t, e) {
|
| 716 |
+
return gn(t, e) + "000";
|
| 717 |
+
}
|
| 718 |
+
function Gr(t, e) {
|
| 719 |
+
return Z(t.getMonth() + 1, e, 2);
|
| 720 |
+
}
|
| 721 |
+
function jr(t, e) {
|
| 722 |
+
return Z(t.getMinutes(), e, 2);
|
| 723 |
+
}
|
| 724 |
+
function Qr(t, e) {
|
| 725 |
+
return Z(t.getSeconds(), e, 2);
|
| 726 |
+
}
|
| 727 |
+
function $r(t) {
|
| 728 |
+
var e = t.getDay();
|
| 729 |
+
return e === 0 ? 7 : e;
|
| 730 |
+
}
|
| 731 |
+
function Jr(t, e) {
|
| 732 |
+
return Z(Vt.count(kt(t) - 1, t), e, 2);
|
| 733 |
+
}
|
| 734 |
+
function yn(t) {
|
| 735 |
+
var e = t.getDay();
|
| 736 |
+
return e >= 4 || e === 0 ? bt(t) : bt.ceil(t);
|
| 737 |
+
}
|
| 738 |
+
function Kr(t, e) {
|
| 739 |
+
return t = yn(t), Z(bt.count(kt(t), t) + (kt(t).getDay() === 4), e, 2);
|
| 740 |
+
}
|
| 741 |
+
function ti(t) {
|
| 742 |
+
return t.getDay();
|
| 743 |
+
}
|
| 744 |
+
function ei(t, e) {
|
| 745 |
+
return Z(Ot.count(kt(t) - 1, t), e, 2);
|
| 746 |
+
}
|
| 747 |
+
function ni(t, e) {
|
| 748 |
+
return Z(t.getFullYear() % 100, e, 2);
|
| 749 |
+
}
|
| 750 |
+
function ri(t, e) {
|
| 751 |
+
return t = yn(t), Z(t.getFullYear() % 100, e, 2);
|
| 752 |
+
}
|
| 753 |
+
function ii(t, e) {
|
| 754 |
+
return Z(t.getFullYear() % 1e4, e, 4);
|
| 755 |
+
}
|
| 756 |
+
function ai(t, e) {
|
| 757 |
+
var n = t.getDay();
|
| 758 |
+
return t = n >= 4 || n === 0 ? bt(t) : bt.ceil(t), Z(t.getFullYear() % 1e4, e, 4);
|
| 759 |
+
}
|
| 760 |
+
function si(t) {
|
| 761 |
+
var e = t.getTimezoneOffset();
|
| 762 |
+
return (e > 0 ? "-" : (e *= -1, "+")) + Z(e / 60 | 0, "0", 2) + Z(e % 60, "0", 2);
|
| 763 |
+
}
|
| 764 |
+
function Ze(t, e) {
|
| 765 |
+
return Z(t.getUTCDate(), e, 2);
|
| 766 |
+
}
|
| 767 |
+
function oi(t, e) {
|
| 768 |
+
return Z(t.getUTCHours(), e, 2);
|
| 769 |
+
}
|
| 770 |
+
function ci(t, e) {
|
| 771 |
+
return Z(t.getUTCHours() % 12 || 12, e, 2);
|
| 772 |
+
}
|
| 773 |
+
function li(t, e) {
|
| 774 |
+
return Z(1 + we.count(xt(t), t), e, 3);
|
| 775 |
+
}
|
| 776 |
+
function kn(t, e) {
|
| 777 |
+
return Z(t.getUTCMilliseconds(), e, 3);
|
| 778 |
+
}
|
| 779 |
+
function ui(t, e) {
|
| 780 |
+
return kn(t, e) + "000";
|
| 781 |
+
}
|
| 782 |
+
function fi(t, e) {
|
| 783 |
+
return Z(t.getUTCMonth() + 1, e, 2);
|
| 784 |
+
}
|
| 785 |
+
function hi(t, e) {
|
| 786 |
+
return Z(t.getUTCMinutes(), e, 2);
|
| 787 |
+
}
|
| 788 |
+
function di(t, e) {
|
| 789 |
+
return Z(t.getUTCSeconds(), e, 2);
|
| 790 |
+
}
|
| 791 |
+
function mi(t) {
|
| 792 |
+
var e = t.getUTCDay();
|
| 793 |
+
return e === 0 ? 7 : e;
|
| 794 |
+
}
|
| 795 |
+
function gi(t, e) {
|
| 796 |
+
return Z(mn.count(xt(t) - 1, t), e, 2);
|
| 797 |
+
}
|
| 798 |
+
function pn(t) {
|
| 799 |
+
var e = t.getUTCDay();
|
| 800 |
+
return e >= 4 || e === 0 ? Ut(t) : Ut.ceil(t);
|
| 801 |
+
}
|
| 802 |
+
function yi(t, e) {
|
| 803 |
+
return t = pn(t), Z(Ut.count(xt(t), t) + (xt(t).getUTCDay() === 4), e, 2);
|
| 804 |
+
}
|
| 805 |
+
function ki(t) {
|
| 806 |
+
return t.getUTCDay();
|
| 807 |
+
}
|
| 808 |
+
function pi(t, e) {
|
| 809 |
+
return Z(Jt.count(xt(t) - 1, t), e, 2);
|
| 810 |
+
}
|
| 811 |
+
function vi(t, e) {
|
| 812 |
+
return Z(t.getUTCFullYear() % 100, e, 2);
|
| 813 |
+
}
|
| 814 |
+
function Ti(t, e) {
|
| 815 |
+
return t = pn(t), Z(t.getUTCFullYear() % 100, e, 2);
|
| 816 |
+
}
|
| 817 |
+
function bi(t, e) {
|
| 818 |
+
return Z(t.getUTCFullYear() % 1e4, e, 4);
|
| 819 |
+
}
|
| 820 |
+
function xi(t, e) {
|
| 821 |
+
var n = t.getUTCDay();
|
| 822 |
+
return t = n >= 4 || n === 0 ? Ut(t) : Ut.ceil(t), Z(t.getUTCFullYear() % 1e4, e, 4);
|
| 823 |
+
}
|
| 824 |
+
function wi() {
|
| 825 |
+
return "+0000";
|
| 826 |
+
}
|
| 827 |
+
function Be() {
|
| 828 |
+
return "%";
|
| 829 |
+
}
|
| 830 |
+
function qe(t) {
|
| 831 |
+
return +t;
|
| 832 |
+
}
|
| 833 |
+
function Xe(t) {
|
| 834 |
+
return Math.floor(+t / 1e3);
|
| 835 |
+
}
|
| 836 |
+
var Mt, Kt;
|
| 837 |
+
Ci({
|
| 838 |
+
dateTime: "%x, %X",
|
| 839 |
+
date: "%-m/%-d/%Y",
|
| 840 |
+
time: "%-I:%M:%S %p",
|
| 841 |
+
periods: ["AM", "PM"],
|
| 842 |
+
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
| 843 |
+
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
| 844 |
+
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
| 845 |
+
shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
|
| 846 |
+
});
|
| 847 |
+
function Ci(t) {
|
| 848 |
+
return Mt = Cr(t), Kt = Mt.format, Mt.parse, Mt.utcFormat, Mt.utcParse, Mt;
|
| 849 |
+
}
|
| 850 |
+
function Di(t) {
|
| 851 |
+
return new Date(t);
|
| 852 |
+
}
|
| 853 |
+
function Mi(t) {
|
| 854 |
+
return t instanceof Date ? +t : +/* @__PURE__ */ new Date(+t);
|
| 855 |
+
}
|
| 856 |
+
function vn(t, e, n, r, i, a, s, p, M, T) {
|
| 857 |
+
var g = Bn(), U = g.invert, C = g.domain, b = T(".%L"), X = T(":%S"), H = T("%I:%M"), D = T("%I %p"), I = T("%a %d"), V = T("%b %d"), W = T("%B"), B = T("%Y");
|
| 858 |
+
function Q(w) {
|
| 859 |
+
return (M(w) < w ? b : p(w) < w ? X : s(w) < w ? H : a(w) < w ? D : r(w) < w ? i(w) < w ? I : V : n(w) < w ? W : B)(w);
|
| 860 |
+
}
|
| 861 |
+
return g.invert = function(w) {
|
| 862 |
+
return new Date(U(w));
|
| 863 |
+
}, g.domain = function(w) {
|
| 864 |
+
return arguments.length ? C(Array.from(w, Mi)) : C().map(Di);
|
| 865 |
+
}, g.ticks = function(w) {
|
| 866 |
+
var O = C();
|
| 867 |
+
return t(O[0], O[O.length - 1], w ?? 10);
|
| 868 |
+
}, g.tickFormat = function(w, O) {
|
| 869 |
+
return O == null ? Q : T(O);
|
| 870 |
+
}, g.nice = function(w) {
|
| 871 |
+
var O = C();
|
| 872 |
+
return (!w || typeof w.range != "function") && (w = e(O[0], O[O.length - 1], w ?? 10)), w ? C(hr(O, w)) : g;
|
| 873 |
+
}, g.copy = function() {
|
| 874 |
+
return qn(g, vn(t, e, n, r, i, a, s, p, M, T));
|
| 875 |
+
}, g;
|
| 876 |
+
}
|
| 877 |
+
function _i() {
|
| 878 |
+
return Gn.apply(vn(xr, wr, kt, Nt, Vt, Tt, Ht, Wt, vt, Kt).domain([new Date(2e3, 0, 1), new Date(2e3, 0, 2)]), arguments);
|
| 879 |
+
}
|
| 880 |
+
var Tn = { exports: {} };
|
| 881 |
+
(function(t, e) {
|
| 882 |
+
(function(n, r) {
|
| 883 |
+
t.exports = r();
|
| 884 |
+
})(Te, function() {
|
| 885 |
+
var n = "day";
|
| 886 |
+
return function(r, i, a) {
|
| 887 |
+
var s = function(T) {
|
| 888 |
+
return T.add(4 - T.isoWeekday(), n);
|
| 889 |
+
}, p = i.prototype;
|
| 890 |
+
p.isoWeekYear = function() {
|
| 891 |
+
return s(this).year();
|
| 892 |
+
}, p.isoWeek = function(T) {
|
| 893 |
+
if (!this.$utils().u(T)) return this.add(7 * (T - this.isoWeek()), n);
|
| 894 |
+
var g, U, C, b, X = s(this), H = (g = this.isoWeekYear(), U = this.$u, C = (U ? a.utc : a)().year(g).startOf("year"), b = 4 - C.isoWeekday(), C.isoWeekday() > 4 && (b += 7), C.add(b, n));
|
| 895 |
+
return X.diff(H, "week") + 1;
|
| 896 |
+
}, p.isoWeekday = function(T) {
|
| 897 |
+
return this.$utils().u(T) ? this.day() || 7 : this.day(this.day() % 7 ? T : T - 7);
|
| 898 |
+
};
|
| 899 |
+
var M = p.startOf;
|
| 900 |
+
p.startOf = function(T, g) {
|
| 901 |
+
var U = this.$utils(), C = !!U.u(g) || g;
|
| 902 |
+
return U.p(T) === "isoweek" ? C ? this.date(this.date() - (this.isoWeekday() - 1)).startOf("day") : this.date(this.date() - 1 - (this.isoWeekday() - 1) + 7).endOf("day") : M.bind(this)(T, g);
|
| 903 |
+
};
|
| 904 |
+
};
|
| 905 |
+
});
|
| 906 |
+
})(Tn);
|
| 907 |
+
var Si = Tn.exports;
|
| 908 |
+
const Fi = /* @__PURE__ */ be(Si);
|
| 909 |
+
var bn = { exports: {} };
|
| 910 |
+
(function(t, e) {
|
| 911 |
+
(function(n, r) {
|
| 912 |
+
t.exports = r();
|
| 913 |
+
})(Te, function() {
|
| 914 |
+
var n = { 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" }, r = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, i = /\d/, a = /\d\d/, s = /\d\d?/, p = /\d*[^-_:/,()\s\d]+/, M = {}, T = function(D) {
|
| 915 |
+
return (D = +D) + (D > 68 ? 1900 : 2e3);
|
| 916 |
+
}, g = function(D) {
|
| 917 |
+
return function(I) {
|
| 918 |
+
this[D] = +I;
|
| 919 |
+
};
|
| 920 |
+
}, U = [/[+-]\d\d:?(\d\d)?|Z/, function(D) {
|
| 921 |
+
(this.zone || (this.zone = {})).offset = function(I) {
|
| 922 |
+
if (!I || I === "Z") return 0;
|
| 923 |
+
var V = I.match(/([+-]|\d\d)/g), W = 60 * V[1] + (+V[2] || 0);
|
| 924 |
+
return W === 0 ? 0 : V[0] === "+" ? -W : W;
|
| 925 |
+
}(D);
|
| 926 |
+
}], C = function(D) {
|
| 927 |
+
var I = M[D];
|
| 928 |
+
return I && (I.indexOf ? I : I.s.concat(I.f));
|
| 929 |
+
}, b = function(D, I) {
|
| 930 |
+
var V, W = M.meridiem;
|
| 931 |
+
if (W) {
|
| 932 |
+
for (var B = 1; B <= 24; B += 1) if (D.indexOf(W(B, 0, I)) > -1) {
|
| 933 |
+
V = B > 12;
|
| 934 |
+
break;
|
| 935 |
+
}
|
| 936 |
+
} else V = D === (I ? "pm" : "PM");
|
| 937 |
+
return V;
|
| 938 |
+
}, X = { A: [p, function(D) {
|
| 939 |
+
this.afternoon = b(D, !1);
|
| 940 |
+
}], a: [p, function(D) {
|
| 941 |
+
this.afternoon = b(D, !0);
|
| 942 |
+
}], Q: [i, function(D) {
|
| 943 |
+
this.month = 3 * (D - 1) + 1;
|
| 944 |
+
}], S: [i, function(D) {
|
| 945 |
+
this.milliseconds = 100 * +D;
|
| 946 |
+
}], SS: [a, function(D) {
|
| 947 |
+
this.milliseconds = 10 * +D;
|
| 948 |
+
}], SSS: [/\d{3}/, function(D) {
|
| 949 |
+
this.milliseconds = +D;
|
| 950 |
+
}], s: [s, g("seconds")], ss: [s, g("seconds")], m: [s, g("minutes")], mm: [s, g("minutes")], H: [s, g("hours")], h: [s, g("hours")], HH: [s, g("hours")], hh: [s, g("hours")], D: [s, g("day")], DD: [a, g("day")], Do: [p, function(D) {
|
| 951 |
+
var I = M.ordinal, V = D.match(/\d+/);
|
| 952 |
+
if (this.day = V[0], I) for (var W = 1; W <= 31; W += 1) I(W).replace(/\[|\]/g, "") === D && (this.day = W);
|
| 953 |
+
}], w: [s, g("week")], ww: [a, g("week")], M: [s, g("month")], MM: [a, g("month")], MMM: [p, function(D) {
|
| 954 |
+
var I = C("months"), V = (C("monthsShort") || I.map(function(W) {
|
| 955 |
+
return W.slice(0, 3);
|
| 956 |
+
})).indexOf(D) + 1;
|
| 957 |
+
if (V < 1) throw new Error();
|
| 958 |
+
this.month = V % 12 || V;
|
| 959 |
+
}], MMMM: [p, function(D) {
|
| 960 |
+
var I = C("months").indexOf(D) + 1;
|
| 961 |
+
if (I < 1) throw new Error();
|
| 962 |
+
this.month = I % 12 || I;
|
| 963 |
+
}], Y: [/[+-]?\d+/, g("year")], YY: [a, function(D) {
|
| 964 |
+
this.year = T(D);
|
| 965 |
+
}], YYYY: [/\d{4}/, g("year")], Z: U, ZZ: U };
|
| 966 |
+
function H(D) {
|
| 967 |
+
var I, V;
|
| 968 |
+
I = D, V = M && M.formats;
|
| 969 |
+
for (var W = (D = I.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(S, _, k) {
|
| 970 |
+
var Y = k && k.toUpperCase();
|
| 971 |
+
return _ || V[k] || n[k] || V[Y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(u, h, y) {
|
| 972 |
+
return h || y.slice(1);
|
| 973 |
+
});
|
| 974 |
+
})).match(r), B = W.length, Q = 0; Q < B; Q += 1) {
|
| 975 |
+
var w = W[Q], O = X[w], x = O && O[0], F = O && O[1];
|
| 976 |
+
W[Q] = F ? { regex: x, parser: F } : w.replace(/^\[|\]$/g, "");
|
| 977 |
+
}
|
| 978 |
+
return function(S) {
|
| 979 |
+
for (var _ = {}, k = 0, Y = 0; k < B; k += 1) {
|
| 980 |
+
var u = W[k];
|
| 981 |
+
if (typeof u == "string") Y += u.length;
|
| 982 |
+
else {
|
| 983 |
+
var h = u.regex, y = u.parser, m = S.slice(Y), E = h.exec(m)[0];
|
| 984 |
+
y.call(_, E), S = S.replace(E, "");
|
| 985 |
+
}
|
| 986 |
+
}
|
| 987 |
+
return function(c) {
|
| 988 |
+
var l = c.afternoon;
|
| 989 |
+
if (l !== void 0) {
|
| 990 |
+
var o = c.hours;
|
| 991 |
+
l ? o < 12 && (c.hours += 12) : o === 12 && (c.hours = 0), delete c.afternoon;
|
| 992 |
+
}
|
| 993 |
+
}(_), _;
|
| 994 |
+
};
|
| 995 |
+
}
|
| 996 |
+
return function(D, I, V) {
|
| 997 |
+
V.p.customParseFormat = !0, D && D.parseTwoDigitYear && (T = D.parseTwoDigitYear);
|
| 998 |
+
var W = I.prototype, B = W.parse;
|
| 999 |
+
W.parse = function(Q) {
|
| 1000 |
+
var w = Q.date, O = Q.utc, x = Q.args;
|
| 1001 |
+
this.$u = O;
|
| 1002 |
+
var F = x[1];
|
| 1003 |
+
if (typeof F == "string") {
|
| 1004 |
+
var S = x[2] === !0, _ = x[3] === !0, k = S || _, Y = x[2];
|
| 1005 |
+
_ && (Y = x[2]), M = this.$locale(), !S && Y && (M = V.Ls[Y]), this.$d = function(m, E, c, l) {
|
| 1006 |
+
try {
|
| 1007 |
+
if (["x", "X"].indexOf(E) > -1) return new Date((E === "X" ? 1e3 : 1) * m);
|
| 1008 |
+
var o = H(E)(m), R = o.year, z = o.month, P = o.day, K = o.hours, G = o.minutes, $ = o.seconds, at = o.milliseconds, v = o.zone, A = o.week, N = /* @__PURE__ */ new Date(), f = P || (R || z ? 1 : N.getDate()), J = R || N.getFullYear(), L = 0;
|
| 1009 |
+
R && !z || (L = z > 0 ? z - 1 : N.getMonth());
|
| 1010 |
+
var j, q = K || 0, rt = G || 0, st = $ || 0, pt = at || 0;
|
| 1011 |
+
return v ? new Date(Date.UTC(J, L, f, q, rt, st, pt + 60 * v.offset * 1e3)) : c ? new Date(Date.UTC(J, L, f, q, rt, st, pt)) : (j = new Date(J, L, f, q, rt, st, pt), A && (j = l(j).week(A).toDate()), j);
|
| 1012 |
+
} catch {
|
| 1013 |
+
return /* @__PURE__ */ new Date("");
|
| 1014 |
+
}
|
| 1015 |
+
}(w, F, O, V), this.init(), Y && Y !== !0 && (this.$L = this.locale(Y).$L), k && w != this.format(F) && (this.$d = /* @__PURE__ */ new Date("")), M = {};
|
| 1016 |
+
} else if (F instanceof Array) for (var u = F.length, h = 1; h <= u; h += 1) {
|
| 1017 |
+
x[1] = F[h - 1];
|
| 1018 |
+
var y = V.apply(this, x);
|
| 1019 |
+
if (y.isValid()) {
|
| 1020 |
+
this.$d = y.$d, this.$L = y.$L, this.init();
|
| 1021 |
+
break;
|
| 1022 |
+
}
|
| 1023 |
+
h === u && (this.$d = /* @__PURE__ */ new Date(""));
|
| 1024 |
+
}
|
| 1025 |
+
else B.call(this, Q);
|
| 1026 |
+
};
|
| 1027 |
+
};
|
| 1028 |
+
});
|
| 1029 |
+
})(bn);
|
| 1030 |
+
var Yi = bn.exports;
|
| 1031 |
+
const Ui = /* @__PURE__ */ be(Yi);
|
| 1032 |
+
var xn = { exports: {} };
|
| 1033 |
+
(function(t, e) {
|
| 1034 |
+
(function(n, r) {
|
| 1035 |
+
t.exports = r();
|
| 1036 |
+
})(Te, function() {
|
| 1037 |
+
return function(n, r) {
|
| 1038 |
+
var i = r.prototype, a = i.format;
|
| 1039 |
+
i.format = function(s) {
|
| 1040 |
+
var p = this, M = this.$locale();
|
| 1041 |
+
if (!this.isValid()) return a.bind(this)(s);
|
| 1042 |
+
var T = this.$utils(), g = (s || "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(U) {
|
| 1043 |
+
switch (U) {
|
| 1044 |
+
case "Q":
|
| 1045 |
+
return Math.ceil((p.$M + 1) / 3);
|
| 1046 |
+
case "Do":
|
| 1047 |
+
return M.ordinal(p.$D);
|
| 1048 |
+
case "gggg":
|
| 1049 |
+
return p.weekYear();
|
| 1050 |
+
case "GGGG":
|
| 1051 |
+
return p.isoWeekYear();
|
| 1052 |
+
case "wo":
|
| 1053 |
+
return M.ordinal(p.week(), "W");
|
| 1054 |
+
case "w":
|
| 1055 |
+
case "ww":
|
| 1056 |
+
return T.s(p.week(), U === "w" ? 1 : 2, "0");
|
| 1057 |
+
case "W":
|
| 1058 |
+
case "WW":
|
| 1059 |
+
return T.s(p.isoWeek(), U === "W" ? 1 : 2, "0");
|
| 1060 |
+
case "k":
|
| 1061 |
+
case "kk":
|
| 1062 |
+
return T.s(String(p.$H === 0 ? 24 : p.$H), U === "k" ? 1 : 2, "0");
|
| 1063 |
+
case "X":
|
| 1064 |
+
return Math.floor(p.$d.getTime() / 1e3);
|
| 1065 |
+
case "x":
|
| 1066 |
+
return p.$d.getTime();
|
| 1067 |
+
case "z":
|
| 1068 |
+
return "[" + p.offsetName() + "]";
|
| 1069 |
+
case "zzz":
|
| 1070 |
+
return "[" + p.offsetName("long") + "]";
|
| 1071 |
+
default:
|
| 1072 |
+
return U;
|
| 1073 |
+
}
|
| 1074 |
+
});
|
| 1075 |
+
return a.bind(this)(g);
|
| 1076 |
+
};
|
| 1077 |
+
};
|
| 1078 |
+
});
|
| 1079 |
+
})(xn);
|
| 1080 |
+
var Ei = xn.exports;
|
| 1081 |
+
const Li = /* @__PURE__ */ be(Ei);
|
| 1082 |
+
var ye = function() {
|
| 1083 |
+
var t = /* @__PURE__ */ d(function(Y, u, h, y) {
|
| 1084 |
+
for (h = h || {}, y = Y.length; y--; h[Y[y]] = u) ;
|
| 1085 |
+
return h;
|
| 1086 |
+
}, "o"), e = [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], r = [1, 27], i = [1, 28], a = [1, 29], s = [1, 30], p = [1, 31], M = [1, 32], T = [1, 33], g = [1, 34], U = [1, 9], C = [1, 10], b = [1, 11], X = [1, 12], H = [1, 13], D = [1, 14], I = [1, 15], V = [1, 16], W = [1, 19], B = [1, 20], Q = [1, 21], w = [1, 22], O = [1, 23], x = [1, 25], F = [1, 35], S = {
|
| 1087 |
+
trace: /* @__PURE__ */ d(function() {
|
| 1088 |
+
}, "trace"),
|
| 1089 |
+
yy: {},
|
| 1090 |
+
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 },
|
| 1091 |
+
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" },
|
| 1092 |
+
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]],
|
| 1093 |
+
performAction: /* @__PURE__ */ d(function(u, h, y, m, E, c, l) {
|
| 1094 |
+
var o = c.length - 1;
|
| 1095 |
+
switch (E) {
|
| 1096 |
+
case 1:
|
| 1097 |
+
return c[o - 1];
|
| 1098 |
+
case 2:
|
| 1099 |
+
this.$ = [];
|
| 1100 |
+
break;
|
| 1101 |
+
case 3:
|
| 1102 |
+
c[o - 1].push(c[o]), this.$ = c[o - 1];
|
| 1103 |
+
break;
|
| 1104 |
+
case 4:
|
| 1105 |
+
case 5:
|
| 1106 |
+
this.$ = c[o];
|
| 1107 |
+
break;
|
| 1108 |
+
case 6:
|
| 1109 |
+
case 7:
|
| 1110 |
+
this.$ = [];
|
| 1111 |
+
break;
|
| 1112 |
+
case 8:
|
| 1113 |
+
m.setWeekday("monday");
|
| 1114 |
+
break;
|
| 1115 |
+
case 9:
|
| 1116 |
+
m.setWeekday("tuesday");
|
| 1117 |
+
break;
|
| 1118 |
+
case 10:
|
| 1119 |
+
m.setWeekday("wednesday");
|
| 1120 |
+
break;
|
| 1121 |
+
case 11:
|
| 1122 |
+
m.setWeekday("thursday");
|
| 1123 |
+
break;
|
| 1124 |
+
case 12:
|
| 1125 |
+
m.setWeekday("friday");
|
| 1126 |
+
break;
|
| 1127 |
+
case 13:
|
| 1128 |
+
m.setWeekday("saturday");
|
| 1129 |
+
break;
|
| 1130 |
+
case 14:
|
| 1131 |
+
m.setWeekday("sunday");
|
| 1132 |
+
break;
|
| 1133 |
+
case 15:
|
| 1134 |
+
m.setWeekend("friday");
|
| 1135 |
+
break;
|
| 1136 |
+
case 16:
|
| 1137 |
+
m.setWeekend("saturday");
|
| 1138 |
+
break;
|
| 1139 |
+
case 17:
|
| 1140 |
+
m.setDateFormat(c[o].substr(11)), this.$ = c[o].substr(11);
|
| 1141 |
+
break;
|
| 1142 |
+
case 18:
|
| 1143 |
+
m.enableInclusiveEndDates(), this.$ = c[o].substr(18);
|
| 1144 |
+
break;
|
| 1145 |
+
case 19:
|
| 1146 |
+
m.TopAxis(), this.$ = c[o].substr(8);
|
| 1147 |
+
break;
|
| 1148 |
+
case 20:
|
| 1149 |
+
m.setAxisFormat(c[o].substr(11)), this.$ = c[o].substr(11);
|
| 1150 |
+
break;
|
| 1151 |
+
case 21:
|
| 1152 |
+
m.setTickInterval(c[o].substr(13)), this.$ = c[o].substr(13);
|
| 1153 |
+
break;
|
| 1154 |
+
case 22:
|
| 1155 |
+
m.setExcludes(c[o].substr(9)), this.$ = c[o].substr(9);
|
| 1156 |
+
break;
|
| 1157 |
+
case 23:
|
| 1158 |
+
m.setIncludes(c[o].substr(9)), this.$ = c[o].substr(9);
|
| 1159 |
+
break;
|
| 1160 |
+
case 24:
|
| 1161 |
+
m.setTodayMarker(c[o].substr(12)), this.$ = c[o].substr(12);
|
| 1162 |
+
break;
|
| 1163 |
+
case 27:
|
| 1164 |
+
m.setDiagramTitle(c[o].substr(6)), this.$ = c[o].substr(6);
|
| 1165 |
+
break;
|
| 1166 |
+
case 28:
|
| 1167 |
+
this.$ = c[o].trim(), m.setAccTitle(this.$);
|
| 1168 |
+
break;
|
| 1169 |
+
case 29:
|
| 1170 |
+
case 30:
|
| 1171 |
+
this.$ = c[o].trim(), m.setAccDescription(this.$);
|
| 1172 |
+
break;
|
| 1173 |
+
case 31:
|
| 1174 |
+
m.addSection(c[o].substr(8)), this.$ = c[o].substr(8);
|
| 1175 |
+
break;
|
| 1176 |
+
case 33:
|
| 1177 |
+
m.addTask(c[o - 1], c[o]), this.$ = "task";
|
| 1178 |
+
break;
|
| 1179 |
+
case 34:
|
| 1180 |
+
this.$ = c[o - 1], m.setClickEvent(c[o - 1], c[o], null);
|
| 1181 |
+
break;
|
| 1182 |
+
case 35:
|
| 1183 |
+
this.$ = c[o - 2], m.setClickEvent(c[o - 2], c[o - 1], c[o]);
|
| 1184 |
+
break;
|
| 1185 |
+
case 36:
|
| 1186 |
+
this.$ = c[o - 2], m.setClickEvent(c[o - 2], c[o - 1], null), m.setLink(c[o - 2], c[o]);
|
| 1187 |
+
break;
|
| 1188 |
+
case 37:
|
| 1189 |
+
this.$ = c[o - 3], m.setClickEvent(c[o - 3], c[o - 2], c[o - 1]), m.setLink(c[o - 3], c[o]);
|
| 1190 |
+
break;
|
| 1191 |
+
case 38:
|
| 1192 |
+
this.$ = c[o - 2], m.setClickEvent(c[o - 2], c[o], null), m.setLink(c[o - 2], c[o - 1]);
|
| 1193 |
+
break;
|
| 1194 |
+
case 39:
|
| 1195 |
+
this.$ = c[o - 3], m.setClickEvent(c[o - 3], c[o - 1], c[o]), m.setLink(c[o - 3], c[o - 2]);
|
| 1196 |
+
break;
|
| 1197 |
+
case 40:
|
| 1198 |
+
this.$ = c[o - 1], m.setLink(c[o - 1], c[o]);
|
| 1199 |
+
break;
|
| 1200 |
+
case 41:
|
| 1201 |
+
case 47:
|
| 1202 |
+
this.$ = c[o - 1] + " " + c[o];
|
| 1203 |
+
break;
|
| 1204 |
+
case 42:
|
| 1205 |
+
case 43:
|
| 1206 |
+
case 45:
|
| 1207 |
+
this.$ = c[o - 2] + " " + c[o - 1] + " " + c[o];
|
| 1208 |
+
break;
|
| 1209 |
+
case 44:
|
| 1210 |
+
case 46:
|
| 1211 |
+
this.$ = c[o - 3] + " " + c[o - 2] + " " + c[o - 1] + " " + c[o];
|
| 1212 |
+
break;
|
| 1213 |
+
}
|
| 1214 |
+
}, "anonymous"),
|
| 1215 |
+
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: 17, 12: n, 13: r, 14: i, 15: a, 16: s, 17: p, 18: M, 19: 18, 20: T, 21: g, 22: U, 23: C, 24: b, 25: X, 26: H, 27: D, 28: I, 29: V, 30: W, 31: B, 33: Q, 35: w, 36: O, 37: 24, 38: x, 40: F }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 36, 11: 17, 12: n, 13: r, 14: i, 15: a, 16: s, 17: p, 18: M, 19: 18, 20: T, 21: g, 22: U, 23: C, 24: b, 25: X, 26: H, 27: D, 28: I, 29: V, 30: W, 31: B, 33: Q, 35: w, 36: O, 37: 24, 38: x, 40: F }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 17]), t(e, [2, 18]), t(e, [2, 19]), t(e, [2, 20]), t(e, [2, 21]), t(e, [2, 22]), t(e, [2, 23]), t(e, [2, 24]), t(e, [2, 25]), t(e, [2, 26]), t(e, [2, 27]), { 32: [1, 37] }, { 34: [1, 38] }, t(e, [2, 30]), t(e, [2, 31]), t(e, [2, 32]), { 39: [1, 39] }, t(e, [2, 8]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 11]), t(e, [2, 12]), t(e, [2, 13]), t(e, [2, 14]), t(e, [2, 15]), t(e, [2, 16]), { 41: [1, 40], 43: [1, 41] }, t(e, [2, 4]), t(e, [2, 28]), t(e, [2, 29]), t(e, [2, 33]), t(e, [2, 34], { 42: [1, 42], 43: [1, 43] }), t(e, [2, 40], { 41: [1, 44] }), t(e, [2, 35], { 43: [1, 45] }), t(e, [2, 36]), t(e, [2, 38], { 42: [1, 46] }), t(e, [2, 37]), t(e, [2, 39])],
|
| 1216 |
+
defaultActions: {},
|
| 1217 |
+
parseError: /* @__PURE__ */ d(function(u, h) {
|
| 1218 |
+
if (h.recoverable)
|
| 1219 |
+
this.trace(u);
|
| 1220 |
+
else {
|
| 1221 |
+
var y = new Error(u);
|
| 1222 |
+
throw y.hash = h, y;
|
| 1223 |
+
}
|
| 1224 |
+
}, "parseError"),
|
| 1225 |
+
parse: /* @__PURE__ */ d(function(u) {
|
| 1226 |
+
var h = this, y = [0], m = [], E = [null], c = [], l = this.table, o = "", R = 0, z = 0, P = 2, K = 1, G = c.slice.call(arguments, 1), $ = Object.create(this.lexer), at = { yy: {} };
|
| 1227 |
+
for (var v in this.yy)
|
| 1228 |
+
Object.prototype.hasOwnProperty.call(this.yy, v) && (at.yy[v] = this.yy[v]);
|
| 1229 |
+
$.setInput(u, at.yy), at.yy.lexer = $, at.yy.parser = this, typeof $.yylloc > "u" && ($.yylloc = {});
|
| 1230 |
+
var A = $.yylloc;
|
| 1231 |
+
c.push(A);
|
| 1232 |
+
var N = $.options && $.options.ranges;
|
| 1233 |
+
typeof at.yy.parseError == "function" ? this.parseError = at.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
| 1234 |
+
function f(ot) {
|
| 1235 |
+
y.length = y.length - 2 * ot, E.length = E.length - ot, c.length = c.length - ot;
|
| 1236 |
+
}
|
| 1237 |
+
d(f, "popStack");
|
| 1238 |
+
function J() {
|
| 1239 |
+
var ot;
|
| 1240 |
+
return ot = m.pop() || $.lex() || K, typeof ot != "number" && (ot instanceof Array && (m = ot, ot = m.pop()), ot = h.symbols_[ot] || ot), ot;
|
| 1241 |
+
}
|
| 1242 |
+
d(J, "lex");
|
| 1243 |
+
for (var L, j, q, rt, st = {}, pt, lt, Ae, Zt; ; ) {
|
| 1244 |
+
if (j = y[y.length - 1], this.defaultActions[j] ? q = this.defaultActions[j] : ((L === null || typeof L > "u") && (L = J()), q = l[j] && l[j][L]), typeof q > "u" || !q.length || !q[0]) {
|
| 1245 |
+
var ne = "";
|
| 1246 |
+
Zt = [];
|
| 1247 |
+
for (pt in l[j])
|
| 1248 |
+
this.terminals_[pt] && pt > P && Zt.push("'" + this.terminals_[pt] + "'");
|
| 1249 |
+
$.showPosition ? ne = "Parse error on line " + (R + 1) + `:
|
| 1250 |
+
` + $.showPosition() + `
|
| 1251 |
+
Expecting ` + Zt.join(", ") + ", got '" + (this.terminals_[L] || L) + "'" : ne = "Parse error on line " + (R + 1) + ": Unexpected " + (L == K ? "end of input" : "'" + (this.terminals_[L] || L) + "'"), this.parseError(ne, {
|
| 1252 |
+
text: $.match,
|
| 1253 |
+
token: this.terminals_[L] || L,
|
| 1254 |
+
line: $.yylineno,
|
| 1255 |
+
loc: A,
|
| 1256 |
+
expected: Zt
|
| 1257 |
+
});
|
| 1258 |
+
}
|
| 1259 |
+
if (q[0] instanceof Array && q.length > 1)
|
| 1260 |
+
throw new Error("Parse Error: multiple actions possible at state: " + j + ", token: " + L);
|
| 1261 |
+
switch (q[0]) {
|
| 1262 |
+
case 1:
|
| 1263 |
+
y.push(L), E.push($.yytext), c.push($.yylloc), y.push(q[1]), L = null, z = $.yyleng, o = $.yytext, R = $.yylineno, A = $.yylloc;
|
| 1264 |
+
break;
|
| 1265 |
+
case 2:
|
| 1266 |
+
if (lt = this.productions_[q[1]][1], st.$ = E[E.length - lt], st._$ = {
|
| 1267 |
+
first_line: c[c.length - (lt || 1)].first_line,
|
| 1268 |
+
last_line: c[c.length - 1].last_line,
|
| 1269 |
+
first_column: c[c.length - (lt || 1)].first_column,
|
| 1270 |
+
last_column: c[c.length - 1].last_column
|
| 1271 |
+
}, N && (st._$.range = [
|
| 1272 |
+
c[c.length - (lt || 1)].range[0],
|
| 1273 |
+
c[c.length - 1].range[1]
|
| 1274 |
+
]), rt = this.performAction.apply(st, [
|
| 1275 |
+
o,
|
| 1276 |
+
z,
|
| 1277 |
+
R,
|
| 1278 |
+
at.yy,
|
| 1279 |
+
q[1],
|
| 1280 |
+
E,
|
| 1281 |
+
c
|
| 1282 |
+
].concat(G)), typeof rt < "u")
|
| 1283 |
+
return rt;
|
| 1284 |
+
lt && (y = y.slice(0, -1 * lt * 2), E = E.slice(0, -1 * lt), c = c.slice(0, -1 * lt)), y.push(this.productions_[q[1]][0]), E.push(st.$), c.push(st._$), Ae = l[y[y.length - 2]][y[y.length - 1]], y.push(Ae);
|
| 1285 |
+
break;
|
| 1286 |
+
case 3:
|
| 1287 |
+
return !0;
|
| 1288 |
+
}
|
| 1289 |
+
}
|
| 1290 |
+
return !0;
|
| 1291 |
+
}, "parse")
|
| 1292 |
+
}, _ = /* @__PURE__ */ function() {
|
| 1293 |
+
var Y = {
|
| 1294 |
+
EOF: 1,
|
| 1295 |
+
parseError: /* @__PURE__ */ d(function(h, y) {
|
| 1296 |
+
if (this.yy.parser)
|
| 1297 |
+
this.yy.parser.parseError(h, y);
|
| 1298 |
+
else
|
| 1299 |
+
throw new Error(h);
|
| 1300 |
+
}, "parseError"),
|
| 1301 |
+
// resets the lexer, sets new input
|
| 1302 |
+
setInput: /* @__PURE__ */ d(function(u, h) {
|
| 1303 |
+
return this.yy = h || this.yy || {}, this._input = u, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
| 1304 |
+
first_line: 1,
|
| 1305 |
+
first_column: 0,
|
| 1306 |
+
last_line: 1,
|
| 1307 |
+
last_column: 0
|
| 1308 |
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
| 1309 |
+
}, "setInput"),
|
| 1310 |
+
// consumes and returns one char from the input
|
| 1311 |
+
input: /* @__PURE__ */ d(function() {
|
| 1312 |
+
var u = this._input[0];
|
| 1313 |
+
this.yytext += u, this.yyleng++, this.offset++, this.match += u, this.matched += u;
|
| 1314 |
+
var h = u.match(/(?:\r\n?|\n).*/g);
|
| 1315 |
+
return h ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), u;
|
| 1316 |
+
}, "input"),
|
| 1317 |
+
// unshifts one char (or a string) into the input
|
| 1318 |
+
unput: /* @__PURE__ */ d(function(u) {
|
| 1319 |
+
var h = u.length, y = u.split(/(?:\r\n?|\n)/g);
|
| 1320 |
+
this._input = u + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - h), this.offset -= h;
|
| 1321 |
+
var m = this.match.split(/(?:\r\n?|\n)/g);
|
| 1322 |
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), y.length - 1 && (this.yylineno -= y.length - 1);
|
| 1323 |
+
var E = this.yylloc.range;
|
| 1324 |
+
return this.yylloc = {
|
| 1325 |
+
first_line: this.yylloc.first_line,
|
| 1326 |
+
last_line: this.yylineno + 1,
|
| 1327 |
+
first_column: this.yylloc.first_column,
|
| 1328 |
+
last_column: y ? (y.length === m.length ? this.yylloc.first_column : 0) + m[m.length - y.length].length - y[0].length : this.yylloc.first_column - h
|
| 1329 |
+
}, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - h]), this.yyleng = this.yytext.length, this;
|
| 1330 |
+
}, "unput"),
|
| 1331 |
+
// When called from action, caches matched text and appends it on next action
|
| 1332 |
+
more: /* @__PURE__ */ d(function() {
|
| 1333 |
+
return this._more = !0, this;
|
| 1334 |
+
}, "more"),
|
| 1335 |
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
| 1336 |
+
reject: /* @__PURE__ */ d(function() {
|
| 1337 |
+
if (this.options.backtrack_lexer)
|
| 1338 |
+
this._backtrack = !0;
|
| 1339 |
+
else
|
| 1340 |
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
| 1341 |
+
` + this.showPosition(), {
|
| 1342 |
+
text: "",
|
| 1343 |
+
token: null,
|
| 1344 |
+
line: this.yylineno
|
| 1345 |
+
});
|
| 1346 |
+
return this;
|
| 1347 |
+
}, "reject"),
|
| 1348 |
+
// retain first n characters of the match
|
| 1349 |
+
less: /* @__PURE__ */ d(function(u) {
|
| 1350 |
+
this.unput(this.match.slice(u));
|
| 1351 |
+
}, "less"),
|
| 1352 |
+
// displays already matched input, i.e. for error messages
|
| 1353 |
+
pastInput: /* @__PURE__ */ d(function() {
|
| 1354 |
+
var u = this.matched.substr(0, this.matched.length - this.match.length);
|
| 1355 |
+
return (u.length > 20 ? "..." : "") + u.substr(-20).replace(/\n/g, "");
|
| 1356 |
+
}, "pastInput"),
|
| 1357 |
+
// displays upcoming input, i.e. for error messages
|
| 1358 |
+
upcomingInput: /* @__PURE__ */ d(function() {
|
| 1359 |
+
var u = this.match;
|
| 1360 |
+
return u.length < 20 && (u += this._input.substr(0, 20 - u.length)), (u.substr(0, 20) + (u.length > 20 ? "..." : "")).replace(/\n/g, "");
|
| 1361 |
+
}, "upcomingInput"),
|
| 1362 |
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
| 1363 |
+
showPosition: /* @__PURE__ */ d(function() {
|
| 1364 |
+
var u = this.pastInput(), h = new Array(u.length + 1).join("-");
|
| 1365 |
+
return u + this.upcomingInput() + `
|
| 1366 |
+
` + h + "^";
|
| 1367 |
+
}, "showPosition"),
|
| 1368 |
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
| 1369 |
+
test_match: /* @__PURE__ */ d(function(u, h) {
|
| 1370 |
+
var y, m, E;
|
| 1371 |
+
if (this.options.backtrack_lexer && (E = {
|
| 1372 |
+
yylineno: this.yylineno,
|
| 1373 |
+
yylloc: {
|
| 1374 |
+
first_line: this.yylloc.first_line,
|
| 1375 |
+
last_line: this.last_line,
|
| 1376 |
+
first_column: this.yylloc.first_column,
|
| 1377 |
+
last_column: this.yylloc.last_column
|
| 1378 |
+
},
|
| 1379 |
+
yytext: this.yytext,
|
| 1380 |
+
match: this.match,
|
| 1381 |
+
matches: this.matches,
|
| 1382 |
+
matched: this.matched,
|
| 1383 |
+
yyleng: this.yyleng,
|
| 1384 |
+
offset: this.offset,
|
| 1385 |
+
_more: this._more,
|
| 1386 |
+
_input: this._input,
|
| 1387 |
+
yy: this.yy,
|
| 1388 |
+
conditionStack: this.conditionStack.slice(0),
|
| 1389 |
+
done: this.done
|
| 1390 |
+
}, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), m = u[0].match(/(?:\r\n?|\n).*/g), m && (this.yylineno += m.length), this.yylloc = {
|
| 1391 |
+
first_line: this.yylloc.last_line,
|
| 1392 |
+
last_line: this.yylineno + 1,
|
| 1393 |
+
first_column: this.yylloc.last_column,
|
| 1394 |
+
last_column: m ? m[m.length - 1].length - m[m.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + u[0].length
|
| 1395 |
+
}, this.yytext += u[0], this.match += u[0], this.matches = u, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(u[0].length), this.matched += u[0], y = this.performAction.call(this, this.yy, this, h, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), y)
|
| 1396 |
+
return y;
|
| 1397 |
+
if (this._backtrack) {
|
| 1398 |
+
for (var c in E)
|
| 1399 |
+
this[c] = E[c];
|
| 1400 |
+
return !1;
|
| 1401 |
+
}
|
| 1402 |
+
return !1;
|
| 1403 |
+
}, "test_match"),
|
| 1404 |
+
// return next match in input
|
| 1405 |
+
next: /* @__PURE__ */ d(function() {
|
| 1406 |
+
if (this.done)
|
| 1407 |
+
return this.EOF;
|
| 1408 |
+
this._input || (this.done = !0);
|
| 1409 |
+
var u, h, y, m;
|
| 1410 |
+
this._more || (this.yytext = "", this.match = "");
|
| 1411 |
+
for (var E = this._currentRules(), c = 0; c < E.length; c++)
|
| 1412 |
+
if (y = this._input.match(this.rules[E[c]]), y && (!h || y[0].length > h[0].length)) {
|
| 1413 |
+
if (h = y, m = c, this.options.backtrack_lexer) {
|
| 1414 |
+
if (u = this.test_match(y, E[c]), u !== !1)
|
| 1415 |
+
return u;
|
| 1416 |
+
if (this._backtrack) {
|
| 1417 |
+
h = !1;
|
| 1418 |
+
continue;
|
| 1419 |
+
} else
|
| 1420 |
+
return !1;
|
| 1421 |
+
} else if (!this.options.flex)
|
| 1422 |
+
break;
|
| 1423 |
+
}
|
| 1424 |
+
return h ? (u = this.test_match(h, E[m]), u !== !1 ? u : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
| 1425 |
+
` + this.showPosition(), {
|
| 1426 |
+
text: "",
|
| 1427 |
+
token: null,
|
| 1428 |
+
line: this.yylineno
|
| 1429 |
+
});
|
| 1430 |
+
}, "next"),
|
| 1431 |
+
// return next match that has a token
|
| 1432 |
+
lex: /* @__PURE__ */ d(function() {
|
| 1433 |
+
var h = this.next();
|
| 1434 |
+
return h || this.lex();
|
| 1435 |
+
}, "lex"),
|
| 1436 |
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
| 1437 |
+
begin: /* @__PURE__ */ d(function(h) {
|
| 1438 |
+
this.conditionStack.push(h);
|
| 1439 |
+
}, "begin"),
|
| 1440 |
+
// pop the previously active lexer condition state off the condition stack
|
| 1441 |
+
popState: /* @__PURE__ */ d(function() {
|
| 1442 |
+
var h = this.conditionStack.length - 1;
|
| 1443 |
+
return h > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
| 1444 |
+
}, "popState"),
|
| 1445 |
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
| 1446 |
+
_currentRules: /* @__PURE__ */ d(function() {
|
| 1447 |
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
| 1448 |
+
}, "_currentRules"),
|
| 1449 |
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
| 1450 |
+
topState: /* @__PURE__ */ d(function(h) {
|
| 1451 |
+
return h = this.conditionStack.length - 1 - Math.abs(h || 0), h >= 0 ? this.conditionStack[h] : "INITIAL";
|
| 1452 |
+
}, "topState"),
|
| 1453 |
+
// alias for begin(condition)
|
| 1454 |
+
pushState: /* @__PURE__ */ d(function(h) {
|
| 1455 |
+
this.begin(h);
|
| 1456 |
+
}, "pushState"),
|
| 1457 |
+
// return the number of states currently on the stack
|
| 1458 |
+
stateStackSize: /* @__PURE__ */ d(function() {
|
| 1459 |
+
return this.conditionStack.length;
|
| 1460 |
+
}, "stateStackSize"),
|
| 1461 |
+
options: { "case-insensitive": !0 },
|
| 1462 |
+
performAction: /* @__PURE__ */ d(function(h, y, m, E) {
|
| 1463 |
+
switch (m) {
|
| 1464 |
+
case 0:
|
| 1465 |
+
return this.begin("open_directive"), "open_directive";
|
| 1466 |
+
case 1:
|
| 1467 |
+
return this.begin("acc_title"), 31;
|
| 1468 |
+
case 2:
|
| 1469 |
+
return this.popState(), "acc_title_value";
|
| 1470 |
+
case 3:
|
| 1471 |
+
return this.begin("acc_descr"), 33;
|
| 1472 |
+
case 4:
|
| 1473 |
+
return this.popState(), "acc_descr_value";
|
| 1474 |
+
case 5:
|
| 1475 |
+
this.begin("acc_descr_multiline");
|
| 1476 |
+
break;
|
| 1477 |
+
case 6:
|
| 1478 |
+
this.popState();
|
| 1479 |
+
break;
|
| 1480 |
+
case 7:
|
| 1481 |
+
return "acc_descr_multiline_value";
|
| 1482 |
+
case 8:
|
| 1483 |
+
break;
|
| 1484 |
+
case 9:
|
| 1485 |
+
break;
|
| 1486 |
+
case 10:
|
| 1487 |
+
break;
|
| 1488 |
+
case 11:
|
| 1489 |
+
return 10;
|
| 1490 |
+
case 12:
|
| 1491 |
+
break;
|
| 1492 |
+
case 13:
|
| 1493 |
+
break;
|
| 1494 |
+
case 14:
|
| 1495 |
+
this.begin("href");
|
| 1496 |
+
break;
|
| 1497 |
+
case 15:
|
| 1498 |
+
this.popState();
|
| 1499 |
+
break;
|
| 1500 |
+
case 16:
|
| 1501 |
+
return 43;
|
| 1502 |
+
case 17:
|
| 1503 |
+
this.begin("callbackname");
|
| 1504 |
+
break;
|
| 1505 |
+
case 18:
|
| 1506 |
+
this.popState();
|
| 1507 |
+
break;
|
| 1508 |
+
case 19:
|
| 1509 |
+
this.popState(), this.begin("callbackargs");
|
| 1510 |
+
break;
|
| 1511 |
+
case 20:
|
| 1512 |
+
return 41;
|
| 1513 |
+
case 21:
|
| 1514 |
+
this.popState();
|
| 1515 |
+
break;
|
| 1516 |
+
case 22:
|
| 1517 |
+
return 42;
|
| 1518 |
+
case 23:
|
| 1519 |
+
this.begin("click");
|
| 1520 |
+
break;
|
| 1521 |
+
case 24:
|
| 1522 |
+
this.popState();
|
| 1523 |
+
break;
|
| 1524 |
+
case 25:
|
| 1525 |
+
return 40;
|
| 1526 |
+
case 26:
|
| 1527 |
+
return 4;
|
| 1528 |
+
case 27:
|
| 1529 |
+
return 22;
|
| 1530 |
+
case 28:
|
| 1531 |
+
return 23;
|
| 1532 |
+
case 29:
|
| 1533 |
+
return 24;
|
| 1534 |
+
case 30:
|
| 1535 |
+
return 25;
|
| 1536 |
+
case 31:
|
| 1537 |
+
return 26;
|
| 1538 |
+
case 32:
|
| 1539 |
+
return 28;
|
| 1540 |
+
case 33:
|
| 1541 |
+
return 27;
|
| 1542 |
+
case 34:
|
| 1543 |
+
return 29;
|
| 1544 |
+
case 35:
|
| 1545 |
+
return 12;
|
| 1546 |
+
case 36:
|
| 1547 |
+
return 13;
|
| 1548 |
+
case 37:
|
| 1549 |
+
return 14;
|
| 1550 |
+
case 38:
|
| 1551 |
+
return 15;
|
| 1552 |
+
case 39:
|
| 1553 |
+
return 16;
|
| 1554 |
+
case 40:
|
| 1555 |
+
return 17;
|
| 1556 |
+
case 41:
|
| 1557 |
+
return 18;
|
| 1558 |
+
case 42:
|
| 1559 |
+
return 20;
|
| 1560 |
+
case 43:
|
| 1561 |
+
return 21;
|
| 1562 |
+
case 44:
|
| 1563 |
+
return "date";
|
| 1564 |
+
case 45:
|
| 1565 |
+
return 30;
|
| 1566 |
+
case 46:
|
| 1567 |
+
return "accDescription";
|
| 1568 |
+
case 47:
|
| 1569 |
+
return 36;
|
| 1570 |
+
case 48:
|
| 1571 |
+
return 38;
|
| 1572 |
+
case 49:
|
| 1573 |
+
return 39;
|
| 1574 |
+
case 50:
|
| 1575 |
+
return ":";
|
| 1576 |
+
case 51:
|
| 1577 |
+
return 6;
|
| 1578 |
+
case 52:
|
| 1579 |
+
return "INVALID";
|
| 1580 |
+
}
|
| 1581 |
+
}, "anonymous"),
|
| 1582 |
+
rules: [/^(?:%%\{)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:%%(?!\{)*[^\n]*)/i, /^(?:[^\}]%%*[^\n]*)/i, /^(?:%%*[^\n]*[\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:%[^\n]*)/i, /^(?:href[\s]+["])/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:call[\s]+)/i, /^(?:\([\s]*\))/i, /^(?:\()/i, /^(?:[^(]*)/i, /^(?:\))/i, /^(?:[^)]*)/i, /^(?:click[\s]+)/i, /^(?:[\s\n])/i, /^(?:[^\s\n]*)/i, /^(?:gantt\b)/i, /^(?:dateFormat\s[^#\n;]+)/i, /^(?:inclusiveEndDates\b)/i, /^(?:topAxis\b)/i, /^(?:axisFormat\s[^#\n;]+)/i, /^(?:tickInterval\s[^#\n;]+)/i, /^(?:includes\s[^#\n;]+)/i, /^(?:excludes\s[^#\n;]+)/i, /^(?:todayMarker\s[^\n;]+)/i, /^(?:weekday\s+monday\b)/i, /^(?:weekday\s+tuesday\b)/i, /^(?:weekday\s+wednesday\b)/i, /^(?:weekday\s+thursday\b)/i, /^(?:weekday\s+friday\b)/i, /^(?:weekday\s+saturday\b)/i, /^(?:weekday\s+sunday\b)/i, /^(?:weekend\s+friday\b)/i, /^(?:weekend\s+saturday\b)/i, /^(?:\d\d\d\d-\d\d-\d\d\b)/i, /^(?:title\s[^\n]+)/i, /^(?:accDescription\s[^#\n;]+)/i, /^(?:section\s[^\n]+)/i, /^(?:[^:\n]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
|
| 1583 |
+
conditions: { acc_descr_multiline: { rules: [6, 7], inclusive: !1 }, acc_descr: { rules: [4], inclusive: !1 }, acc_title: { rules: [2], inclusive: !1 }, callbackargs: { rules: [21, 22], inclusive: !1 }, callbackname: { rules: [18, 19, 20], inclusive: !1 }, href: { rules: [15, 16], inclusive: !1 }, click: { rules: [24, 25], inclusive: !1 }, INITIAL: { rules: [0, 1, 3, 5, 8, 9, 10, 11, 12, 13, 14, 17, 23, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52], inclusive: !0 } }
|
| 1584 |
+
};
|
| 1585 |
+
return Y;
|
| 1586 |
+
}();
|
| 1587 |
+
S.lexer = _;
|
| 1588 |
+
function k() {
|
| 1589 |
+
this.yy = {};
|
| 1590 |
+
}
|
| 1591 |
+
return d(k, "Parser"), k.prototype = S, S.Parser = k, new k();
|
| 1592 |
+
}();
|
| 1593 |
+
ye.parser = ye;
|
| 1594 |
+
var Ai = ye;
|
| 1595 |
+
it.extend(Fi);
|
| 1596 |
+
it.extend(Ui);
|
| 1597 |
+
it.extend(Li);
|
| 1598 |
+
var Ge = { friday: 5, saturday: 6 }, ut = "", Ce = "", De = void 0, Me = "", zt = [], Pt = [], _e = /* @__PURE__ */ new Map(), Se = [], te = [], Et = "", Fe = "", wn = ["active", "done", "crit", "milestone", "vert"], Ye = [], Rt = !1, Ue = !1, Ee = "sunday", ee = "saturday", ke = 0, Ii = /* @__PURE__ */ d(function() {
|
| 1599 |
+
Se = [], te = [], Et = "", Ye = [], Gt = 0, ve = void 0, jt = void 0, tt = [], ut = "", Ce = "", Fe = "", De = void 0, Me = "", zt = [], Pt = [], Rt = !1, Ue = !1, ke = 0, _e = /* @__PURE__ */ new Map(), Pn(), Ee = "sunday", ee = "saturday";
|
| 1600 |
+
}, "clear"), Wi = /* @__PURE__ */ d(function(t) {
|
| 1601 |
+
Ce = t;
|
| 1602 |
+
}, "setAxisFormat"), Hi = /* @__PURE__ */ d(function() {
|
| 1603 |
+
return Ce;
|
| 1604 |
+
}, "getAxisFormat"), Oi = /* @__PURE__ */ d(function(t) {
|
| 1605 |
+
De = t;
|
| 1606 |
+
}, "setTickInterval"), Ni = /* @__PURE__ */ d(function() {
|
| 1607 |
+
return De;
|
| 1608 |
+
}, "getTickInterval"), Vi = /* @__PURE__ */ d(function(t) {
|
| 1609 |
+
Me = t;
|
| 1610 |
+
}, "setTodayMarker"), zi = /* @__PURE__ */ d(function() {
|
| 1611 |
+
return Me;
|
| 1612 |
+
}, "getTodayMarker"), Pi = /* @__PURE__ */ d(function(t) {
|
| 1613 |
+
ut = t;
|
| 1614 |
+
}, "setDateFormat"), Ri = /* @__PURE__ */ d(function() {
|
| 1615 |
+
Rt = !0;
|
| 1616 |
+
}, "enableInclusiveEndDates"), Zi = /* @__PURE__ */ d(function() {
|
| 1617 |
+
return Rt;
|
| 1618 |
+
}, "endDatesAreInclusive"), Bi = /* @__PURE__ */ d(function() {
|
| 1619 |
+
Ue = !0;
|
| 1620 |
+
}, "enableTopAxis"), qi = /* @__PURE__ */ d(function() {
|
| 1621 |
+
return Ue;
|
| 1622 |
+
}, "topAxisEnabled"), Xi = /* @__PURE__ */ d(function(t) {
|
| 1623 |
+
Fe = t;
|
| 1624 |
+
}, "setDisplayMode"), Gi = /* @__PURE__ */ d(function() {
|
| 1625 |
+
return Fe;
|
| 1626 |
+
}, "getDisplayMode"), ji = /* @__PURE__ */ d(function() {
|
| 1627 |
+
return ut;
|
| 1628 |
+
}, "getDateFormat"), Qi = /* @__PURE__ */ d(function(t) {
|
| 1629 |
+
zt = t.toLowerCase().split(/[\s,]+/);
|
| 1630 |
+
}, "setIncludes"), $i = /* @__PURE__ */ d(function() {
|
| 1631 |
+
return zt;
|
| 1632 |
+
}, "getIncludes"), Ji = /* @__PURE__ */ d(function(t) {
|
| 1633 |
+
Pt = t.toLowerCase().split(/[\s,]+/);
|
| 1634 |
+
}, "setExcludes"), Ki = /* @__PURE__ */ d(function() {
|
| 1635 |
+
return Pt;
|
| 1636 |
+
}, "getExcludes"), ta = /* @__PURE__ */ d(function() {
|
| 1637 |
+
return _e;
|
| 1638 |
+
}, "getLinks"), ea = /* @__PURE__ */ d(function(t) {
|
| 1639 |
+
Et = t, Se.push(t);
|
| 1640 |
+
}, "addSection"), na = /* @__PURE__ */ d(function() {
|
| 1641 |
+
return Se;
|
| 1642 |
+
}, "getSections"), ra = /* @__PURE__ */ d(function() {
|
| 1643 |
+
let t = je();
|
| 1644 |
+
const e = 10;
|
| 1645 |
+
let n = 0;
|
| 1646 |
+
for (; !t && n < e; )
|
| 1647 |
+
t = je(), n++;
|
| 1648 |
+
return te = tt, te;
|
| 1649 |
+
}, "getTasks"), Cn = /* @__PURE__ */ d(function(t, e, n, r) {
|
| 1650 |
+
return r.includes(t.format(e.trim())) ? !1 : n.includes("weekends") && (t.isoWeekday() === Ge[ee] || t.isoWeekday() === Ge[ee] + 1) || n.includes(t.format("dddd").toLowerCase()) ? !0 : n.includes(t.format(e.trim()));
|
| 1651 |
+
}, "isInvalidDate"), ia = /* @__PURE__ */ d(function(t) {
|
| 1652 |
+
Ee = t;
|
| 1653 |
+
}, "setWeekday"), aa = /* @__PURE__ */ d(function() {
|
| 1654 |
+
return Ee;
|
| 1655 |
+
}, "getWeekday"), sa = /* @__PURE__ */ d(function(t) {
|
| 1656 |
+
ee = t;
|
| 1657 |
+
}, "setWeekend"), Dn = /* @__PURE__ */ d(function(t, e, n, r) {
|
| 1658 |
+
if (!n.length || t.manualEndTime)
|
| 1659 |
+
return;
|
| 1660 |
+
let i;
|
| 1661 |
+
t.startTime instanceof Date ? i = it(t.startTime) : i = it(t.startTime, e, !0), i = i.add(1, "d");
|
| 1662 |
+
let a;
|
| 1663 |
+
t.endTime instanceof Date ? a = it(t.endTime) : a = it(t.endTime, e, !0);
|
| 1664 |
+
const [s, p] = oa(
|
| 1665 |
+
i,
|
| 1666 |
+
a,
|
| 1667 |
+
e,
|
| 1668 |
+
n,
|
| 1669 |
+
r
|
| 1670 |
+
);
|
| 1671 |
+
t.endTime = s.toDate(), t.renderEndTime = p;
|
| 1672 |
+
}, "checkTaskDates"), oa = /* @__PURE__ */ d(function(t, e, n, r, i) {
|
| 1673 |
+
let a = !1, s = null;
|
| 1674 |
+
for (; t <= e; )
|
| 1675 |
+
a || (s = e.toDate()), a = Cn(t, n, r, i), a && (e = e.add(1, "d")), t = t.add(1, "d");
|
| 1676 |
+
return [e, s];
|
| 1677 |
+
}, "fixTaskDates"), pe = /* @__PURE__ */ d(function(t, e, n) {
|
| 1678 |
+
n = n.trim();
|
| 1679 |
+
const i = /^after\s+(?<ids>[\d\w- ]+)/.exec(n);
|
| 1680 |
+
if (i !== null) {
|
| 1681 |
+
let s = null;
|
| 1682 |
+
for (const M of i.groups.ids.split(" ")) {
|
| 1683 |
+
let T = Dt(M);
|
| 1684 |
+
T !== void 0 && (!s || T.endTime > s.endTime) && (s = T);
|
| 1685 |
+
}
|
| 1686 |
+
if (s)
|
| 1687 |
+
return s.endTime;
|
| 1688 |
+
const p = /* @__PURE__ */ new Date();
|
| 1689 |
+
return p.setHours(0, 0, 0, 0), p;
|
| 1690 |
+
}
|
| 1691 |
+
let a = it(n, e.trim(), !0);
|
| 1692 |
+
if (a.isValid())
|
| 1693 |
+
return a.toDate();
|
| 1694 |
+
{
|
| 1695 |
+
Qt.debug("Invalid date:" + n), Qt.debug("With date format:" + e.trim());
|
| 1696 |
+
const s = new Date(n);
|
| 1697 |
+
if (s === void 0 || isNaN(s.getTime()) || // WebKit browsers can mis-parse invalid dates to be ridiculously
|
| 1698 |
+
// huge numbers, e.g. new Date('202304') gets parsed as January 1, 202304.
|
| 1699 |
+
// This can cause virtually infinite loops while rendering, so for the
|
| 1700 |
+
// purposes of Gantt charts we'll just treat any date beyond 10,000 AD/BC as
|
| 1701 |
+
// invalid.
|
| 1702 |
+
s.getFullYear() < -1e4 || s.getFullYear() > 1e4)
|
| 1703 |
+
throw new Error("Invalid date:" + n);
|
| 1704 |
+
return s;
|
| 1705 |
+
}
|
| 1706 |
+
}, "getStartDate"), Mn = /* @__PURE__ */ d(function(t) {
|
| 1707 |
+
const e = /^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());
|
| 1708 |
+
return e !== null ? [Number.parseFloat(e[1]), e[2]] : [NaN, "ms"];
|
| 1709 |
+
}, "parseDuration"), _n = /* @__PURE__ */ d(function(t, e, n, r = !1) {
|
| 1710 |
+
n = n.trim();
|
| 1711 |
+
const a = /^until\s+(?<ids>[\d\w- ]+)/.exec(n);
|
| 1712 |
+
if (a !== null) {
|
| 1713 |
+
let g = null;
|
| 1714 |
+
for (const C of a.groups.ids.split(" ")) {
|
| 1715 |
+
let b = Dt(C);
|
| 1716 |
+
b !== void 0 && (!g || b.startTime < g.startTime) && (g = b);
|
| 1717 |
+
}
|
| 1718 |
+
if (g)
|
| 1719 |
+
return g.startTime;
|
| 1720 |
+
const U = /* @__PURE__ */ new Date();
|
| 1721 |
+
return U.setHours(0, 0, 0, 0), U;
|
| 1722 |
+
}
|
| 1723 |
+
let s = it(n, e.trim(), !0);
|
| 1724 |
+
if (s.isValid())
|
| 1725 |
+
return r && (s = s.add(1, "d")), s.toDate();
|
| 1726 |
+
let p = it(t);
|
| 1727 |
+
const [M, T] = Mn(n);
|
| 1728 |
+
if (!Number.isNaN(M)) {
|
| 1729 |
+
const g = p.add(M, T);
|
| 1730 |
+
g.isValid() && (p = g);
|
| 1731 |
+
}
|
| 1732 |
+
return p.toDate();
|
| 1733 |
+
}, "getEndDate"), Gt = 0, Ft = /* @__PURE__ */ d(function(t) {
|
| 1734 |
+
return t === void 0 ? (Gt = Gt + 1, "task" + Gt) : t;
|
| 1735 |
+
}, "parseId"), ca = /* @__PURE__ */ d(function(t, e) {
|
| 1736 |
+
let n;
|
| 1737 |
+
e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
|
| 1738 |
+
const r = n.split(","), i = {};
|
| 1739 |
+
Le(r, i, wn);
|
| 1740 |
+
for (let s = 0; s < r.length; s++)
|
| 1741 |
+
r[s] = r[s].trim();
|
| 1742 |
+
let a = "";
|
| 1743 |
+
switch (r.length) {
|
| 1744 |
+
case 1:
|
| 1745 |
+
i.id = Ft(), i.startTime = t.endTime, a = r[0];
|
| 1746 |
+
break;
|
| 1747 |
+
case 2:
|
| 1748 |
+
i.id = Ft(), i.startTime = pe(void 0, ut, r[0]), a = r[1];
|
| 1749 |
+
break;
|
| 1750 |
+
case 3:
|
| 1751 |
+
i.id = Ft(r[0]), i.startTime = pe(void 0, ut, r[1]), a = r[2];
|
| 1752 |
+
break;
|
| 1753 |
+
}
|
| 1754 |
+
return a && (i.endTime = _n(i.startTime, ut, a, Rt), i.manualEndTime = it(a, "YYYY-MM-DD", !0).isValid(), Dn(i, ut, Pt, zt)), i;
|
| 1755 |
+
}, "compileData"), la = /* @__PURE__ */ d(function(t, e) {
|
| 1756 |
+
let n;
|
| 1757 |
+
e.substr(0, 1) === ":" ? n = e.substr(1, e.length) : n = e;
|
| 1758 |
+
const r = n.split(","), i = {};
|
| 1759 |
+
Le(r, i, wn);
|
| 1760 |
+
for (let a = 0; a < r.length; a++)
|
| 1761 |
+
r[a] = r[a].trim();
|
| 1762 |
+
switch (r.length) {
|
| 1763 |
+
case 1:
|
| 1764 |
+
i.id = Ft(), i.startTime = {
|
| 1765 |
+
type: "prevTaskEnd",
|
| 1766 |
+
id: t
|
| 1767 |
+
}, i.endTime = {
|
| 1768 |
+
data: r[0]
|
| 1769 |
+
};
|
| 1770 |
+
break;
|
| 1771 |
+
case 2:
|
| 1772 |
+
i.id = Ft(), i.startTime = {
|
| 1773 |
+
type: "getStartDate",
|
| 1774 |
+
startData: r[0]
|
| 1775 |
+
}, i.endTime = {
|
| 1776 |
+
data: r[1]
|
| 1777 |
+
};
|
| 1778 |
+
break;
|
| 1779 |
+
case 3:
|
| 1780 |
+
i.id = Ft(r[0]), i.startTime = {
|
| 1781 |
+
type: "getStartDate",
|
| 1782 |
+
startData: r[1]
|
| 1783 |
+
}, i.endTime = {
|
| 1784 |
+
data: r[2]
|
| 1785 |
+
};
|
| 1786 |
+
break;
|
| 1787 |
+
}
|
| 1788 |
+
return i;
|
| 1789 |
+
}, "parseData"), ve, jt, tt = [], Sn = {}, ua = /* @__PURE__ */ d(function(t, e) {
|
| 1790 |
+
const n = {
|
| 1791 |
+
section: Et,
|
| 1792 |
+
type: Et,
|
| 1793 |
+
processed: !1,
|
| 1794 |
+
manualEndTime: !1,
|
| 1795 |
+
renderEndTime: null,
|
| 1796 |
+
raw: { data: e },
|
| 1797 |
+
task: t,
|
| 1798 |
+
classes: []
|
| 1799 |
+
}, r = la(jt, e);
|
| 1800 |
+
n.raw.startTime = r.startTime, n.raw.endTime = r.endTime, n.id = r.id, n.prevTaskId = jt, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.vert = r.vert, n.order = ke, ke++;
|
| 1801 |
+
const i = tt.push(n);
|
| 1802 |
+
jt = n.id, Sn[n.id] = i - 1;
|
| 1803 |
+
}, "addTask"), Dt = /* @__PURE__ */ d(function(t) {
|
| 1804 |
+
const e = Sn[t];
|
| 1805 |
+
return tt[e];
|
| 1806 |
+
}, "findTaskById"), fa = /* @__PURE__ */ d(function(t, e) {
|
| 1807 |
+
const n = {
|
| 1808 |
+
section: Et,
|
| 1809 |
+
type: Et,
|
| 1810 |
+
description: t,
|
| 1811 |
+
task: t,
|
| 1812 |
+
classes: []
|
| 1813 |
+
}, r = ca(ve, e);
|
| 1814 |
+
n.startTime = r.startTime, n.endTime = r.endTime, n.id = r.id, n.active = r.active, n.done = r.done, n.crit = r.crit, n.milestone = r.milestone, n.vert = r.vert, ve = n, te.push(n);
|
| 1815 |
+
}, "addTaskOrg"), je = /* @__PURE__ */ d(function() {
|
| 1816 |
+
const t = /* @__PURE__ */ d(function(n) {
|
| 1817 |
+
const r = tt[n];
|
| 1818 |
+
let i = "";
|
| 1819 |
+
switch (tt[n].raw.startTime.type) {
|
| 1820 |
+
case "prevTaskEnd": {
|
| 1821 |
+
const a = Dt(r.prevTaskId);
|
| 1822 |
+
r.startTime = a.endTime;
|
| 1823 |
+
break;
|
| 1824 |
+
}
|
| 1825 |
+
case "getStartDate":
|
| 1826 |
+
i = pe(void 0, ut, tt[n].raw.startTime.startData), i && (tt[n].startTime = i);
|
| 1827 |
+
break;
|
| 1828 |
+
}
|
| 1829 |
+
return tt[n].startTime && (tt[n].endTime = _n(
|
| 1830 |
+
tt[n].startTime,
|
| 1831 |
+
ut,
|
| 1832 |
+
tt[n].raw.endTime.data,
|
| 1833 |
+
Rt
|
| 1834 |
+
), tt[n].endTime && (tt[n].processed = !0, tt[n].manualEndTime = it(
|
| 1835 |
+
tt[n].raw.endTime.data,
|
| 1836 |
+
"YYYY-MM-DD",
|
| 1837 |
+
!0
|
| 1838 |
+
).isValid(), Dn(tt[n], ut, Pt, zt))), tt[n].processed;
|
| 1839 |
+
}, "compileTask");
|
| 1840 |
+
let e = !0;
|
| 1841 |
+
for (const [n, r] of tt.entries())
|
| 1842 |
+
t(n), e = e && r.processed;
|
| 1843 |
+
return e;
|
| 1844 |
+
}, "compileTasks"), ha = /* @__PURE__ */ d(function(t, e) {
|
| 1845 |
+
let n = e;
|
| 1846 |
+
_t().securityLevel !== "loose" && (n = zn(e)), t.split(",").forEach(function(r) {
|
| 1847 |
+
Dt(r) !== void 0 && (Yn(r, () => {
|
| 1848 |
+
window.open(n, "_self");
|
| 1849 |
+
}), _e.set(r, n));
|
| 1850 |
+
}), Fn(t, "clickable");
|
| 1851 |
+
}, "setLink"), Fn = /* @__PURE__ */ d(function(t, e) {
|
| 1852 |
+
t.split(",").forEach(function(n) {
|
| 1853 |
+
let r = Dt(n);
|
| 1854 |
+
r !== void 0 && r.classes.push(e);
|
| 1855 |
+
});
|
| 1856 |
+
}, "setClass"), da = /* @__PURE__ */ d(function(t, e, n) {
|
| 1857 |
+
if (_t().securityLevel !== "loose" || e === void 0)
|
| 1858 |
+
return;
|
| 1859 |
+
let r = [];
|
| 1860 |
+
if (typeof n == "string") {
|
| 1861 |
+
r = n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);
|
| 1862 |
+
for (let a = 0; a < r.length; a++) {
|
| 1863 |
+
let s = r[a].trim();
|
| 1864 |
+
s.startsWith('"') && s.endsWith('"') && (s = s.substr(1, s.length - 2)), r[a] = s;
|
| 1865 |
+
}
|
| 1866 |
+
}
|
| 1867 |
+
r.length === 0 && r.push(t), Dt(t) !== void 0 && Yn(t, () => {
|
| 1868 |
+
Rn.runFunc(e, ...r);
|
| 1869 |
+
});
|
| 1870 |
+
}, "setClickFun"), Yn = /* @__PURE__ */ d(function(t, e) {
|
| 1871 |
+
Ye.push(
|
| 1872 |
+
function() {
|
| 1873 |
+
const n = document.querySelector(`[id="${t}"]`);
|
| 1874 |
+
n !== null && n.addEventListener("click", function() {
|
| 1875 |
+
e();
|
| 1876 |
+
});
|
| 1877 |
+
},
|
| 1878 |
+
function() {
|
| 1879 |
+
const n = document.querySelector(`[id="${t}-text"]`);
|
| 1880 |
+
n !== null && n.addEventListener("click", function() {
|
| 1881 |
+
e();
|
| 1882 |
+
});
|
| 1883 |
+
}
|
| 1884 |
+
);
|
| 1885 |
+
}, "pushFun"), ma = /* @__PURE__ */ d(function(t, e, n) {
|
| 1886 |
+
t.split(",").forEach(function(r) {
|
| 1887 |
+
da(r, e, n);
|
| 1888 |
+
}), Fn(t, "clickable");
|
| 1889 |
+
}, "setClickEvent"), ga = /* @__PURE__ */ d(function(t) {
|
| 1890 |
+
Ye.forEach(function(e) {
|
| 1891 |
+
e(t);
|
| 1892 |
+
});
|
| 1893 |
+
}, "bindFunctions"), ya = {
|
| 1894 |
+
getConfig: /* @__PURE__ */ d(() => _t().gantt, "getConfig"),
|
| 1895 |
+
clear: Ii,
|
| 1896 |
+
setDateFormat: Pi,
|
| 1897 |
+
getDateFormat: ji,
|
| 1898 |
+
enableInclusiveEndDates: Ri,
|
| 1899 |
+
endDatesAreInclusive: Zi,
|
| 1900 |
+
enableTopAxis: Bi,
|
| 1901 |
+
topAxisEnabled: qi,
|
| 1902 |
+
setAxisFormat: Wi,
|
| 1903 |
+
getAxisFormat: Hi,
|
| 1904 |
+
setTickInterval: Oi,
|
| 1905 |
+
getTickInterval: Ni,
|
| 1906 |
+
setTodayMarker: Vi,
|
| 1907 |
+
getTodayMarker: zi,
|
| 1908 |
+
setAccTitle: On,
|
| 1909 |
+
getAccTitle: Hn,
|
| 1910 |
+
setDiagramTitle: Wn,
|
| 1911 |
+
getDiagramTitle: In,
|
| 1912 |
+
setDisplayMode: Xi,
|
| 1913 |
+
getDisplayMode: Gi,
|
| 1914 |
+
setAccDescription: An,
|
| 1915 |
+
getAccDescription: Ln,
|
| 1916 |
+
addSection: ea,
|
| 1917 |
+
getSections: na,
|
| 1918 |
+
getTasks: ra,
|
| 1919 |
+
addTask: ua,
|
| 1920 |
+
findTaskById: Dt,
|
| 1921 |
+
addTaskOrg: fa,
|
| 1922 |
+
setIncludes: Qi,
|
| 1923 |
+
getIncludes: $i,
|
| 1924 |
+
setExcludes: Ji,
|
| 1925 |
+
getExcludes: Ki,
|
| 1926 |
+
setClickEvent: ma,
|
| 1927 |
+
setLink: ha,
|
| 1928 |
+
getLinks: ta,
|
| 1929 |
+
bindFunctions: ga,
|
| 1930 |
+
parseDuration: Mn,
|
| 1931 |
+
isInvalidDate: Cn,
|
| 1932 |
+
setWeekday: ia,
|
| 1933 |
+
getWeekday: aa,
|
| 1934 |
+
setWeekend: sa
|
| 1935 |
+
};
|
| 1936 |
+
function Le(t, e, n) {
|
| 1937 |
+
let r = !0;
|
| 1938 |
+
for (; r; )
|
| 1939 |
+
r = !1, n.forEach(function(i) {
|
| 1940 |
+
const a = "^\\s*" + i + "\\s*$", s = new RegExp(a);
|
| 1941 |
+
t[0].match(s) && (e[i] = !0, t.shift(1), r = !0);
|
| 1942 |
+
});
|
| 1943 |
+
}
|
| 1944 |
+
d(Le, "getTaskTags");
|
| 1945 |
+
var ka = /* @__PURE__ */ d(function() {
|
| 1946 |
+
Qt.debug("Something is calling, setConf, remove the call");
|
| 1947 |
+
}, "setConf"), Qe = {
|
| 1948 |
+
monday: Ot,
|
| 1949 |
+
tuesday: un,
|
| 1950 |
+
wednesday: fn,
|
| 1951 |
+
thursday: bt,
|
| 1952 |
+
friday: hn,
|
| 1953 |
+
saturday: dn,
|
| 1954 |
+
sunday: Vt
|
| 1955 |
+
}, pa = /* @__PURE__ */ d((t, e) => {
|
| 1956 |
+
let n = [...t].map(() => -1 / 0), r = [...t].sort((a, s) => a.startTime - s.startTime || a.order - s.order), i = 0;
|
| 1957 |
+
for (const a of r)
|
| 1958 |
+
for (let s = 0; s < n.length; s++)
|
| 1959 |
+
if (a.startTime >= n[s]) {
|
| 1960 |
+
n[s] = a.endTime, a.order = s + e, s > i && (i = s);
|
| 1961 |
+
break;
|
| 1962 |
+
}
|
| 1963 |
+
return i;
|
| 1964 |
+
}, "getMaxIntersections"), ht, va = /* @__PURE__ */ d(function(t, e, n, r) {
|
| 1965 |
+
const i = _t().gantt, a = _t().securityLevel;
|
| 1966 |
+
let s;
|
| 1967 |
+
a === "sandbox" && (s = Bt("#i" + e));
|
| 1968 |
+
const p = a === "sandbox" ? Bt(s.nodes()[0].contentDocument.body) : Bt("body"), M = a === "sandbox" ? s.nodes()[0].contentDocument : document, T = M.getElementById(e);
|
| 1969 |
+
ht = T.parentElement.offsetWidth, ht === void 0 && (ht = 1200), i.useWidth !== void 0 && (ht = i.useWidth);
|
| 1970 |
+
const g = r.db.getTasks();
|
| 1971 |
+
let U = [];
|
| 1972 |
+
for (const x of g)
|
| 1973 |
+
U.push(x.type);
|
| 1974 |
+
U = O(U);
|
| 1975 |
+
const C = {};
|
| 1976 |
+
let b = 2 * i.topPadding;
|
| 1977 |
+
if (r.db.getDisplayMode() === "compact" || i.displayMode === "compact") {
|
| 1978 |
+
const x = {};
|
| 1979 |
+
for (const S of g)
|
| 1980 |
+
x[S.section] === void 0 ? x[S.section] = [S] : x[S.section].push(S);
|
| 1981 |
+
let F = 0;
|
| 1982 |
+
for (const S of Object.keys(x)) {
|
| 1983 |
+
const _ = pa(x[S], F) + 1;
|
| 1984 |
+
F += _, b += _ * (i.barHeight + i.barGap), C[S] = _;
|
| 1985 |
+
}
|
| 1986 |
+
} else {
|
| 1987 |
+
b += g.length * (i.barHeight + i.barGap);
|
| 1988 |
+
for (const x of U)
|
| 1989 |
+
C[x] = g.filter((F) => F.type === x).length;
|
| 1990 |
+
}
|
| 1991 |
+
T.setAttribute("viewBox", "0 0 " + ht + " " + b);
|
| 1992 |
+
const X = p.select(`[id="${e}"]`), H = _i().domain([
|
| 1993 |
+
Qn(g, function(x) {
|
| 1994 |
+
return x.startTime;
|
| 1995 |
+
}),
|
| 1996 |
+
jn(g, function(x) {
|
| 1997 |
+
return x.endTime;
|
| 1998 |
+
})
|
| 1999 |
+
]).rangeRound([0, ht - i.leftPadding - i.rightPadding]);
|
| 2000 |
+
function D(x, F) {
|
| 2001 |
+
const S = x.startTime, _ = F.startTime;
|
| 2002 |
+
let k = 0;
|
| 2003 |
+
return S > _ ? k = 1 : S < _ && (k = -1), k;
|
| 2004 |
+
}
|
| 2005 |
+
d(D, "taskCompare"), g.sort(D), I(g, ht, b), Nn(X, b, ht, i.useMaxWidth), X.append("text").text(r.db.getDiagramTitle()).attr("x", ht / 2).attr("y", i.titleTopMargin).attr("class", "titleText");
|
| 2006 |
+
function I(x, F, S) {
|
| 2007 |
+
const _ = i.barHeight, k = _ + i.barGap, Y = i.topPadding, u = i.leftPadding, h = Xn().domain([0, U.length]).range(["#00B9FA", "#F95002"]).interpolate(fr);
|
| 2008 |
+
W(
|
| 2009 |
+
k,
|
| 2010 |
+
Y,
|
| 2011 |
+
u,
|
| 2012 |
+
F,
|
| 2013 |
+
S,
|
| 2014 |
+
x,
|
| 2015 |
+
r.db.getExcludes(),
|
| 2016 |
+
r.db.getIncludes()
|
| 2017 |
+
), B(u, Y, F, S), V(x, k, Y, u, _, h, F), Q(k, Y), w(u, Y, F, S);
|
| 2018 |
+
}
|
| 2019 |
+
d(I, "makeGantt");
|
| 2020 |
+
function V(x, F, S, _, k, Y, u) {
|
| 2021 |
+
x.sort((l, o) => l.vert === o.vert ? 0 : l.vert ? 1 : -1);
|
| 2022 |
+
const y = [...new Set(x.map((l) => l.order))].map((l) => x.find((o) => o.order === l));
|
| 2023 |
+
X.append("g").selectAll("rect").data(y).enter().append("rect").attr("x", 0).attr("y", function(l, o) {
|
| 2024 |
+
return o = l.order, o * F + S - 2;
|
| 2025 |
+
}).attr("width", function() {
|
| 2026 |
+
return u - i.rightPadding / 2;
|
| 2027 |
+
}).attr("height", F).attr("class", function(l) {
|
| 2028 |
+
for (const [o, R] of U.entries())
|
| 2029 |
+
if (l.type === R)
|
| 2030 |
+
return "section section" + o % i.numberSectionStyles;
|
| 2031 |
+
return "section section0";
|
| 2032 |
+
}).enter();
|
| 2033 |
+
const m = X.append("g").selectAll("rect").data(x).enter(), E = r.db.getLinks();
|
| 2034 |
+
if (m.append("rect").attr("id", function(l) {
|
| 2035 |
+
return l.id;
|
| 2036 |
+
}).attr("rx", 3).attr("ry", 3).attr("x", function(l) {
|
| 2037 |
+
return l.milestone ? H(l.startTime) + _ + 0.5 * (H(l.endTime) - H(l.startTime)) - 0.5 * k : H(l.startTime) + _;
|
| 2038 |
+
}).attr("y", function(l, o) {
|
| 2039 |
+
return o = l.order, l.vert ? i.gridLineStartPadding : o * F + S;
|
| 2040 |
+
}).attr("width", function(l) {
|
| 2041 |
+
return l.milestone ? k : l.vert ? 0.08 * k : H(l.renderEndTime || l.endTime) - H(l.startTime);
|
| 2042 |
+
}).attr("height", function(l) {
|
| 2043 |
+
return l.vert ? g.length * (i.barHeight + i.barGap) + i.barHeight * 2 : k;
|
| 2044 |
+
}).attr("transform-origin", function(l, o) {
|
| 2045 |
+
return o = l.order, (H(l.startTime) + _ + 0.5 * (H(l.endTime) - H(l.startTime))).toString() + "px " + (o * F + S + 0.5 * k).toString() + "px";
|
| 2046 |
+
}).attr("class", function(l) {
|
| 2047 |
+
const o = "task";
|
| 2048 |
+
let R = "";
|
| 2049 |
+
l.classes.length > 0 && (R = l.classes.join(" "));
|
| 2050 |
+
let z = 0;
|
| 2051 |
+
for (const [K, G] of U.entries())
|
| 2052 |
+
l.type === G && (z = K % i.numberSectionStyles);
|
| 2053 |
+
let P = "";
|
| 2054 |
+
return l.active ? l.crit ? P += " activeCrit" : P = " active" : l.done ? l.crit ? P = " doneCrit" : P = " done" : l.crit && (P += " crit"), P.length === 0 && (P = " task"), l.milestone && (P = " milestone " + P), l.vert && (P = " vert " + P), P += z, P += " " + R, o + P;
|
| 2055 |
+
}), m.append("text").attr("id", function(l) {
|
| 2056 |
+
return l.id + "-text";
|
| 2057 |
+
}).text(function(l) {
|
| 2058 |
+
return l.task;
|
| 2059 |
+
}).attr("font-size", i.fontSize).attr("x", function(l) {
|
| 2060 |
+
let o = H(l.startTime), R = H(l.renderEndTime || l.endTime);
|
| 2061 |
+
if (l.milestone && (o += 0.5 * (H(l.endTime) - H(l.startTime)) - 0.5 * k, R = o + k), l.vert)
|
| 2062 |
+
return H(l.startTime) + _;
|
| 2063 |
+
const z = this.getBBox().width;
|
| 2064 |
+
return z > R - o ? R + z + 1.5 * i.leftPadding > u ? o + _ - 5 : R + _ + 5 : (R - o) / 2 + o + _;
|
| 2065 |
+
}).attr("y", function(l, o) {
|
| 2066 |
+
return l.vert ? i.gridLineStartPadding + g.length * (i.barHeight + i.barGap) + 60 : (o = l.order, o * F + i.barHeight / 2 + (i.fontSize / 2 - 2) + S);
|
| 2067 |
+
}).attr("text-height", k).attr("class", function(l) {
|
| 2068 |
+
const o = H(l.startTime);
|
| 2069 |
+
let R = H(l.endTime);
|
| 2070 |
+
l.milestone && (R = o + k);
|
| 2071 |
+
const z = this.getBBox().width;
|
| 2072 |
+
let P = "";
|
| 2073 |
+
l.classes.length > 0 && (P = l.classes.join(" "));
|
| 2074 |
+
let K = 0;
|
| 2075 |
+
for (const [$, at] of U.entries())
|
| 2076 |
+
l.type === at && (K = $ % i.numberSectionStyles);
|
| 2077 |
+
let G = "";
|
| 2078 |
+
return l.active && (l.crit ? G = "activeCritText" + K : G = "activeText" + K), l.done ? l.crit ? G = G + " doneCritText" + K : G = G + " doneText" + K : l.crit && (G = G + " critText" + K), l.milestone && (G += " milestoneText"), l.vert && (G += " vertText"), z > R - o ? R + z + 1.5 * i.leftPadding > u ? P + " taskTextOutsideLeft taskTextOutside" + K + " " + G : P + " taskTextOutsideRight taskTextOutside" + K + " " + G + " width-" + z : P + " taskText taskText" + K + " " + G + " width-" + z;
|
| 2079 |
+
}), _t().securityLevel === "sandbox") {
|
| 2080 |
+
let l;
|
| 2081 |
+
l = Bt("#i" + e);
|
| 2082 |
+
const o = l.nodes()[0].contentDocument;
|
| 2083 |
+
m.filter(function(R) {
|
| 2084 |
+
return E.has(R.id);
|
| 2085 |
+
}).each(function(R) {
|
| 2086 |
+
var z = o.querySelector("#" + R.id), P = o.querySelector("#" + R.id + "-text");
|
| 2087 |
+
const K = z.parentNode;
|
| 2088 |
+
var G = o.createElement("a");
|
| 2089 |
+
G.setAttribute("xlink:href", E.get(R.id)), G.setAttribute("target", "_top"), K.appendChild(G), G.appendChild(z), G.appendChild(P);
|
| 2090 |
+
});
|
| 2091 |
+
}
|
| 2092 |
+
}
|
| 2093 |
+
d(V, "drawRects");
|
| 2094 |
+
function W(x, F, S, _, k, Y, u, h) {
|
| 2095 |
+
if (u.length === 0 && h.length === 0)
|
| 2096 |
+
return;
|
| 2097 |
+
let y, m;
|
| 2098 |
+
for (const { startTime: z, endTime: P } of Y)
|
| 2099 |
+
(y === void 0 || z < y) && (y = z), (m === void 0 || P > m) && (m = P);
|
| 2100 |
+
if (!y || !m)
|
| 2101 |
+
return;
|
| 2102 |
+
if (it(m).diff(it(y), "year") > 5) {
|
| 2103 |
+
Qt.warn(
|
| 2104 |
+
"The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days."
|
| 2105 |
+
);
|
| 2106 |
+
return;
|
| 2107 |
+
}
|
| 2108 |
+
const E = r.db.getDateFormat(), c = [];
|
| 2109 |
+
let l = null, o = it(y);
|
| 2110 |
+
for (; o.valueOf() <= m; )
|
| 2111 |
+
r.db.isInvalidDate(o, E, u, h) ? l ? l.end = o : l = {
|
| 2112 |
+
start: o,
|
| 2113 |
+
end: o
|
| 2114 |
+
} : l && (c.push(l), l = null), o = o.add(1, "d");
|
| 2115 |
+
X.append("g").selectAll("rect").data(c).enter().append("rect").attr("id", function(z) {
|
| 2116 |
+
return "exclude-" + z.start.format("YYYY-MM-DD");
|
| 2117 |
+
}).attr("x", function(z) {
|
| 2118 |
+
return H(z.start) + S;
|
| 2119 |
+
}).attr("y", i.gridLineStartPadding).attr("width", function(z) {
|
| 2120 |
+
const P = z.end.add(1, "day");
|
| 2121 |
+
return H(P) - H(z.start);
|
| 2122 |
+
}).attr("height", k - F - i.gridLineStartPadding).attr("transform-origin", function(z, P) {
|
| 2123 |
+
return (H(z.start) + S + 0.5 * (H(z.end) - H(z.start))).toString() + "px " + (P * x + 0.5 * k).toString() + "px";
|
| 2124 |
+
}).attr("class", "exclude-range");
|
| 2125 |
+
}
|
| 2126 |
+
d(W, "drawExcludeDays");
|
| 2127 |
+
function B(x, F, S, _) {
|
| 2128 |
+
let k = ir(H).tickSize(-_ + F + i.gridLineStartPadding).tickFormat(Kt(r.db.getAxisFormat() || i.axisFormat || "%Y-%m-%d"));
|
| 2129 |
+
const u = /^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(
|
| 2130 |
+
r.db.getTickInterval() || i.tickInterval
|
| 2131 |
+
);
|
| 2132 |
+
if (u !== null) {
|
| 2133 |
+
const h = u[1], y = u[2], m = r.db.getWeekday() || i.weekday;
|
| 2134 |
+
switch (y) {
|
| 2135 |
+
case "millisecond":
|
| 2136 |
+
k.ticks(Yt.every(h));
|
| 2137 |
+
break;
|
| 2138 |
+
case "second":
|
| 2139 |
+
k.ticks(vt.every(h));
|
| 2140 |
+
break;
|
| 2141 |
+
case "minute":
|
| 2142 |
+
k.ticks(Wt.every(h));
|
| 2143 |
+
break;
|
| 2144 |
+
case "hour":
|
| 2145 |
+
k.ticks(Ht.every(h));
|
| 2146 |
+
break;
|
| 2147 |
+
case "day":
|
| 2148 |
+
k.ticks(Tt.every(h));
|
| 2149 |
+
break;
|
| 2150 |
+
case "week":
|
| 2151 |
+
k.ticks(Qe[m].every(h));
|
| 2152 |
+
break;
|
| 2153 |
+
case "month":
|
| 2154 |
+
k.ticks(Nt.every(h));
|
| 2155 |
+
break;
|
| 2156 |
+
}
|
| 2157 |
+
}
|
| 2158 |
+
if (X.append("g").attr("class", "grid").attr("transform", "translate(" + x + ", " + (_ - 50) + ")").call(k).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10).attr("dy", "1em"), r.db.topAxisEnabled() || i.topAxis) {
|
| 2159 |
+
let h = rr(H).tickSize(-_ + F + i.gridLineStartPadding).tickFormat(Kt(r.db.getAxisFormat() || i.axisFormat || "%Y-%m-%d"));
|
| 2160 |
+
if (u !== null) {
|
| 2161 |
+
const y = u[1], m = u[2], E = r.db.getWeekday() || i.weekday;
|
| 2162 |
+
switch (m) {
|
| 2163 |
+
case "millisecond":
|
| 2164 |
+
h.ticks(Yt.every(y));
|
| 2165 |
+
break;
|
| 2166 |
+
case "second":
|
| 2167 |
+
h.ticks(vt.every(y));
|
| 2168 |
+
break;
|
| 2169 |
+
case "minute":
|
| 2170 |
+
h.ticks(Wt.every(y));
|
| 2171 |
+
break;
|
| 2172 |
+
case "hour":
|
| 2173 |
+
h.ticks(Ht.every(y));
|
| 2174 |
+
break;
|
| 2175 |
+
case "day":
|
| 2176 |
+
h.ticks(Tt.every(y));
|
| 2177 |
+
break;
|
| 2178 |
+
case "week":
|
| 2179 |
+
h.ticks(Qe[E].every(y));
|
| 2180 |
+
break;
|
| 2181 |
+
case "month":
|
| 2182 |
+
h.ticks(Nt.every(y));
|
| 2183 |
+
break;
|
| 2184 |
+
}
|
| 2185 |
+
}
|
| 2186 |
+
X.append("g").attr("class", "grid").attr("transform", "translate(" + x + ", " + F + ")").call(h).selectAll("text").style("text-anchor", "middle").attr("fill", "#000").attr("stroke", "none").attr("font-size", 10);
|
| 2187 |
+
}
|
| 2188 |
+
}
|
| 2189 |
+
d(B, "makeGrid");
|
| 2190 |
+
function Q(x, F) {
|
| 2191 |
+
let S = 0;
|
| 2192 |
+
const _ = Object.keys(C).map((k) => [k, C[k]]);
|
| 2193 |
+
X.append("g").selectAll("text").data(_).enter().append(function(k) {
|
| 2194 |
+
const Y = k[0].split(Vn.lineBreakRegex), u = -(Y.length - 1) / 2, h = M.createElementNS("http://www.w3.org/2000/svg", "text");
|
| 2195 |
+
h.setAttribute("dy", u + "em");
|
| 2196 |
+
for (const [y, m] of Y.entries()) {
|
| 2197 |
+
const E = M.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
| 2198 |
+
E.setAttribute("alignment-baseline", "central"), E.setAttribute("x", "10"), y > 0 && E.setAttribute("dy", "1em"), E.textContent = m, h.appendChild(E);
|
| 2199 |
+
}
|
| 2200 |
+
return h;
|
| 2201 |
+
}).attr("x", 10).attr("y", function(k, Y) {
|
| 2202 |
+
if (Y > 0)
|
| 2203 |
+
for (let u = 0; u < Y; u++)
|
| 2204 |
+
return S += _[Y - 1][1], k[1] * x / 2 + S * x + F;
|
| 2205 |
+
else
|
| 2206 |
+
return k[1] * x / 2 + F;
|
| 2207 |
+
}).attr("font-size", i.sectionFontSize).attr("class", function(k) {
|
| 2208 |
+
for (const [Y, u] of U.entries())
|
| 2209 |
+
if (k[0] === u)
|
| 2210 |
+
return "sectionTitle sectionTitle" + Y % i.numberSectionStyles;
|
| 2211 |
+
return "sectionTitle";
|
| 2212 |
+
});
|
| 2213 |
+
}
|
| 2214 |
+
d(Q, "vertLabels");
|
| 2215 |
+
function w(x, F, S, _) {
|
| 2216 |
+
const k = r.db.getTodayMarker();
|
| 2217 |
+
if (k === "off")
|
| 2218 |
+
return;
|
| 2219 |
+
const Y = X.append("g").attr("class", "today"), u = /* @__PURE__ */ new Date(), h = Y.append("line");
|
| 2220 |
+
h.attr("x1", H(u) + x).attr("x2", H(u) + x).attr("y1", i.titleTopMargin).attr("y2", _ - i.titleTopMargin).attr("class", "today"), k !== "" && h.attr("style", k.replace(/,/g, ";"));
|
| 2221 |
+
}
|
| 2222 |
+
d(w, "drawToday");
|
| 2223 |
+
function O(x) {
|
| 2224 |
+
const F = {}, S = [];
|
| 2225 |
+
for (let _ = 0, k = x.length; _ < k; ++_)
|
| 2226 |
+
Object.prototype.hasOwnProperty.call(F, x[_]) || (F[x[_]] = !0, S.push(x[_]));
|
| 2227 |
+
return S;
|
| 2228 |
+
}
|
| 2229 |
+
d(O, "checkUnique");
|
| 2230 |
+
}, "draw"), Ta = {
|
| 2231 |
+
setConf: ka,
|
| 2232 |
+
draw: va
|
| 2233 |
+
}, ba = /* @__PURE__ */ d((t) => `
|
| 2234 |
+
.mermaid-main-font {
|
| 2235 |
+
font-family: ${t.fontFamily};
|
| 2236 |
+
}
|
| 2237 |
+
|
| 2238 |
+
.exclude-range {
|
| 2239 |
+
fill: ${t.excludeBkgColor};
|
| 2240 |
+
}
|
| 2241 |
+
|
| 2242 |
+
.section {
|
| 2243 |
+
stroke: none;
|
| 2244 |
+
opacity: 0.2;
|
| 2245 |
+
}
|
| 2246 |
+
|
| 2247 |
+
.section0 {
|
| 2248 |
+
fill: ${t.sectionBkgColor};
|
| 2249 |
+
}
|
| 2250 |
+
|
| 2251 |
+
.section2 {
|
| 2252 |
+
fill: ${t.sectionBkgColor2};
|
| 2253 |
+
}
|
| 2254 |
+
|
| 2255 |
+
.section1,
|
| 2256 |
+
.section3 {
|
| 2257 |
+
fill: ${t.altSectionBkgColor};
|
| 2258 |
+
opacity: 0.2;
|
| 2259 |
+
}
|
| 2260 |
+
|
| 2261 |
+
.sectionTitle0 {
|
| 2262 |
+
fill: ${t.titleColor};
|
| 2263 |
+
}
|
| 2264 |
+
|
| 2265 |
+
.sectionTitle1 {
|
| 2266 |
+
fill: ${t.titleColor};
|
| 2267 |
+
}
|
| 2268 |
+
|
| 2269 |
+
.sectionTitle2 {
|
| 2270 |
+
fill: ${t.titleColor};
|
| 2271 |
+
}
|
| 2272 |
+
|
| 2273 |
+
.sectionTitle3 {
|
| 2274 |
+
fill: ${t.titleColor};
|
| 2275 |
+
}
|
| 2276 |
+
|
| 2277 |
+
.sectionTitle {
|
| 2278 |
+
text-anchor: start;
|
| 2279 |
+
font-family: ${t.fontFamily};
|
| 2280 |
+
}
|
| 2281 |
+
|
| 2282 |
+
|
| 2283 |
+
/* Grid and axis */
|
| 2284 |
+
|
| 2285 |
+
.grid .tick {
|
| 2286 |
+
stroke: ${t.gridColor};
|
| 2287 |
+
opacity: 0.8;
|
| 2288 |
+
shape-rendering: crispEdges;
|
| 2289 |
+
}
|
| 2290 |
+
|
| 2291 |
+
.grid .tick text {
|
| 2292 |
+
font-family: ${t.fontFamily};
|
| 2293 |
+
fill: ${t.textColor};
|
| 2294 |
+
}
|
| 2295 |
+
|
| 2296 |
+
.grid path {
|
| 2297 |
+
stroke-width: 0;
|
| 2298 |
+
}
|
| 2299 |
+
|
| 2300 |
+
|
| 2301 |
+
/* Today line */
|
| 2302 |
+
|
| 2303 |
+
.today {
|
| 2304 |
+
fill: none;
|
| 2305 |
+
stroke: ${t.todayLineColor};
|
| 2306 |
+
stroke-width: 2px;
|
| 2307 |
+
}
|
| 2308 |
+
|
| 2309 |
+
|
| 2310 |
+
/* Task styling */
|
| 2311 |
+
|
| 2312 |
+
/* Default task */
|
| 2313 |
+
|
| 2314 |
+
.task {
|
| 2315 |
+
stroke-width: 2;
|
| 2316 |
+
}
|
| 2317 |
+
|
| 2318 |
+
.taskText {
|
| 2319 |
+
text-anchor: middle;
|
| 2320 |
+
font-family: ${t.fontFamily};
|
| 2321 |
+
}
|
| 2322 |
+
|
| 2323 |
+
.taskTextOutsideRight {
|
| 2324 |
+
fill: ${t.taskTextDarkColor};
|
| 2325 |
+
text-anchor: start;
|
| 2326 |
+
font-family: ${t.fontFamily};
|
| 2327 |
+
}
|
| 2328 |
+
|
| 2329 |
+
.taskTextOutsideLeft {
|
| 2330 |
+
fill: ${t.taskTextDarkColor};
|
| 2331 |
+
text-anchor: end;
|
| 2332 |
+
}
|
| 2333 |
+
|
| 2334 |
+
|
| 2335 |
+
/* Special case clickable */
|
| 2336 |
+
|
| 2337 |
+
.task.clickable {
|
| 2338 |
+
cursor: pointer;
|
| 2339 |
+
}
|
| 2340 |
+
|
| 2341 |
+
.taskText.clickable {
|
| 2342 |
+
cursor: pointer;
|
| 2343 |
+
fill: ${t.taskTextClickableColor} !important;
|
| 2344 |
+
font-weight: bold;
|
| 2345 |
+
}
|
| 2346 |
+
|
| 2347 |
+
.taskTextOutsideLeft.clickable {
|
| 2348 |
+
cursor: pointer;
|
| 2349 |
+
fill: ${t.taskTextClickableColor} !important;
|
| 2350 |
+
font-weight: bold;
|
| 2351 |
+
}
|
| 2352 |
+
|
| 2353 |
+
.taskTextOutsideRight.clickable {
|
| 2354 |
+
cursor: pointer;
|
| 2355 |
+
fill: ${t.taskTextClickableColor} !important;
|
| 2356 |
+
font-weight: bold;
|
| 2357 |
+
}
|
| 2358 |
+
|
| 2359 |
+
|
| 2360 |
+
/* Specific task settings for the sections*/
|
| 2361 |
+
|
| 2362 |
+
.taskText0,
|
| 2363 |
+
.taskText1,
|
| 2364 |
+
.taskText2,
|
| 2365 |
+
.taskText3 {
|
| 2366 |
+
fill: ${t.taskTextColor};
|
| 2367 |
+
}
|
| 2368 |
+
|
| 2369 |
+
.task0,
|
| 2370 |
+
.task1,
|
| 2371 |
+
.task2,
|
| 2372 |
+
.task3 {
|
| 2373 |
+
fill: ${t.taskBkgColor};
|
| 2374 |
+
stroke: ${t.taskBorderColor};
|
| 2375 |
+
}
|
| 2376 |
+
|
| 2377 |
+
.taskTextOutside0,
|
| 2378 |
+
.taskTextOutside2
|
| 2379 |
+
{
|
| 2380 |
+
fill: ${t.taskTextOutsideColor};
|
| 2381 |
+
}
|
| 2382 |
+
|
| 2383 |
+
.taskTextOutside1,
|
| 2384 |
+
.taskTextOutside3 {
|
| 2385 |
+
fill: ${t.taskTextOutsideColor};
|
| 2386 |
+
}
|
| 2387 |
+
|
| 2388 |
+
|
| 2389 |
+
/* Active task */
|
| 2390 |
+
|
| 2391 |
+
.active0,
|
| 2392 |
+
.active1,
|
| 2393 |
+
.active2,
|
| 2394 |
+
.active3 {
|
| 2395 |
+
fill: ${t.activeTaskBkgColor};
|
| 2396 |
+
stroke: ${t.activeTaskBorderColor};
|
| 2397 |
+
}
|
| 2398 |
+
|
| 2399 |
+
.activeText0,
|
| 2400 |
+
.activeText1,
|
| 2401 |
+
.activeText2,
|
| 2402 |
+
.activeText3 {
|
| 2403 |
+
fill: ${t.taskTextDarkColor} !important;
|
| 2404 |
+
}
|
| 2405 |
+
|
| 2406 |
+
|
| 2407 |
+
/* Completed task */
|
| 2408 |
+
|
| 2409 |
+
.done0,
|
| 2410 |
+
.done1,
|
| 2411 |
+
.done2,
|
| 2412 |
+
.done3 {
|
| 2413 |
+
stroke: ${t.doneTaskBorderColor};
|
| 2414 |
+
fill: ${t.doneTaskBkgColor};
|
| 2415 |
+
stroke-width: 2;
|
| 2416 |
+
}
|
| 2417 |
+
|
| 2418 |
+
.doneText0,
|
| 2419 |
+
.doneText1,
|
| 2420 |
+
.doneText2,
|
| 2421 |
+
.doneText3 {
|
| 2422 |
+
fill: ${t.taskTextDarkColor} !important;
|
| 2423 |
+
}
|
| 2424 |
+
|
| 2425 |
+
|
| 2426 |
+
/* Tasks on the critical line */
|
| 2427 |
+
|
| 2428 |
+
.crit0,
|
| 2429 |
+
.crit1,
|
| 2430 |
+
.crit2,
|
| 2431 |
+
.crit3 {
|
| 2432 |
+
stroke: ${t.critBorderColor};
|
| 2433 |
+
fill: ${t.critBkgColor};
|
| 2434 |
+
stroke-width: 2;
|
| 2435 |
+
}
|
| 2436 |
+
|
| 2437 |
+
.activeCrit0,
|
| 2438 |
+
.activeCrit1,
|
| 2439 |
+
.activeCrit2,
|
| 2440 |
+
.activeCrit3 {
|
| 2441 |
+
stroke: ${t.critBorderColor};
|
| 2442 |
+
fill: ${t.activeTaskBkgColor};
|
| 2443 |
+
stroke-width: 2;
|
| 2444 |
+
}
|
| 2445 |
+
|
| 2446 |
+
.doneCrit0,
|
| 2447 |
+
.doneCrit1,
|
| 2448 |
+
.doneCrit2,
|
| 2449 |
+
.doneCrit3 {
|
| 2450 |
+
stroke: ${t.critBorderColor};
|
| 2451 |
+
fill: ${t.doneTaskBkgColor};
|
| 2452 |
+
stroke-width: 2;
|
| 2453 |
+
cursor: pointer;
|
| 2454 |
+
shape-rendering: crispEdges;
|
| 2455 |
+
}
|
| 2456 |
+
|
| 2457 |
+
.milestone {
|
| 2458 |
+
transform: rotate(45deg) scale(0.8,0.8);
|
| 2459 |
+
}
|
| 2460 |
+
|
| 2461 |
+
.milestoneText {
|
| 2462 |
+
font-style: italic;
|
| 2463 |
+
}
|
| 2464 |
+
.doneCritText0,
|
| 2465 |
+
.doneCritText1,
|
| 2466 |
+
.doneCritText2,
|
| 2467 |
+
.doneCritText3 {
|
| 2468 |
+
fill: ${t.taskTextDarkColor} !important;
|
| 2469 |
+
}
|
| 2470 |
+
|
| 2471 |
+
.vert {
|
| 2472 |
+
stroke: ${t.vertLineColor};
|
| 2473 |
+
}
|
| 2474 |
+
|
| 2475 |
+
.vertText {
|
| 2476 |
+
font-size: 15px;
|
| 2477 |
+
text-anchor: middle;
|
| 2478 |
+
fill: ${t.vertLineColor} !important;
|
| 2479 |
+
}
|
| 2480 |
+
|
| 2481 |
+
.activeCritText0,
|
| 2482 |
+
.activeCritText1,
|
| 2483 |
+
.activeCritText2,
|
| 2484 |
+
.activeCritText3 {
|
| 2485 |
+
fill: ${t.taskTextDarkColor} !important;
|
| 2486 |
+
}
|
| 2487 |
+
|
| 2488 |
+
.titleText {
|
| 2489 |
+
text-anchor: middle;
|
| 2490 |
+
font-size: 18px;
|
| 2491 |
+
fill: ${t.titleColor || t.textColor};
|
| 2492 |
+
font-family: ${t.fontFamily};
|
| 2493 |
+
}
|
| 2494 |
+
`, "getStyles"), xa = ba, _a = {
|
| 2495 |
+
parser: Ai,
|
| 2496 |
+
db: ya,
|
| 2497 |
+
renderer: Ta,
|
| 2498 |
+
styles: xa
|
| 2499 |
+
};
|
| 2500 |
+
export {
|
| 2501 |
+
_a as diagram
|
| 2502 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/gitGraphDiagram-SOPYED2O-CZf1STxn.js
ADDED
|
@@ -0,0 +1,712 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { p as Z } from "./chunk-44GW5IO5-I0mkHKCJ.js";
|
| 2 |
+
import { I as F } from "./chunk-BQPDZTM5-BDSGaJp-.js";
|
| 3 |
+
import { _ as h, q as U, p as rr, s as er, g as tr, a as ar, b as nr, l as w, c as sr, d as or, u as cr, C as ir, y as dr, k as B, D as hr, E as lr, F as $r, G as fr } from "./mermaid.core-CfPtPiLZ.js";
|
| 4 |
+
import { p as gr } from "./radar-VG2SY3DT-zUt99CZd.js";
|
| 5 |
+
var x = {
|
| 6 |
+
NORMAL: 0,
|
| 7 |
+
REVERSE: 1,
|
| 8 |
+
HIGHLIGHT: 2,
|
| 9 |
+
MERGE: 3,
|
| 10 |
+
CHERRY_PICK: 4
|
| 11 |
+
}, yr = $r.gitGraph, z = /* @__PURE__ */ h(() => hr({
|
| 12 |
+
...yr,
|
| 13 |
+
...lr().gitGraph
|
| 14 |
+
}), "getConfig"), i = new F(() => {
|
| 15 |
+
const t = z(), r = t.mainBranchName, a = t.mainBranchOrder;
|
| 16 |
+
return {
|
| 17 |
+
mainBranchName: r,
|
| 18 |
+
commits: /* @__PURE__ */ new Map(),
|
| 19 |
+
head: null,
|
| 20 |
+
branchConfig: /* @__PURE__ */ new Map([[r, { name: r, order: a }]]),
|
| 21 |
+
branches: /* @__PURE__ */ new Map([[r, null]]),
|
| 22 |
+
currBranch: r,
|
| 23 |
+
direction: "LR",
|
| 24 |
+
seq: 0,
|
| 25 |
+
options: {}
|
| 26 |
+
};
|
| 27 |
+
});
|
| 28 |
+
function S() {
|
| 29 |
+
return fr({ length: 7 });
|
| 30 |
+
}
|
| 31 |
+
h(S, "getID");
|
| 32 |
+
function N(t, r) {
|
| 33 |
+
const a = /* @__PURE__ */ Object.create(null);
|
| 34 |
+
return t.reduce((s, e) => {
|
| 35 |
+
const n = r(e);
|
| 36 |
+
return a[n] || (a[n] = !0, s.push(e)), s;
|
| 37 |
+
}, []);
|
| 38 |
+
}
|
| 39 |
+
h(N, "uniqBy");
|
| 40 |
+
var ur = /* @__PURE__ */ h(function(t) {
|
| 41 |
+
i.records.direction = t;
|
| 42 |
+
}, "setDirection"), xr = /* @__PURE__ */ h(function(t) {
|
| 43 |
+
w.debug("options str", t), t = t == null ? void 0 : t.trim(), t = t || "{}";
|
| 44 |
+
try {
|
| 45 |
+
i.records.options = JSON.parse(t);
|
| 46 |
+
} catch (r) {
|
| 47 |
+
w.error("error while parsing gitGraph options", r.message);
|
| 48 |
+
}
|
| 49 |
+
}, "setOptions"), pr = /* @__PURE__ */ h(function() {
|
| 50 |
+
return i.records.options;
|
| 51 |
+
}, "getOptions"), br = /* @__PURE__ */ h(function(t) {
|
| 52 |
+
let r = t.msg, a = t.id;
|
| 53 |
+
const s = t.type;
|
| 54 |
+
let e = t.tags;
|
| 55 |
+
w.info("commit", r, a, s, e), w.debug("Entering commit:", r, a, s, e);
|
| 56 |
+
const n = z();
|
| 57 |
+
a = B.sanitizeText(a, n), r = B.sanitizeText(r, n), e = e == null ? void 0 : e.map((o) => B.sanitizeText(o, n));
|
| 58 |
+
const c = {
|
| 59 |
+
id: a || i.records.seq + "-" + S(),
|
| 60 |
+
message: r,
|
| 61 |
+
seq: i.records.seq++,
|
| 62 |
+
type: s ?? x.NORMAL,
|
| 63 |
+
tags: e ?? [],
|
| 64 |
+
parents: i.records.head == null ? [] : [i.records.head.id],
|
| 65 |
+
branch: i.records.currBranch
|
| 66 |
+
};
|
| 67 |
+
i.records.head = c, w.info("main branch", n.mainBranchName), i.records.commits.set(c.id, c), i.records.branches.set(i.records.currBranch, c.id), w.debug("in pushCommit " + c.id);
|
| 68 |
+
}, "commit"), mr = /* @__PURE__ */ h(function(t) {
|
| 69 |
+
let r = t.name;
|
| 70 |
+
const a = t.order;
|
| 71 |
+
if (r = B.sanitizeText(r, z()), i.records.branches.has(r))
|
| 72 |
+
throw new Error(
|
| 73 |
+
`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`
|
| 74 |
+
);
|
| 75 |
+
i.records.branches.set(r, i.records.head != null ? i.records.head.id : null), i.records.branchConfig.set(r, { name: r, order: a }), _(r), w.debug("in createBranch");
|
| 76 |
+
}, "branch"), wr = /* @__PURE__ */ h((t) => {
|
| 77 |
+
let r = t.branch, a = t.id;
|
| 78 |
+
const s = t.type, e = t.tags, n = z();
|
| 79 |
+
r = B.sanitizeText(r, n), a && (a = B.sanitizeText(a, n));
|
| 80 |
+
const c = i.records.branches.get(i.records.currBranch), o = i.records.branches.get(r), $ = c ? i.records.commits.get(c) : void 0, l = o ? i.records.commits.get(o) : void 0;
|
| 81 |
+
if ($ && l && $.branch === r)
|
| 82 |
+
throw new Error(`Cannot merge branch '${r}' into itself.`);
|
| 83 |
+
if (i.records.currBranch === r) {
|
| 84 |
+
const d = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
|
| 85 |
+
throw d.hash = {
|
| 86 |
+
text: `merge ${r}`,
|
| 87 |
+
token: `merge ${r}`,
|
| 88 |
+
expected: ["branch abc"]
|
| 89 |
+
}, d;
|
| 90 |
+
}
|
| 91 |
+
if ($ === void 0 || !$) {
|
| 92 |
+
const d = new Error(
|
| 93 |
+
`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`
|
| 94 |
+
);
|
| 95 |
+
throw d.hash = {
|
| 96 |
+
text: `merge ${r}`,
|
| 97 |
+
token: `merge ${r}`,
|
| 98 |
+
expected: ["commit"]
|
| 99 |
+
}, d;
|
| 100 |
+
}
|
| 101 |
+
if (!i.records.branches.has(r)) {
|
| 102 |
+
const d = new Error(
|
| 103 |
+
'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist"
|
| 104 |
+
);
|
| 105 |
+
throw d.hash = {
|
| 106 |
+
text: `merge ${r}`,
|
| 107 |
+
token: `merge ${r}`,
|
| 108 |
+
expected: [`branch ${r}`]
|
| 109 |
+
}, d;
|
| 110 |
+
}
|
| 111 |
+
if (l === void 0 || !l) {
|
| 112 |
+
const d = new Error(
|
| 113 |
+
'Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits"
|
| 114 |
+
);
|
| 115 |
+
throw d.hash = {
|
| 116 |
+
text: `merge ${r}`,
|
| 117 |
+
token: `merge ${r}`,
|
| 118 |
+
expected: ['"commit"']
|
| 119 |
+
}, d;
|
| 120 |
+
}
|
| 121 |
+
if ($ === l) {
|
| 122 |
+
const d = new Error('Incorrect usage of "merge". Both branches have same head');
|
| 123 |
+
throw d.hash = {
|
| 124 |
+
text: `merge ${r}`,
|
| 125 |
+
token: `merge ${r}`,
|
| 126 |
+
expected: ["branch abc"]
|
| 127 |
+
}, d;
|
| 128 |
+
}
|
| 129 |
+
if (a && i.records.commits.has(a)) {
|
| 130 |
+
const d = new Error(
|
| 131 |
+
'Incorrect usage of "merge". Commit with id:' + a + " already exists, use different custom id"
|
| 132 |
+
);
|
| 133 |
+
throw d.hash = {
|
| 134 |
+
text: `merge ${r} ${a} ${s} ${e == null ? void 0 : e.join(" ")}`,
|
| 135 |
+
token: `merge ${r} ${a} ${s} ${e == null ? void 0 : e.join(" ")}`,
|
| 136 |
+
expected: [
|
| 137 |
+
`merge ${r} ${a}_UNIQUE ${s} ${e == null ? void 0 : e.join(" ")}`
|
| 138 |
+
]
|
| 139 |
+
}, d;
|
| 140 |
+
}
|
| 141 |
+
const f = o || "", g = {
|
| 142 |
+
id: a || `${i.records.seq}-${S()}`,
|
| 143 |
+
message: `merged branch ${r} into ${i.records.currBranch}`,
|
| 144 |
+
seq: i.records.seq++,
|
| 145 |
+
parents: i.records.head == null ? [] : [i.records.head.id, f],
|
| 146 |
+
branch: i.records.currBranch,
|
| 147 |
+
type: x.MERGE,
|
| 148 |
+
customType: s,
|
| 149 |
+
customId: !!a,
|
| 150 |
+
tags: e ?? []
|
| 151 |
+
};
|
| 152 |
+
i.records.head = g, i.records.commits.set(g.id, g), i.records.branches.set(i.records.currBranch, g.id), w.debug(i.records.branches), w.debug("in mergeBranch");
|
| 153 |
+
}, "merge"), vr = /* @__PURE__ */ h(function(t) {
|
| 154 |
+
let r = t.id, a = t.targetId, s = t.tags, e = t.parent;
|
| 155 |
+
w.debug("Entering cherryPick:", r, a, s);
|
| 156 |
+
const n = z();
|
| 157 |
+
if (r = B.sanitizeText(r, n), a = B.sanitizeText(a, n), s = s == null ? void 0 : s.map(($) => B.sanitizeText($, n)), e = B.sanitizeText(e, n), !r || !i.records.commits.has(r)) {
|
| 158 |
+
const $ = new Error(
|
| 159 |
+
'Incorrect usage of "cherryPick". Source commit id should exist and provided'
|
| 160 |
+
);
|
| 161 |
+
throw $.hash = {
|
| 162 |
+
text: `cherryPick ${r} ${a}`,
|
| 163 |
+
token: `cherryPick ${r} ${a}`,
|
| 164 |
+
expected: ["cherry-pick abc"]
|
| 165 |
+
}, $;
|
| 166 |
+
}
|
| 167 |
+
const c = i.records.commits.get(r);
|
| 168 |
+
if (c === void 0 || !c)
|
| 169 |
+
throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
|
| 170 |
+
if (e && !(Array.isArray(c.parents) && c.parents.includes(e)))
|
| 171 |
+
throw new Error(
|
| 172 |
+
"Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
|
| 173 |
+
);
|
| 174 |
+
const o = c.branch;
|
| 175 |
+
if (c.type === x.MERGE && !e)
|
| 176 |
+
throw new Error(
|
| 177 |
+
"Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
|
| 178 |
+
);
|
| 179 |
+
if (!a || !i.records.commits.has(a)) {
|
| 180 |
+
if (o === i.records.currBranch) {
|
| 181 |
+
const g = new Error(
|
| 182 |
+
'Incorrect usage of "cherryPick". Source commit is already on current branch'
|
| 183 |
+
);
|
| 184 |
+
throw g.hash = {
|
| 185 |
+
text: `cherryPick ${r} ${a}`,
|
| 186 |
+
token: `cherryPick ${r} ${a}`,
|
| 187 |
+
expected: ["cherry-pick abc"]
|
| 188 |
+
}, g;
|
| 189 |
+
}
|
| 190 |
+
const $ = i.records.branches.get(i.records.currBranch);
|
| 191 |
+
if ($ === void 0 || !$) {
|
| 192 |
+
const g = new Error(
|
| 193 |
+
`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`
|
| 194 |
+
);
|
| 195 |
+
throw g.hash = {
|
| 196 |
+
text: `cherryPick ${r} ${a}`,
|
| 197 |
+
token: `cherryPick ${r} ${a}`,
|
| 198 |
+
expected: ["cherry-pick abc"]
|
| 199 |
+
}, g;
|
| 200 |
+
}
|
| 201 |
+
const l = i.records.commits.get($);
|
| 202 |
+
if (l === void 0 || !l) {
|
| 203 |
+
const g = new Error(
|
| 204 |
+
`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`
|
| 205 |
+
);
|
| 206 |
+
throw g.hash = {
|
| 207 |
+
text: `cherryPick ${r} ${a}`,
|
| 208 |
+
token: `cherryPick ${r} ${a}`,
|
| 209 |
+
expected: ["cherry-pick abc"]
|
| 210 |
+
}, g;
|
| 211 |
+
}
|
| 212 |
+
const f = {
|
| 213 |
+
id: i.records.seq + "-" + S(),
|
| 214 |
+
message: `cherry-picked ${c == null ? void 0 : c.message} into ${i.records.currBranch}`,
|
| 215 |
+
seq: i.records.seq++,
|
| 216 |
+
parents: i.records.head == null ? [] : [i.records.head.id, c.id],
|
| 217 |
+
branch: i.records.currBranch,
|
| 218 |
+
type: x.CHERRY_PICK,
|
| 219 |
+
tags: s ? s.filter(Boolean) : [
|
| 220 |
+
`cherry-pick:${c.id}${c.type === x.MERGE ? `|parent:${e}` : ""}`
|
| 221 |
+
]
|
| 222 |
+
};
|
| 223 |
+
i.records.head = f, i.records.commits.set(f.id, f), i.records.branches.set(i.records.currBranch, f.id), w.debug(i.records.branches), w.debug("in cherryPick");
|
| 224 |
+
}
|
| 225 |
+
}, "cherryPick"), _ = /* @__PURE__ */ h(function(t) {
|
| 226 |
+
if (t = B.sanitizeText(t, z()), i.records.branches.has(t)) {
|
| 227 |
+
i.records.currBranch = t;
|
| 228 |
+
const r = i.records.branches.get(i.records.currBranch);
|
| 229 |
+
r === void 0 || !r ? i.records.head = null : i.records.head = i.records.commits.get(r) ?? null;
|
| 230 |
+
} else {
|
| 231 |
+
const r = new Error(
|
| 232 |
+
`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`
|
| 233 |
+
);
|
| 234 |
+
throw r.hash = {
|
| 235 |
+
text: `checkout ${t}`,
|
| 236 |
+
token: `checkout ${t}`,
|
| 237 |
+
expected: [`branch ${t}`]
|
| 238 |
+
}, r;
|
| 239 |
+
}
|
| 240 |
+
}, "checkout");
|
| 241 |
+
function A(t, r, a) {
|
| 242 |
+
const s = t.indexOf(r);
|
| 243 |
+
s === -1 ? t.push(a) : t.splice(s, 1, a);
|
| 244 |
+
}
|
| 245 |
+
h(A, "upsert");
|
| 246 |
+
function D(t) {
|
| 247 |
+
const r = t.reduce((e, n) => e.seq > n.seq ? e : n, t[0]);
|
| 248 |
+
let a = "";
|
| 249 |
+
t.forEach(function(e) {
|
| 250 |
+
e === r ? a += " *" : a += " |";
|
| 251 |
+
});
|
| 252 |
+
const s = [a, r.id, r.seq];
|
| 253 |
+
for (const e in i.records.branches)
|
| 254 |
+
i.records.branches.get(e) === r.id && s.push(e);
|
| 255 |
+
if (w.debug(s.join(" ")), r.parents && r.parents.length == 2 && r.parents[0] && r.parents[1]) {
|
| 256 |
+
const e = i.records.commits.get(r.parents[0]);
|
| 257 |
+
A(t, r, e), r.parents[1] && t.push(i.records.commits.get(r.parents[1]));
|
| 258 |
+
} else {
|
| 259 |
+
if (r.parents.length == 0)
|
| 260 |
+
return;
|
| 261 |
+
if (r.parents[0]) {
|
| 262 |
+
const e = i.records.commits.get(r.parents[0]);
|
| 263 |
+
A(t, r, e);
|
| 264 |
+
}
|
| 265 |
+
}
|
| 266 |
+
t = N(t, (e) => e.id), D(t);
|
| 267 |
+
}
|
| 268 |
+
h(D, "prettyPrintCommitHistory");
|
| 269 |
+
var Cr = /* @__PURE__ */ h(function() {
|
| 270 |
+
w.debug(i.records.commits);
|
| 271 |
+
const t = V()[0];
|
| 272 |
+
D([t]);
|
| 273 |
+
}, "prettyPrint"), Er = /* @__PURE__ */ h(function() {
|
| 274 |
+
i.reset(), dr();
|
| 275 |
+
}, "clear"), Br = /* @__PURE__ */ h(function() {
|
| 276 |
+
return [...i.records.branchConfig.values()].map((r, a) => r.order !== null && r.order !== void 0 ? r : {
|
| 277 |
+
...r,
|
| 278 |
+
order: parseFloat(`0.${a}`)
|
| 279 |
+
}).sort((r, a) => (r.order ?? 0) - (a.order ?? 0)).map(({ name: r }) => ({ name: r }));
|
| 280 |
+
}, "getBranchesAsObjArray"), kr = /* @__PURE__ */ h(function() {
|
| 281 |
+
return i.records.branches;
|
| 282 |
+
}, "getBranches"), Lr = /* @__PURE__ */ h(function() {
|
| 283 |
+
return i.records.commits;
|
| 284 |
+
}, "getCommits"), V = /* @__PURE__ */ h(function() {
|
| 285 |
+
const t = [...i.records.commits.values()];
|
| 286 |
+
return t.forEach(function(r) {
|
| 287 |
+
w.debug(r.id);
|
| 288 |
+
}), t.sort((r, a) => r.seq - a.seq), t;
|
| 289 |
+
}, "getCommitsArray"), Tr = /* @__PURE__ */ h(function() {
|
| 290 |
+
return i.records.currBranch;
|
| 291 |
+
}, "getCurrentBranch"), Mr = /* @__PURE__ */ h(function() {
|
| 292 |
+
return i.records.direction;
|
| 293 |
+
}, "getDirection"), Rr = /* @__PURE__ */ h(function() {
|
| 294 |
+
return i.records.head;
|
| 295 |
+
}, "getHead"), X = {
|
| 296 |
+
commitType: x,
|
| 297 |
+
getConfig: z,
|
| 298 |
+
setDirection: ur,
|
| 299 |
+
setOptions: xr,
|
| 300 |
+
getOptions: pr,
|
| 301 |
+
commit: br,
|
| 302 |
+
branch: mr,
|
| 303 |
+
merge: wr,
|
| 304 |
+
cherryPick: vr,
|
| 305 |
+
checkout: _,
|
| 306 |
+
//reset,
|
| 307 |
+
prettyPrint: Cr,
|
| 308 |
+
clear: Er,
|
| 309 |
+
getBranchesAsObjArray: Br,
|
| 310 |
+
getBranches: kr,
|
| 311 |
+
getCommits: Lr,
|
| 312 |
+
getCommitsArray: V,
|
| 313 |
+
getCurrentBranch: Tr,
|
| 314 |
+
getDirection: Mr,
|
| 315 |
+
getHead: Rr,
|
| 316 |
+
setAccTitle: nr,
|
| 317 |
+
getAccTitle: ar,
|
| 318 |
+
getAccDescription: tr,
|
| 319 |
+
setAccDescription: er,
|
| 320 |
+
setDiagramTitle: rr,
|
| 321 |
+
getDiagramTitle: U
|
| 322 |
+
}, Ir = /* @__PURE__ */ h((t, r) => {
|
| 323 |
+
Z(t, r), t.dir && r.setDirection(t.dir);
|
| 324 |
+
for (const a of t.statements)
|
| 325 |
+
qr(a, r);
|
| 326 |
+
}, "populate"), qr = /* @__PURE__ */ h((t, r) => {
|
| 327 |
+
const s = {
|
| 328 |
+
Commit: /* @__PURE__ */ h((e) => r.commit(Or(e)), "Commit"),
|
| 329 |
+
Branch: /* @__PURE__ */ h((e) => r.branch(zr(e)), "Branch"),
|
| 330 |
+
Merge: /* @__PURE__ */ h((e) => r.merge(Gr(e)), "Merge"),
|
| 331 |
+
Checkout: /* @__PURE__ */ h((e) => r.checkout(Hr(e)), "Checkout"),
|
| 332 |
+
CherryPicking: /* @__PURE__ */ h((e) => r.cherryPick(Pr(e)), "CherryPicking")
|
| 333 |
+
}[t.$type];
|
| 334 |
+
s ? s(t) : w.error(`Unknown statement type: ${t.$type}`);
|
| 335 |
+
}, "parseStatement"), Or = /* @__PURE__ */ h((t) => ({
|
| 336 |
+
id: t.id,
|
| 337 |
+
msg: t.message ?? "",
|
| 338 |
+
type: t.type !== void 0 ? x[t.type] : x.NORMAL,
|
| 339 |
+
tags: t.tags ?? void 0
|
| 340 |
+
}), "parseCommit"), zr = /* @__PURE__ */ h((t) => ({
|
| 341 |
+
name: t.name,
|
| 342 |
+
order: t.order ?? 0
|
| 343 |
+
}), "parseBranch"), Gr = /* @__PURE__ */ h((t) => ({
|
| 344 |
+
branch: t.branch,
|
| 345 |
+
id: t.id ?? "",
|
| 346 |
+
type: t.type !== void 0 ? x[t.type] : void 0,
|
| 347 |
+
tags: t.tags ?? void 0
|
| 348 |
+
}), "parseMerge"), Hr = /* @__PURE__ */ h((t) => t.branch, "parseCheckout"), Pr = /* @__PURE__ */ h((t) => {
|
| 349 |
+
var a;
|
| 350 |
+
return {
|
| 351 |
+
id: t.id,
|
| 352 |
+
targetId: "",
|
| 353 |
+
tags: ((a = t.tags) == null ? void 0 : a.length) === 0 ? void 0 : t.tags,
|
| 354 |
+
parent: t.parent
|
| 355 |
+
};
|
| 356 |
+
}, "parseCherryPicking"), Wr = {
|
| 357 |
+
parse: /* @__PURE__ */ h(async (t) => {
|
| 358 |
+
const r = await gr("gitGraph", t);
|
| 359 |
+
w.debug(r), Ir(r, X);
|
| 360 |
+
}, "parse")
|
| 361 |
+
}, j = sr(), b = j == null ? void 0 : j.gitGraph, R = 10, I = 40, k = 4, L = 2, O = 8, C = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), P = 30, G = /* @__PURE__ */ new Map(), W = [], M = 0, u = "LR", Sr = /* @__PURE__ */ h(() => {
|
| 362 |
+
C.clear(), E.clear(), G.clear(), M = 0, W = [], u = "LR";
|
| 363 |
+
}, "clear"), J = /* @__PURE__ */ h((t) => {
|
| 364 |
+
const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
| 365 |
+
return (typeof t == "string" ? t.split(/\\n|\n|<br\s*\/?>/gi) : t).forEach((s) => {
|
| 366 |
+
const e = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
| 367 |
+
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 = s.trim(), r.appendChild(e);
|
| 368 |
+
}), r;
|
| 369 |
+
}, "drawText"), Q = /* @__PURE__ */ h((t) => {
|
| 370 |
+
let r, a, s;
|
| 371 |
+
return u === "BT" ? (a = /* @__PURE__ */ h((e, n) => e <= n, "comparisonFunc"), s = 1 / 0) : (a = /* @__PURE__ */ h((e, n) => e >= n, "comparisonFunc"), s = 0), t.forEach((e) => {
|
| 372 |
+
var c, o;
|
| 373 |
+
const n = u === "TB" || u == "BT" ? (c = E.get(e)) == null ? void 0 : c.y : (o = E.get(e)) == null ? void 0 : o.x;
|
| 374 |
+
n !== void 0 && a(n, s) && (r = e, s = n);
|
| 375 |
+
}), r;
|
| 376 |
+
}, "findClosestParent"), jr = /* @__PURE__ */ h((t) => {
|
| 377 |
+
let r = "", a = 1 / 0;
|
| 378 |
+
return t.forEach((s) => {
|
| 379 |
+
const e = E.get(s).y;
|
| 380 |
+
e <= a && (r = s, a = e);
|
| 381 |
+
}), r || void 0;
|
| 382 |
+
}, "findClosestParentBT"), Ar = /* @__PURE__ */ h((t, r, a) => {
|
| 383 |
+
let s = a, e = a;
|
| 384 |
+
const n = [];
|
| 385 |
+
t.forEach((c) => {
|
| 386 |
+
const o = r.get(c);
|
| 387 |
+
if (!o)
|
| 388 |
+
throw new Error(`Commit not found for key ${c}`);
|
| 389 |
+
o.parents.length ? (s = Yr(o), e = Math.max(s, e)) : n.push(o), Kr(o, s);
|
| 390 |
+
}), s = e, n.forEach((c) => {
|
| 391 |
+
Nr(c, s, a);
|
| 392 |
+
}), t.forEach((c) => {
|
| 393 |
+
const o = r.get(c);
|
| 394 |
+
if (o != null && o.parents.length) {
|
| 395 |
+
const $ = jr(o.parents);
|
| 396 |
+
s = E.get($).y - I, s <= e && (e = s);
|
| 397 |
+
const l = C.get(o.branch).pos, f = s - R;
|
| 398 |
+
E.set(o.id, { x: l, y: f });
|
| 399 |
+
}
|
| 400 |
+
});
|
| 401 |
+
}, "setParallelBTPos"), Dr = /* @__PURE__ */ h((t) => {
|
| 402 |
+
var s;
|
| 403 |
+
const r = Q(t.parents.filter((e) => e !== null));
|
| 404 |
+
if (!r)
|
| 405 |
+
throw new Error(`Closest parent not found for commit ${t.id}`);
|
| 406 |
+
const a = (s = E.get(r)) == null ? void 0 : s.y;
|
| 407 |
+
if (a === void 0)
|
| 408 |
+
throw new Error(`Closest parent position not found for commit ${t.id}`);
|
| 409 |
+
return a;
|
| 410 |
+
}, "findClosestParentPos"), Yr = /* @__PURE__ */ h((t) => Dr(t) + I, "calculateCommitPosition"), Kr = /* @__PURE__ */ h((t, r) => {
|
| 411 |
+
const a = C.get(t.branch);
|
| 412 |
+
if (!a)
|
| 413 |
+
throw new Error(`Branch not found for commit ${t.id}`);
|
| 414 |
+
const s = a.pos, e = r + R;
|
| 415 |
+
return E.set(t.id, { x: s, y: e }), { x: s, y: e };
|
| 416 |
+
}, "setCommitPosition"), Nr = /* @__PURE__ */ h((t, r, a) => {
|
| 417 |
+
const s = C.get(t.branch);
|
| 418 |
+
if (!s)
|
| 419 |
+
throw new Error(`Branch not found for commit ${t.id}`);
|
| 420 |
+
const e = r + a, n = s.pos;
|
| 421 |
+
E.set(t.id, { x: n, y: e });
|
| 422 |
+
}, "setRootPosition"), _r = /* @__PURE__ */ h((t, r, a, s, e, n) => {
|
| 423 |
+
if (n === x.HIGHLIGHT)
|
| 424 |
+
t.append("rect").attr("x", a.x - 10).attr("y", a.y - 10).attr("width", 20).attr("height", 20).attr(
|
| 425 |
+
"class",
|
| 426 |
+
`commit ${r.id} commit-highlight${e % O} ${s}-outer`
|
| 427 |
+
), t.append("rect").attr("x", a.x - 6).attr("y", a.y - 6).attr("width", 12).attr("height", 12).attr(
|
| 428 |
+
"class",
|
| 429 |
+
`commit ${r.id} commit${e % O} ${s}-inner`
|
| 430 |
+
);
|
| 431 |
+
else if (n === x.CHERRY_PICK)
|
| 432 |
+
t.append("circle").attr("cx", a.x).attr("cy", a.y).attr("r", 10).attr("class", `commit ${r.id} ${s}`), t.append("circle").attr("cx", a.x - 3).attr("cy", a.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${s}`), t.append("circle").attr("cx", a.x + 3).attr("cy", a.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${s}`), t.append("line").attr("x1", a.x + 3).attr("y1", a.y + 1).attr("x2", a.x).attr("y2", a.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${s}`), t.append("line").attr("x1", a.x - 3).attr("y1", a.y + 1).attr("x2", a.x).attr("y2", a.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${s}`);
|
| 433 |
+
else {
|
| 434 |
+
const c = t.append("circle");
|
| 435 |
+
if (c.attr("cx", a.x), c.attr("cy", a.y), c.attr("r", r.type === x.MERGE ? 9 : 10), c.attr("class", `commit ${r.id} commit${e % O}`), n === x.MERGE) {
|
| 436 |
+
const o = t.append("circle");
|
| 437 |
+
o.attr("cx", a.x), o.attr("cy", a.y), o.attr("r", 6), o.attr(
|
| 438 |
+
"class",
|
| 439 |
+
`commit ${s} ${r.id} commit${e % O}`
|
| 440 |
+
);
|
| 441 |
+
}
|
| 442 |
+
n === x.REVERSE && t.append("path").attr(
|
| 443 |
+
"d",
|
| 444 |
+
`M ${a.x - 5},${a.y - 5}L${a.x + 5},${a.y + 5}M${a.x - 5},${a.y + 5}L${a.x + 5},${a.y - 5}`
|
| 445 |
+
).attr("class", `commit ${s} ${r.id} commit${e % O}`);
|
| 446 |
+
}
|
| 447 |
+
}, "drawCommitBullet"), Vr = /* @__PURE__ */ h((t, r, a, s) => {
|
| 448 |
+
var e;
|
| 449 |
+
if (r.type !== x.CHERRY_PICK && (r.customId && r.type === x.MERGE || r.type !== x.MERGE) && (b != null && b.showCommitLabel)) {
|
| 450 |
+
const n = t.append("g"), c = n.insert("rect").attr("class", "commit-label-bkg"), o = n.append("text").attr("x", s).attr("y", a.y + 25).attr("class", "commit-label").text(r.id), $ = (e = o.node()) == null ? void 0 : e.getBBox();
|
| 451 |
+
if ($ && (c.attr("x", a.posWithOffset - $.width / 2 - L).attr("y", a.y + 13.5).attr("width", $.width + 2 * L).attr("height", $.height + 2 * L), u === "TB" || u === "BT" ? (c.attr("x", a.x - ($.width + 4 * k + 5)).attr("y", a.y - 12), o.attr("x", a.x - ($.width + 4 * k)).attr("y", a.y + $.height - 12)) : o.attr("x", a.posWithOffset - $.width / 2), b.rotateCommitLabel))
|
| 452 |
+
if (u === "TB" || u === "BT")
|
| 453 |
+
o.attr(
|
| 454 |
+
"transform",
|
| 455 |
+
"rotate(-45, " + a.x + ", " + a.y + ")"
|
| 456 |
+
), c.attr(
|
| 457 |
+
"transform",
|
| 458 |
+
"rotate(-45, " + a.x + ", " + a.y + ")"
|
| 459 |
+
);
|
| 460 |
+
else {
|
| 461 |
+
const l = -7.5 - ($.width + 10) / 25 * 9.5, f = 10 + $.width / 25 * 8.5;
|
| 462 |
+
n.attr(
|
| 463 |
+
"transform",
|
| 464 |
+
"translate(" + l + ", " + f + ") rotate(-45, " + s + ", " + a.y + ")"
|
| 465 |
+
);
|
| 466 |
+
}
|
| 467 |
+
}
|
| 468 |
+
}, "drawCommitLabel"), Xr = /* @__PURE__ */ h((t, r, a, s) => {
|
| 469 |
+
var e;
|
| 470 |
+
if (r.tags.length > 0) {
|
| 471 |
+
let n = 0, c = 0, o = 0;
|
| 472 |
+
const $ = [];
|
| 473 |
+
for (const l of r.tags.reverse()) {
|
| 474 |
+
const f = t.insert("polygon"), g = t.append("circle"), d = t.append("text").attr("y", a.y - 16 - n).attr("class", "tag-label").text(l), y = (e = d.node()) == null ? void 0 : e.getBBox();
|
| 475 |
+
if (!y)
|
| 476 |
+
throw new Error("Tag bbox not found");
|
| 477 |
+
c = Math.max(c, y.width), o = Math.max(o, y.height), d.attr("x", a.posWithOffset - y.width / 2), $.push({
|
| 478 |
+
tag: d,
|
| 479 |
+
hole: g,
|
| 480 |
+
rect: f,
|
| 481 |
+
yOffset: n
|
| 482 |
+
}), n += 20;
|
| 483 |
+
}
|
| 484 |
+
for (const { tag: l, hole: f, rect: g, yOffset: d } of $) {
|
| 485 |
+
const y = o / 2, p = a.y - 19.2 - d;
|
| 486 |
+
if (g.attr("class", "tag-label-bkg").attr(
|
| 487 |
+
"points",
|
| 488 |
+
`
|
| 489 |
+
${s - c / 2 - k / 2},${p + L}
|
| 490 |
+
${s - c / 2 - k / 2},${p - L}
|
| 491 |
+
${a.posWithOffset - c / 2 - k},${p - y - L}
|
| 492 |
+
${a.posWithOffset + c / 2 + k},${p - y - L}
|
| 493 |
+
${a.posWithOffset + c / 2 + k},${p + y + L}
|
| 494 |
+
${a.posWithOffset - c / 2 - k},${p + y + L}`
|
| 495 |
+
), f.attr("cy", p).attr("cx", s - c / 2 + k / 2).attr("r", 1.5).attr("class", "tag-hole"), u === "TB" || u === "BT") {
|
| 496 |
+
const m = s + d;
|
| 497 |
+
g.attr("class", "tag-label-bkg").attr(
|
| 498 |
+
"points",
|
| 499 |
+
`
|
| 500 |
+
${a.x},${m + 2}
|
| 501 |
+
${a.x},${m - 2}
|
| 502 |
+
${a.x + R},${m - y - 2}
|
| 503 |
+
${a.x + R + c + 4},${m - y - 2}
|
| 504 |
+
${a.x + R + c + 4},${m + y + 2}
|
| 505 |
+
${a.x + R},${m + y + 2}`
|
| 506 |
+
).attr("transform", "translate(12,12) rotate(45, " + a.x + "," + s + ")"), f.attr("cx", a.x + k / 2).attr("cy", m).attr("transform", "translate(12,12) rotate(45, " + a.x + "," + s + ")"), l.attr("x", a.x + 5).attr("y", m + 3).attr("transform", "translate(14,14) rotate(45, " + a.x + "," + s + ")");
|
| 507 |
+
}
|
| 508 |
+
}
|
| 509 |
+
}
|
| 510 |
+
}, "drawCommitTags"), Jr = /* @__PURE__ */ h((t) => {
|
| 511 |
+
switch (t.customType ?? t.type) {
|
| 512 |
+
case x.NORMAL:
|
| 513 |
+
return "commit-normal";
|
| 514 |
+
case x.REVERSE:
|
| 515 |
+
return "commit-reverse";
|
| 516 |
+
case x.HIGHLIGHT:
|
| 517 |
+
return "commit-highlight";
|
| 518 |
+
case x.MERGE:
|
| 519 |
+
return "commit-merge";
|
| 520 |
+
case x.CHERRY_PICK:
|
| 521 |
+
return "commit-cherry-pick";
|
| 522 |
+
default:
|
| 523 |
+
return "commit-normal";
|
| 524 |
+
}
|
| 525 |
+
}, "getCommitClassType"), Qr = /* @__PURE__ */ h((t, r, a, s) => {
|
| 526 |
+
const e = { x: 0, y: 0 };
|
| 527 |
+
if (t.parents.length > 0) {
|
| 528 |
+
const n = Q(t.parents);
|
| 529 |
+
if (n) {
|
| 530 |
+
const c = s.get(n) ?? e;
|
| 531 |
+
return r === "TB" ? c.y + I : r === "BT" ? (s.get(t.id) ?? e).y - I : c.x + I;
|
| 532 |
+
}
|
| 533 |
+
} else
|
| 534 |
+
return r === "TB" ? P : r === "BT" ? (s.get(t.id) ?? e).y - I : 0;
|
| 535 |
+
return 0;
|
| 536 |
+
}, "calculatePosition"), Zr = /* @__PURE__ */ h((t, r, a) => {
|
| 537 |
+
var c, o;
|
| 538 |
+
const s = u === "BT" && a ? r : r + R, e = u === "TB" || u === "BT" ? s : (c = C.get(t.branch)) == null ? void 0 : c.pos, n = u === "TB" || u === "BT" ? (o = C.get(t.branch)) == null ? void 0 : o.pos : s;
|
| 539 |
+
if (n === void 0 || e === void 0)
|
| 540 |
+
throw new Error(`Position were undefined for commit ${t.id}`);
|
| 541 |
+
return { x: n, y: e, posWithOffset: s };
|
| 542 |
+
}, "getCommitPosition"), K = /* @__PURE__ */ h((t, r, a) => {
|
| 543 |
+
if (!b)
|
| 544 |
+
throw new Error("GitGraph config not found");
|
| 545 |
+
const s = t.append("g").attr("class", "commit-bullets"), e = t.append("g").attr("class", "commit-labels");
|
| 546 |
+
let n = u === "TB" || u === "BT" ? P : 0;
|
| 547 |
+
const c = [...r.keys()], o = (b == null ? void 0 : b.parallelCommits) ?? !1, $ = /* @__PURE__ */ h((f, g) => {
|
| 548 |
+
var p, m;
|
| 549 |
+
const d = (p = r.get(f)) == null ? void 0 : p.seq, y = (m = r.get(g)) == null ? void 0 : m.seq;
|
| 550 |
+
return d !== void 0 && y !== void 0 ? d - y : 0;
|
| 551 |
+
}, "sortKeys");
|
| 552 |
+
let l = c.sort($);
|
| 553 |
+
u === "BT" && (o && Ar(l, r, n), l = l.reverse()), l.forEach((f) => {
|
| 554 |
+
var y;
|
| 555 |
+
const g = r.get(f);
|
| 556 |
+
if (!g)
|
| 557 |
+
throw new Error(`Commit not found for key ${f}`);
|
| 558 |
+
o && (n = Qr(g, u, n, E));
|
| 559 |
+
const d = Zr(g, n, o);
|
| 560 |
+
if (a) {
|
| 561 |
+
const p = Jr(g), m = g.customType ?? g.type, q = ((y = C.get(g.branch)) == null ? void 0 : y.index) ?? 0;
|
| 562 |
+
_r(s, g, d, p, q, m), Vr(e, g, d, n), Xr(e, g, d, n);
|
| 563 |
+
}
|
| 564 |
+
u === "TB" || u === "BT" ? E.set(g.id, { x: d.x, y: d.posWithOffset }) : E.set(g.id, { x: d.posWithOffset, y: d.y }), n = u === "BT" && o ? n + I : n + I + R, n > M && (M = n);
|
| 565 |
+
});
|
| 566 |
+
}, "drawCommits"), Fr = /* @__PURE__ */ h((t, r, a, s, e) => {
|
| 567 |
+
const c = (u === "TB" || u === "BT" ? a.x < s.x : a.y < s.y) ? r.branch : t.branch, o = /* @__PURE__ */ h((l) => l.branch === c, "isOnBranchToGetCurve"), $ = /* @__PURE__ */ h((l) => l.seq > t.seq && l.seq < r.seq, "isBetweenCommits");
|
| 568 |
+
return [...e.values()].some((l) => $(l) && o(l));
|
| 569 |
+
}, "shouldRerouteArrow"), H = /* @__PURE__ */ h((t, r, a = 0) => {
|
| 570 |
+
const s = t + Math.abs(t - r) / 2;
|
| 571 |
+
if (a > 5)
|
| 572 |
+
return s;
|
| 573 |
+
if (W.every((c) => Math.abs(c - s) >= 10))
|
| 574 |
+
return W.push(s), s;
|
| 575 |
+
const n = Math.abs(t - r);
|
| 576 |
+
return H(t, r - n / 5, a + 1);
|
| 577 |
+
}, "findLane"), Ur = /* @__PURE__ */ h((t, r, a, s) => {
|
| 578 |
+
var y, p, m, q, Y;
|
| 579 |
+
const e = E.get(r.id), n = E.get(a.id);
|
| 580 |
+
if (e === void 0 || n === void 0)
|
| 581 |
+
throw new Error(`Commit positions not found for commits ${r.id} and ${a.id}`);
|
| 582 |
+
const c = Fr(r, a, e, n, s);
|
| 583 |
+
let o = "", $ = "", l = 0, f = 0, g = (y = C.get(a.branch)) == null ? void 0 : y.index;
|
| 584 |
+
a.type === x.MERGE && r.id !== a.parents[0] && (g = (p = C.get(r.branch)) == null ? void 0 : p.index);
|
| 585 |
+
let d;
|
| 586 |
+
if (c) {
|
| 587 |
+
o = "A 10 10, 0, 0, 0,", $ = "A 10 10, 0, 0, 1,", l = 10, f = 10;
|
| 588 |
+
const T = e.y < n.y ? H(e.y, n.y) : H(n.y, e.y), v = e.x < n.x ? H(e.x, n.x) : H(n.x, e.x);
|
| 589 |
+
u === "TB" ? e.x < n.x ? d = `M ${e.x} ${e.y} L ${v - l} ${e.y} ${$} ${v} ${e.y + f} L ${v} ${n.y - l} ${o} ${v + f} ${n.y} L ${n.x} ${n.y}` : (g = (m = C.get(r.branch)) == null ? void 0 : m.index, d = `M ${e.x} ${e.y} L ${v + l} ${e.y} ${o} ${v} ${e.y + f} L ${v} ${n.y - l} ${$} ${v - f} ${n.y} L ${n.x} ${n.y}`) : u === "BT" ? e.x < n.x ? d = `M ${e.x} ${e.y} L ${v - l} ${e.y} ${o} ${v} ${e.y - f} L ${v} ${n.y + l} ${$} ${v + f} ${n.y} L ${n.x} ${n.y}` : (g = (q = C.get(r.branch)) == null ? void 0 : q.index, d = `M ${e.x} ${e.y} L ${v + l} ${e.y} ${$} ${v} ${e.y - f} L ${v} ${n.y + l} ${o} ${v - f} ${n.y} L ${n.x} ${n.y}`) : e.y < n.y ? d = `M ${e.x} ${e.y} L ${e.x} ${T - l} ${o} ${e.x + f} ${T} L ${n.x - l} ${T} ${$} ${n.x} ${T + f} L ${n.x} ${n.y}` : (g = (Y = C.get(r.branch)) == null ? void 0 : Y.index, d = `M ${e.x} ${e.y} L ${e.x} ${T + l} ${$} ${e.x + f} ${T} L ${n.x - l} ${T} ${o} ${n.x} ${T - f} L ${n.x} ${n.y}`);
|
| 590 |
+
} else
|
| 591 |
+
o = "A 20 20, 0, 0, 0,", $ = "A 20 20, 0, 0, 1,", l = 20, f = 20, u === "TB" ? (e.x < n.x && (a.type === x.MERGE && r.id !== a.parents[0] ? d = `M ${e.x} ${e.y} L ${e.x} ${n.y - l} ${o} ${e.x + f} ${n.y} L ${n.x} ${n.y}` : d = `M ${e.x} ${e.y} L ${n.x - l} ${e.y} ${$} ${n.x} ${e.y + f} L ${n.x} ${n.y}`), e.x > n.x && (o = "A 20 20, 0, 0, 0,", $ = "A 20 20, 0, 0, 1,", l = 20, f = 20, a.type === x.MERGE && r.id !== a.parents[0] ? d = `M ${e.x} ${e.y} L ${e.x} ${n.y - l} ${$} ${e.x - f} ${n.y} L ${n.x} ${n.y}` : d = `M ${e.x} ${e.y} L ${n.x + l} ${e.y} ${o} ${n.x} ${e.y + f} L ${n.x} ${n.y}`), e.x === n.x && (d = `M ${e.x} ${e.y} L ${n.x} ${n.y}`)) : u === "BT" ? (e.x < n.x && (a.type === x.MERGE && r.id !== a.parents[0] ? d = `M ${e.x} ${e.y} L ${e.x} ${n.y + l} ${$} ${e.x + f} ${n.y} L ${n.x} ${n.y}` : d = `M ${e.x} ${e.y} L ${n.x - l} ${e.y} ${o} ${n.x} ${e.y - f} L ${n.x} ${n.y}`), e.x > n.x && (o = "A 20 20, 0, 0, 0,", $ = "A 20 20, 0, 0, 1,", l = 20, f = 20, a.type === x.MERGE && r.id !== a.parents[0] ? d = `M ${e.x} ${e.y} L ${e.x} ${n.y + l} ${o} ${e.x - f} ${n.y} L ${n.x} ${n.y}` : d = `M ${e.x} ${e.y} L ${n.x - l} ${e.y} ${o} ${n.x} ${e.y - f} L ${n.x} ${n.y}`), e.x === n.x && (d = `M ${e.x} ${e.y} L ${n.x} ${n.y}`)) : (e.y < n.y && (a.type === x.MERGE && r.id !== a.parents[0] ? d = `M ${e.x} ${e.y} L ${n.x - l} ${e.y} ${$} ${n.x} ${e.y + f} L ${n.x} ${n.y}` : d = `M ${e.x} ${e.y} L ${e.x} ${n.y - l} ${o} ${e.x + f} ${n.y} L ${n.x} ${n.y}`), e.y > n.y && (a.type === x.MERGE && r.id !== a.parents[0] ? d = `M ${e.x} ${e.y} L ${n.x - l} ${e.y} ${o} ${n.x} ${e.y - f} L ${n.x} ${n.y}` : d = `M ${e.x} ${e.y} L ${e.x} ${n.y + l} ${$} ${e.x + f} ${n.y} L ${n.x} ${n.y}`), e.y === n.y && (d = `M ${e.x} ${e.y} L ${n.x} ${n.y}`));
|
| 592 |
+
if (d === void 0)
|
| 593 |
+
throw new Error("Line definition not found");
|
| 594 |
+
t.append("path").attr("d", d).attr("class", "arrow arrow" + g % O);
|
| 595 |
+
}, "drawArrow"), re = /* @__PURE__ */ h((t, r) => {
|
| 596 |
+
const a = t.append("g").attr("class", "commit-arrows");
|
| 597 |
+
[...r.keys()].forEach((s) => {
|
| 598 |
+
const e = r.get(s);
|
| 599 |
+
e.parents && e.parents.length > 0 && e.parents.forEach((n) => {
|
| 600 |
+
Ur(a, r.get(n), e, r);
|
| 601 |
+
});
|
| 602 |
+
});
|
| 603 |
+
}, "drawArrows"), ee = /* @__PURE__ */ h((t, r) => {
|
| 604 |
+
const a = t.append("g");
|
| 605 |
+
r.forEach((s, e) => {
|
| 606 |
+
var p;
|
| 607 |
+
const n = e % O, c = (p = C.get(s.name)) == null ? void 0 : p.pos;
|
| 608 |
+
if (c === void 0)
|
| 609 |
+
throw new Error(`Position not found for branch ${s.name}`);
|
| 610 |
+
const o = a.append("line");
|
| 611 |
+
o.attr("x1", 0), o.attr("y1", c), o.attr("x2", M), o.attr("y2", c), o.attr("class", "branch branch" + n), u === "TB" ? (o.attr("y1", P), o.attr("x1", c), o.attr("y2", M), o.attr("x2", c)) : u === "BT" && (o.attr("y1", M), o.attr("x1", c), o.attr("y2", P), o.attr("x2", c)), W.push(c);
|
| 612 |
+
const $ = s.name, l = J($), f = a.insert("rect"), d = a.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + n);
|
| 613 |
+
d.node().appendChild(l);
|
| 614 |
+
const y = l.getBBox();
|
| 615 |
+
f.attr("class", "branchLabelBkg label" + n).attr("rx", 4).attr("ry", 4).attr("x", -y.width - 4 - ((b == null ? void 0 : b.rotateCommitLabel) === !0 ? 30 : 0)).attr("y", -y.height / 2 + 8).attr("width", y.width + 18).attr("height", y.height + 4), d.attr(
|
| 616 |
+
"transform",
|
| 617 |
+
"translate(" + (-y.width - 14 - ((b == null ? void 0 : b.rotateCommitLabel) === !0 ? 30 : 0)) + ", " + (c - y.height / 2 - 1) + ")"
|
| 618 |
+
), u === "TB" ? (f.attr("x", c - y.width / 2 - 10).attr("y", 0), d.attr("transform", "translate(" + (c - y.width / 2 - 5) + ", 0)")) : u === "BT" ? (f.attr("x", c - y.width / 2 - 10).attr("y", M), d.attr("transform", "translate(" + (c - y.width / 2 - 5) + ", " + M + ")")) : f.attr("transform", "translate(-19, " + (c - y.height / 2) + ")");
|
| 619 |
+
});
|
| 620 |
+
}, "drawBranches"), te = /* @__PURE__ */ h(function(t, r, a, s, e) {
|
| 621 |
+
return C.set(t, { pos: r, index: a }), r += 50 + (e ? 40 : 0) + (u === "TB" || u === "BT" ? s.width / 2 : 0), r;
|
| 622 |
+
}, "setBranchPosition"), ae = /* @__PURE__ */ h(function(t, r, a, s) {
|
| 623 |
+
if (Sr(), w.debug("in gitgraph renderer", t + `
|
| 624 |
+
`, "id:", r, a), !b)
|
| 625 |
+
throw new Error("GitGraph config not found");
|
| 626 |
+
const e = b.rotateCommitLabel ?? !1, n = s.db;
|
| 627 |
+
G = n.getCommits();
|
| 628 |
+
const c = n.getBranchesAsObjArray();
|
| 629 |
+
u = n.getDirection();
|
| 630 |
+
const o = or(`[id="${r}"]`);
|
| 631 |
+
let $ = 0;
|
| 632 |
+
c.forEach((l, f) => {
|
| 633 |
+
var q;
|
| 634 |
+
const g = J(l.name), d = o.append("g"), y = d.insert("g").attr("class", "branchLabel"), p = y.insert("g").attr("class", "label branch-label");
|
| 635 |
+
(q = p.node()) == null || q.appendChild(g);
|
| 636 |
+
const m = g.getBBox();
|
| 637 |
+
$ = te(l.name, $, f, m, e), p.remove(), y.remove(), d.remove();
|
| 638 |
+
}), K(o, G, !1), b.showBranches && ee(o, c), re(o, G), K(o, G, !0), cr.insertTitle(
|
| 639 |
+
o,
|
| 640 |
+
"gitTitleText",
|
| 641 |
+
b.titleTopMargin ?? 0,
|
| 642 |
+
n.getDiagramTitle()
|
| 643 |
+
), ir(
|
| 644 |
+
void 0,
|
| 645 |
+
o,
|
| 646 |
+
b.diagramPadding,
|
| 647 |
+
b.useMaxWidth
|
| 648 |
+
);
|
| 649 |
+
}, "draw"), ne = {
|
| 650 |
+
draw: ae
|
| 651 |
+
}, se = /* @__PURE__ */ h((t) => `
|
| 652 |
+
.commit-id,
|
| 653 |
+
.commit-msg,
|
| 654 |
+
.branch-label {
|
| 655 |
+
fill: lightgrey;
|
| 656 |
+
color: lightgrey;
|
| 657 |
+
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
| 658 |
+
font-family: var(--mermaid-font-family);
|
| 659 |
+
}
|
| 660 |
+
${[0, 1, 2, 3, 4, 5, 6, 7].map(
|
| 661 |
+
(r) => `
|
| 662 |
+
.branch-label${r} { fill: ${t["gitBranchLabel" + r]}; }
|
| 663 |
+
.commit${r} { stroke: ${t["git" + r]}; fill: ${t["git" + r]}; }
|
| 664 |
+
.commit-highlight${r} { stroke: ${t["gitInv" + r]}; fill: ${t["gitInv" + r]}; }
|
| 665 |
+
.label${r} { fill: ${t["git" + r]}; }
|
| 666 |
+
.arrow${r} { stroke: ${t["git" + r]}; }
|
| 667 |
+
`
|
| 668 |
+
).join(`
|
| 669 |
+
`)}
|
| 670 |
+
|
| 671 |
+
.branch {
|
| 672 |
+
stroke-width: 1;
|
| 673 |
+
stroke: ${t.lineColor};
|
| 674 |
+
stroke-dasharray: 2;
|
| 675 |
+
}
|
| 676 |
+
.commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
|
| 677 |
+
.commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
|
| 678 |
+
.tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
|
| 679 |
+
.tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
|
| 680 |
+
.tag-hole { fill: ${t.textColor}; }
|
| 681 |
+
|
| 682 |
+
.commit-merge {
|
| 683 |
+
stroke: ${t.primaryColor};
|
| 684 |
+
fill: ${t.primaryColor};
|
| 685 |
+
}
|
| 686 |
+
.commit-reverse {
|
| 687 |
+
stroke: ${t.primaryColor};
|
| 688 |
+
fill: ${t.primaryColor};
|
| 689 |
+
stroke-width: 3;
|
| 690 |
+
}
|
| 691 |
+
.commit-highlight-outer {
|
| 692 |
+
}
|
| 693 |
+
.commit-highlight-inner {
|
| 694 |
+
stroke: ${t.primaryColor};
|
| 695 |
+
fill: ${t.primaryColor};
|
| 696 |
+
}
|
| 697 |
+
|
| 698 |
+
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
| 699 |
+
.gitTitleText {
|
| 700 |
+
text-anchor: middle;
|
| 701 |
+
font-size: 18px;
|
| 702 |
+
fill: ${t.textColor};
|
| 703 |
+
}
|
| 704 |
+
`, "getStyles"), oe = se, le = {
|
| 705 |
+
parser: Wr,
|
| 706 |
+
db: X,
|
| 707 |
+
renderer: ne,
|
| 708 |
+
styles: oe
|
| 709 |
+
};
|
| 710 |
+
export {
|
| 711 |
+
le as diagram
|
| 712 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/graph-By8AcOsS.js
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
| 3 |
+
var w = N(function(o) {
|
| 4 |
+
return v(P(o, 1, j, !0));
|
| 5 |
+
}), F = "\0", a = "\0", O = "";
|
| 6 |
+
class L {
|
| 7 |
+
constructor(e = {}) {
|
| 8 |
+
this._isDirected = Object.prototype.hasOwnProperty.call(e, "directed") ? e.directed : !0, this._isMultigraph = Object.prototype.hasOwnProperty.call(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.prototype.hasOwnProperty.call(e, "compound") ? e.compound : !1, this._label = void 0, this._defaultNodeLabelFn = f(void 0), this._defaultEdgeLabelFn = f(void 0), this._nodes = {}, this._isCompound && (this._parent = {}, this._children = {}, this._children[a] = {}), this._in = {}, this._preds = {}, this._out = {}, this._sucs = {}, this._edgeObjs = {}, this._edgeLabels = {};
|
| 9 |
+
}
|
| 10 |
+
/* === Graph functions ========= */
|
| 11 |
+
isDirected() {
|
| 12 |
+
return this._isDirected;
|
| 13 |
+
}
|
| 14 |
+
isMultigraph() {
|
| 15 |
+
return this._isMultigraph;
|
| 16 |
+
}
|
| 17 |
+
isCompound() {
|
| 18 |
+
return this._isCompound;
|
| 19 |
+
}
|
| 20 |
+
setGraph(e) {
|
| 21 |
+
return this._label = e, this;
|
| 22 |
+
}
|
| 23 |
+
graph() {
|
| 24 |
+
return this._label;
|
| 25 |
+
}
|
| 26 |
+
/* === Node functions ========== */
|
| 27 |
+
setDefaultNodeLabel(e) {
|
| 28 |
+
return b(e) || (e = f(e)), this._defaultNodeLabelFn = e, this;
|
| 29 |
+
}
|
| 30 |
+
nodeCount() {
|
| 31 |
+
return this._nodeCount;
|
| 32 |
+
}
|
| 33 |
+
nodes() {
|
| 34 |
+
return _(this._nodes);
|
| 35 |
+
}
|
| 36 |
+
sources() {
|
| 37 |
+
var e = this;
|
| 38 |
+
return g(this.nodes(), function(t) {
|
| 39 |
+
return E(e._in[t]);
|
| 40 |
+
});
|
| 41 |
+
}
|
| 42 |
+
sinks() {
|
| 43 |
+
var e = this;
|
| 44 |
+
return g(this.nodes(), function(t) {
|
| 45 |
+
return E(e._out[t]);
|
| 46 |
+
});
|
| 47 |
+
}
|
| 48 |
+
setNodes(e, t) {
|
| 49 |
+
var s = arguments, i = this;
|
| 50 |
+
return d(e, function(r) {
|
| 51 |
+
s.length > 1 ? i.setNode(r, t) : i.setNode(r);
|
| 52 |
+
}), this;
|
| 53 |
+
}
|
| 54 |
+
setNode(e, t) {
|
| 55 |
+
return Object.prototype.hasOwnProperty.call(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = a, this._children[e] = {}, this._children[a][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this);
|
| 56 |
+
}
|
| 57 |
+
node(e) {
|
| 58 |
+
return this._nodes[e];
|
| 59 |
+
}
|
| 60 |
+
hasNode(e) {
|
| 61 |
+
return Object.prototype.hasOwnProperty.call(this._nodes, e);
|
| 62 |
+
}
|
| 63 |
+
removeNode(e) {
|
| 64 |
+
if (Object.prototype.hasOwnProperty.call(this._nodes, e)) {
|
| 65 |
+
var t = (s) => this.removeEdge(this._edgeObjs[s]);
|
| 66 |
+
delete this._nodes[e], this._isCompound && (this._removeFromParentsChildList(e), delete this._parent[e], d(this.children(e), (s) => {
|
| 67 |
+
this.setParent(s);
|
| 68 |
+
}), delete this._children[e]), d(_(this._in[e]), t), delete this._in[e], delete this._preds[e], d(_(this._out[e]), t), delete this._out[e], delete this._sucs[e], --this._nodeCount;
|
| 69 |
+
}
|
| 70 |
+
return this;
|
| 71 |
+
}
|
| 72 |
+
setParent(e, t) {
|
| 73 |
+
if (!this._isCompound)
|
| 74 |
+
throw new Error("Cannot set parent in a non-compound graph");
|
| 75 |
+
if (l(t))
|
| 76 |
+
t = a;
|
| 77 |
+
else {
|
| 78 |
+
t += "";
|
| 79 |
+
for (var s = t; !l(s); s = this.parent(s))
|
| 80 |
+
if (s === e)
|
| 81 |
+
throw new Error("Setting " + t + " as parent of " + e + " would create a cycle");
|
| 82 |
+
this.setNode(t);
|
| 83 |
+
}
|
| 84 |
+
return this.setNode(e), this._removeFromParentsChildList(e), this._parent[e] = t, this._children[t][e] = !0, this;
|
| 85 |
+
}
|
| 86 |
+
_removeFromParentsChildList(e) {
|
| 87 |
+
delete this._children[this._parent[e]][e];
|
| 88 |
+
}
|
| 89 |
+
parent(e) {
|
| 90 |
+
if (this._isCompound) {
|
| 91 |
+
var t = this._parent[e];
|
| 92 |
+
if (t !== a)
|
| 93 |
+
return t;
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
children(e) {
|
| 97 |
+
if (l(e) && (e = a), this._isCompound) {
|
| 98 |
+
var t = this._children[e];
|
| 99 |
+
if (t)
|
| 100 |
+
return _(t);
|
| 101 |
+
} else {
|
| 102 |
+
if (e === a)
|
| 103 |
+
return this.nodes();
|
| 104 |
+
if (this.hasNode(e))
|
| 105 |
+
return [];
|
| 106 |
+
}
|
| 107 |
+
}
|
| 108 |
+
predecessors(e) {
|
| 109 |
+
var t = this._preds[e];
|
| 110 |
+
if (t)
|
| 111 |
+
return _(t);
|
| 112 |
+
}
|
| 113 |
+
successors(e) {
|
| 114 |
+
var t = this._sucs[e];
|
| 115 |
+
if (t)
|
| 116 |
+
return _(t);
|
| 117 |
+
}
|
| 118 |
+
neighbors(e) {
|
| 119 |
+
var t = this.predecessors(e);
|
| 120 |
+
if (t)
|
| 121 |
+
return w(t, this.successors(e));
|
| 122 |
+
}
|
| 123 |
+
isLeaf(e) {
|
| 124 |
+
var t;
|
| 125 |
+
return this.isDirected() ? t = this.successors(e) : t = this.neighbors(e), t.length === 0;
|
| 126 |
+
}
|
| 127 |
+
filterNodes(e) {
|
| 128 |
+
var t = new this.constructor({
|
| 129 |
+
directed: this._isDirected,
|
| 130 |
+
multigraph: this._isMultigraph,
|
| 131 |
+
compound: this._isCompound
|
| 132 |
+
});
|
| 133 |
+
t.setGraph(this.graph());
|
| 134 |
+
var s = this;
|
| 135 |
+
d(this._nodes, function(n, h) {
|
| 136 |
+
e(h) && t.setNode(h, n);
|
| 137 |
+
}), d(this._edgeObjs, function(n) {
|
| 138 |
+
t.hasNode(n.v) && t.hasNode(n.w) && t.setEdge(n, s.edge(n));
|
| 139 |
+
});
|
| 140 |
+
var i = {};
|
| 141 |
+
function r(n) {
|
| 142 |
+
var h = s.parent(n);
|
| 143 |
+
return h === void 0 || t.hasNode(h) ? (i[n] = h, h) : h in i ? i[h] : r(h);
|
| 144 |
+
}
|
| 145 |
+
return this._isCompound && d(t.nodes(), function(n) {
|
| 146 |
+
t.setParent(n, r(n));
|
| 147 |
+
}), t;
|
| 148 |
+
}
|
| 149 |
+
/* === Edge functions ========== */
|
| 150 |
+
setDefaultEdgeLabel(e) {
|
| 151 |
+
return b(e) || (e = f(e)), this._defaultEdgeLabelFn = e, this;
|
| 152 |
+
}
|
| 153 |
+
edgeCount() {
|
| 154 |
+
return this._edgeCount;
|
| 155 |
+
}
|
| 156 |
+
edges() {
|
| 157 |
+
return p(this._edgeObjs);
|
| 158 |
+
}
|
| 159 |
+
setPath(e, t) {
|
| 160 |
+
var s = this, i = arguments;
|
| 161 |
+
return D(e, function(r, n) {
|
| 162 |
+
return i.length > 1 ? s.setEdge(r, n, t) : s.setEdge(r, n), n;
|
| 163 |
+
}), this;
|
| 164 |
+
}
|
| 165 |
+
/*
|
| 166 |
+
* setEdge(v, w, [value, [name]])
|
| 167 |
+
* setEdge({ v, w, [name] }, [value])
|
| 168 |
+
*/
|
| 169 |
+
setEdge() {
|
| 170 |
+
var e, t, s, i, r = !1, n = arguments[0];
|
| 171 |
+
typeof n == "object" && n !== null && "v" in n ? (e = n.v, t = n.w, s = n.name, arguments.length === 2 && (i = arguments[1], r = !0)) : (e = n, t = arguments[1], s = arguments[3], arguments.length > 2 && (i = arguments[2], r = !0)), e = "" + e, t = "" + t, l(s) || (s = "" + s);
|
| 172 |
+
var h = c(this._isDirected, e, t, s);
|
| 173 |
+
if (Object.prototype.hasOwnProperty.call(this._edgeLabels, h))
|
| 174 |
+
return r && (this._edgeLabels[h] = i), this;
|
| 175 |
+
if (!l(s) && !this._isMultigraph)
|
| 176 |
+
throw new Error("Cannot set a named edge when isMultigraph = false");
|
| 177 |
+
this.setNode(e), this.setNode(t), this._edgeLabels[h] = r ? i : this._defaultEdgeLabelFn(e, t, s);
|
| 178 |
+
var u = M(this._isDirected, e, t, s);
|
| 179 |
+
return e = u.v, t = u.w, Object.freeze(u), this._edgeObjs[h] = u, C(this._preds[t], e), C(this._sucs[e], t), this._in[t][h] = u, this._out[e][h] = u, this._edgeCount++, this;
|
| 180 |
+
}
|
| 181 |
+
edge(e, t, s) {
|
| 182 |
+
var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s);
|
| 183 |
+
return this._edgeLabels[i];
|
| 184 |
+
}
|
| 185 |
+
hasEdge(e, t, s) {
|
| 186 |
+
var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s);
|
| 187 |
+
return Object.prototype.hasOwnProperty.call(this._edgeLabels, i);
|
| 188 |
+
}
|
| 189 |
+
removeEdge(e, t, s) {
|
| 190 |
+
var i = arguments.length === 1 ? m(this._isDirected, arguments[0]) : c(this._isDirected, e, t, s), r = this._edgeObjs[i];
|
| 191 |
+
return r && (e = r.v, t = r.w, delete this._edgeLabels[i], delete this._edgeObjs[i], y(this._preds[t], e), y(this._sucs[e], t), delete this._in[t][i], delete this._out[e][i], this._edgeCount--), this;
|
| 192 |
+
}
|
| 193 |
+
inEdges(e, t) {
|
| 194 |
+
var s = this._in[e];
|
| 195 |
+
if (s) {
|
| 196 |
+
var i = p(s);
|
| 197 |
+
return t ? g(i, function(r) {
|
| 198 |
+
return r.v === t;
|
| 199 |
+
}) : i;
|
| 200 |
+
}
|
| 201 |
+
}
|
| 202 |
+
outEdges(e, t) {
|
| 203 |
+
var s = this._out[e];
|
| 204 |
+
if (s) {
|
| 205 |
+
var i = p(s);
|
| 206 |
+
return t ? g(i, function(r) {
|
| 207 |
+
return r.w === t;
|
| 208 |
+
}) : i;
|
| 209 |
+
}
|
| 210 |
+
}
|
| 211 |
+
nodeEdges(e, t) {
|
| 212 |
+
var s = this.inEdges(e, t);
|
| 213 |
+
if (s)
|
| 214 |
+
return s.concat(this.outEdges(e, t));
|
| 215 |
+
}
|
| 216 |
+
}
|
| 217 |
+
L.prototype._nodeCount = 0;
|
| 218 |
+
L.prototype._edgeCount = 0;
|
| 219 |
+
function C(o, e) {
|
| 220 |
+
o[e] ? o[e]++ : o[e] = 1;
|
| 221 |
+
}
|
| 222 |
+
function y(o, e) {
|
| 223 |
+
--o[e] || delete o[e];
|
| 224 |
+
}
|
| 225 |
+
function c(o, e, t, s) {
|
| 226 |
+
var i = "" + e, r = "" + t;
|
| 227 |
+
if (!o && i > r) {
|
| 228 |
+
var n = i;
|
| 229 |
+
i = r, r = n;
|
| 230 |
+
}
|
| 231 |
+
return i + O + r + O + (l(s) ? F : s);
|
| 232 |
+
}
|
| 233 |
+
function M(o, e, t, s) {
|
| 234 |
+
var i = "" + e, r = "" + t;
|
| 235 |
+
if (!o && i > r) {
|
| 236 |
+
var n = i;
|
| 237 |
+
i = r, r = n;
|
| 238 |
+
}
|
| 239 |
+
var h = { v: i, w: r };
|
| 240 |
+
return s && (h.name = s), h;
|
| 241 |
+
}
|
| 242 |
+
function m(o, e) {
|
| 243 |
+
return c(o, e.v, e.w, e.name);
|
| 244 |
+
}
|
| 245 |
+
export {
|
| 246 |
+
L as G
|
| 247 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { E as s, T as x, I as o } from "./Index-DiS7y4tI.js";
|
| 2 |
+
export {
|
| 3 |
+
s as BaseExample,
|
| 4 |
+
x as BaseTextbox,
|
| 5 |
+
o as default
|
| 6 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/infoDiagram-LZPS564M-C96RKYDG.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { _ as e, l as s, H as o, e as i, I as g } from "./mermaid.core-CfPtPiLZ.js";
|
| 2 |
+
import { p } from "./radar-VG2SY3DT-zUt99CZd.js";
|
| 3 |
+
var v = {
|
| 4 |
+
parse: /* @__PURE__ */ e(async (r) => {
|
| 5 |
+
const a = await p("info", r);
|
| 6 |
+
s.debug(a);
|
| 7 |
+
}, "parse")
|
| 8 |
+
}, d = {
|
| 9 |
+
version: g.version + ""
|
| 10 |
+
}, c = /* @__PURE__ */ e(() => d.version, "getVersion"), m = {
|
| 11 |
+
getVersion: c
|
| 12 |
+
}, l = /* @__PURE__ */ e((r, a, n) => {
|
| 13 |
+
s.debug(`rendering info diagram
|
| 14 |
+
` + r);
|
| 15 |
+
const t = o(a);
|
| 16 |
+
i(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${n}`);
|
| 17 |
+
}, "draw"), f = { draw: l }, b = {
|
| 18 |
+
parser: v,
|
| 19 |
+
db: m,
|
| 20 |
+
renderer: f
|
| 21 |
+
};
|
| 22 |
+
export {
|
| 23 |
+
b as diagram
|
| 24 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/init-DjUOC4st.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
function t(e, a) {
|
| 2 |
+
switch (arguments.length) {
|
| 3 |
+
case 0:
|
| 4 |
+
break;
|
| 5 |
+
case 1:
|
| 6 |
+
this.range(e);
|
| 7 |
+
break;
|
| 8 |
+
default:
|
| 9 |
+
this.range(a).domain(e);
|
| 10 |
+
break;
|
| 11 |
+
}
|
| 12 |
+
return this;
|
| 13 |
+
}
|
| 14 |
+
export {
|
| 15 |
+
t as i
|
| 16 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/journeyDiagram-KRBQ73NG-_ijLByyQ.js
ADDED
|
@@ -0,0 +1,836 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { a as gt, g as lt, f as mt, d as xt } from "./chunk-WZLT4MVT-Cpjjsmu7.js";
|
| 2 |
+
import { g as kt } from "./chunk-UIWBPB2F-DCnPuFaH.js";
|
| 3 |
+
import { _ as n, g as _t, s as vt, a as bt, b as wt, q as Tt, p as St, c as R, d as G, e as $t, y as Mt } from "./mermaid.core-CfPtPiLZ.js";
|
| 4 |
+
import { d as et } from "./arc-CD-swOK-.js";
|
| 5 |
+
var U = function() {
|
| 6 |
+
var t = /* @__PURE__ */ n(function(h, i, a, l) {
|
| 7 |
+
for (a = a || {}, l = h.length; l--; a[h[l]] = i) ;
|
| 8 |
+
return a;
|
| 9 |
+
}, "o"), e = [6, 8, 10, 11, 12, 14, 16, 17, 18], s = [1, 9], c = [1, 10], r = [1, 11], f = [1, 12], u = [1, 13], y = [1, 14], g = {
|
| 10 |
+
trace: /* @__PURE__ */ n(function() {
|
| 11 |
+
}, "trace"),
|
| 12 |
+
yy: {},
|
| 13 |
+
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 },
|
| 14 |
+
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" },
|
| 15 |
+
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]],
|
| 16 |
+
performAction: /* @__PURE__ */ n(function(i, a, l, d, p, o, b) {
|
| 17 |
+
var k = o.length - 1;
|
| 18 |
+
switch (p) {
|
| 19 |
+
case 1:
|
| 20 |
+
return o[k - 1];
|
| 21 |
+
case 2:
|
| 22 |
+
this.$ = [];
|
| 23 |
+
break;
|
| 24 |
+
case 3:
|
| 25 |
+
o[k - 1].push(o[k]), this.$ = o[k - 1];
|
| 26 |
+
break;
|
| 27 |
+
case 4:
|
| 28 |
+
case 5:
|
| 29 |
+
this.$ = o[k];
|
| 30 |
+
break;
|
| 31 |
+
case 6:
|
| 32 |
+
case 7:
|
| 33 |
+
this.$ = [];
|
| 34 |
+
break;
|
| 35 |
+
case 8:
|
| 36 |
+
d.setDiagramTitle(o[k].substr(6)), this.$ = o[k].substr(6);
|
| 37 |
+
break;
|
| 38 |
+
case 9:
|
| 39 |
+
this.$ = o[k].trim(), d.setAccTitle(this.$);
|
| 40 |
+
break;
|
| 41 |
+
case 10:
|
| 42 |
+
case 11:
|
| 43 |
+
this.$ = o[k].trim(), d.setAccDescription(this.$);
|
| 44 |
+
break;
|
| 45 |
+
case 12:
|
| 46 |
+
d.addSection(o[k].substr(8)), this.$ = o[k].substr(8);
|
| 47 |
+
break;
|
| 48 |
+
case 13:
|
| 49 |
+
d.addTask(o[k - 1], o[k]), this.$ = "task";
|
| 50 |
+
break;
|
| 51 |
+
}
|
| 52 |
+
}, "anonymous"),
|
| 53 |
+
table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: s, 12: c, 14: r, 16: f, 17: u, 18: y }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 15, 11: s, 12: c, 14: r, 16: f, 17: u, 18: y }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, t(e, [2, 11]), t(e, [2, 12]), { 19: [1, 18] }, t(e, [2, 4]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 13])],
|
| 54 |
+
defaultActions: {},
|
| 55 |
+
parseError: /* @__PURE__ */ n(function(i, a) {
|
| 56 |
+
if (a.recoverable)
|
| 57 |
+
this.trace(i);
|
| 58 |
+
else {
|
| 59 |
+
var l = new Error(i);
|
| 60 |
+
throw l.hash = a, l;
|
| 61 |
+
}
|
| 62 |
+
}, "parseError"),
|
| 63 |
+
parse: /* @__PURE__ */ n(function(i) {
|
| 64 |
+
var a = this, l = [0], d = [], p = [null], o = [], b = this.table, k = "", C = 0, K = 0, dt = 2, Q = 1, yt = o.slice.call(arguments, 1), _ = Object.create(this.lexer), I = { yy: {} };
|
| 65 |
+
for (var O in this.yy)
|
| 66 |
+
Object.prototype.hasOwnProperty.call(this.yy, O) && (I.yy[O] = this.yy[O]);
|
| 67 |
+
_.setInput(i, I.yy), I.yy.lexer = _, I.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {});
|
| 68 |
+
var Y = _.yylloc;
|
| 69 |
+
o.push(Y);
|
| 70 |
+
var ft = _.options && _.options.ranges;
|
| 71 |
+
typeof I.yy.parseError == "function" ? this.parseError = I.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
| 72 |
+
function pt(w) {
|
| 73 |
+
l.length = l.length - 2 * w, p.length = p.length - w, o.length = o.length - w;
|
| 74 |
+
}
|
| 75 |
+
n(pt, "popStack");
|
| 76 |
+
function D() {
|
| 77 |
+
var w;
|
| 78 |
+
return w = d.pop() || _.lex() || Q, typeof w != "number" && (w instanceof Array && (d = w, w = d.pop()), w = a.symbols_[w] || w), w;
|
| 79 |
+
}
|
| 80 |
+
n(D, "lex");
|
| 81 |
+
for (var v, A, T, q, F = {}, N, M, tt, z; ; ) {
|
| 82 |
+
if (A = l[l.length - 1], this.defaultActions[A] ? T = this.defaultActions[A] : ((v === null || typeof v > "u") && (v = D()), T = b[A] && b[A][v]), typeof T > "u" || !T.length || !T[0]) {
|
| 83 |
+
var X = "";
|
| 84 |
+
z = [];
|
| 85 |
+
for (N in b[A])
|
| 86 |
+
this.terminals_[N] && N > dt && z.push("'" + this.terminals_[N] + "'");
|
| 87 |
+
_.showPosition ? X = "Parse error on line " + (C + 1) + `:
|
| 88 |
+
` + _.showPosition() + `
|
| 89 |
+
Expecting ` + z.join(", ") + ", got '" + (this.terminals_[v] || v) + "'" : X = "Parse error on line " + (C + 1) + ": Unexpected " + (v == Q ? "end of input" : "'" + (this.terminals_[v] || v) + "'"), this.parseError(X, {
|
| 90 |
+
text: _.match,
|
| 91 |
+
token: this.terminals_[v] || v,
|
| 92 |
+
line: _.yylineno,
|
| 93 |
+
loc: Y,
|
| 94 |
+
expected: z
|
| 95 |
+
});
|
| 96 |
+
}
|
| 97 |
+
if (T[0] instanceof Array && T.length > 1)
|
| 98 |
+
throw new Error("Parse Error: multiple actions possible at state: " + A + ", token: " + v);
|
| 99 |
+
switch (T[0]) {
|
| 100 |
+
case 1:
|
| 101 |
+
l.push(v), p.push(_.yytext), o.push(_.yylloc), l.push(T[1]), v = null, K = _.yyleng, k = _.yytext, C = _.yylineno, Y = _.yylloc;
|
| 102 |
+
break;
|
| 103 |
+
case 2:
|
| 104 |
+
if (M = this.productions_[T[1]][1], F.$ = p[p.length - M], F._$ = {
|
| 105 |
+
first_line: o[o.length - (M || 1)].first_line,
|
| 106 |
+
last_line: o[o.length - 1].last_line,
|
| 107 |
+
first_column: o[o.length - (M || 1)].first_column,
|
| 108 |
+
last_column: o[o.length - 1].last_column
|
| 109 |
+
}, ft && (F._$.range = [
|
| 110 |
+
o[o.length - (M || 1)].range[0],
|
| 111 |
+
o[o.length - 1].range[1]
|
| 112 |
+
]), q = this.performAction.apply(F, [
|
| 113 |
+
k,
|
| 114 |
+
K,
|
| 115 |
+
C,
|
| 116 |
+
I.yy,
|
| 117 |
+
T[1],
|
| 118 |
+
p,
|
| 119 |
+
o
|
| 120 |
+
].concat(yt)), typeof q < "u")
|
| 121 |
+
return q;
|
| 122 |
+
M && (l = l.slice(0, -1 * M * 2), p = p.slice(0, -1 * M), o = o.slice(0, -1 * M)), l.push(this.productions_[T[1]][0]), p.push(F.$), o.push(F._$), tt = b[l[l.length - 2]][l[l.length - 1]], l.push(tt);
|
| 123 |
+
break;
|
| 124 |
+
case 3:
|
| 125 |
+
return !0;
|
| 126 |
+
}
|
| 127 |
+
}
|
| 128 |
+
return !0;
|
| 129 |
+
}, "parse")
|
| 130 |
+
}, m = /* @__PURE__ */ function() {
|
| 131 |
+
var h = {
|
| 132 |
+
EOF: 1,
|
| 133 |
+
parseError: /* @__PURE__ */ n(function(a, l) {
|
| 134 |
+
if (this.yy.parser)
|
| 135 |
+
this.yy.parser.parseError(a, l);
|
| 136 |
+
else
|
| 137 |
+
throw new Error(a);
|
| 138 |
+
}, "parseError"),
|
| 139 |
+
// resets the lexer, sets new input
|
| 140 |
+
setInput: /* @__PURE__ */ n(function(i, a) {
|
| 141 |
+
return this.yy = a || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
| 142 |
+
first_line: 1,
|
| 143 |
+
first_column: 0,
|
| 144 |
+
last_line: 1,
|
| 145 |
+
last_column: 0
|
| 146 |
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
| 147 |
+
}, "setInput"),
|
| 148 |
+
// consumes and returns one char from the input
|
| 149 |
+
input: /* @__PURE__ */ n(function() {
|
| 150 |
+
var i = this._input[0];
|
| 151 |
+
this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
|
| 152 |
+
var a = i.match(/(?:\r\n?|\n).*/g);
|
| 153 |
+
return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
|
| 154 |
+
}, "input"),
|
| 155 |
+
// unshifts one char (or a string) into the input
|
| 156 |
+
unput: /* @__PURE__ */ n(function(i) {
|
| 157 |
+
var a = i.length, l = i.split(/(?:\r\n?|\n)/g);
|
| 158 |
+
this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
|
| 159 |
+
var d = this.match.split(/(?:\r\n?|\n)/g);
|
| 160 |
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
|
| 161 |
+
var p = this.yylloc.range;
|
| 162 |
+
return this.yylloc = {
|
| 163 |
+
first_line: this.yylloc.first_line,
|
| 164 |
+
last_line: this.yylineno + 1,
|
| 165 |
+
first_column: this.yylloc.first_column,
|
| 166 |
+
last_column: l ? (l.length === d.length ? this.yylloc.first_column : 0) + d[d.length - l.length].length - l[0].length : this.yylloc.first_column - a
|
| 167 |
+
}, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
|
| 168 |
+
}, "unput"),
|
| 169 |
+
// When called from action, caches matched text and appends it on next action
|
| 170 |
+
more: /* @__PURE__ */ n(function() {
|
| 171 |
+
return this._more = !0, this;
|
| 172 |
+
}, "more"),
|
| 173 |
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
| 174 |
+
reject: /* @__PURE__ */ n(function() {
|
| 175 |
+
if (this.options.backtrack_lexer)
|
| 176 |
+
this._backtrack = !0;
|
| 177 |
+
else
|
| 178 |
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
| 179 |
+
` + this.showPosition(), {
|
| 180 |
+
text: "",
|
| 181 |
+
token: null,
|
| 182 |
+
line: this.yylineno
|
| 183 |
+
});
|
| 184 |
+
return this;
|
| 185 |
+
}, "reject"),
|
| 186 |
+
// retain first n characters of the match
|
| 187 |
+
less: /* @__PURE__ */ n(function(i) {
|
| 188 |
+
this.unput(this.match.slice(i));
|
| 189 |
+
}, "less"),
|
| 190 |
+
// displays already matched input, i.e. for error messages
|
| 191 |
+
pastInput: /* @__PURE__ */ n(function() {
|
| 192 |
+
var i = this.matched.substr(0, this.matched.length - this.match.length);
|
| 193 |
+
return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
|
| 194 |
+
}, "pastInput"),
|
| 195 |
+
// displays upcoming input, i.e. for error messages
|
| 196 |
+
upcomingInput: /* @__PURE__ */ n(function() {
|
| 197 |
+
var i = this.match;
|
| 198 |
+
return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
|
| 199 |
+
}, "upcomingInput"),
|
| 200 |
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
| 201 |
+
showPosition: /* @__PURE__ */ n(function() {
|
| 202 |
+
var i = this.pastInput(), a = new Array(i.length + 1).join("-");
|
| 203 |
+
return i + this.upcomingInput() + `
|
| 204 |
+
` + a + "^";
|
| 205 |
+
}, "showPosition"),
|
| 206 |
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
| 207 |
+
test_match: /* @__PURE__ */ n(function(i, a) {
|
| 208 |
+
var l, d, p;
|
| 209 |
+
if (this.options.backtrack_lexer && (p = {
|
| 210 |
+
yylineno: this.yylineno,
|
| 211 |
+
yylloc: {
|
| 212 |
+
first_line: this.yylloc.first_line,
|
| 213 |
+
last_line: this.last_line,
|
| 214 |
+
first_column: this.yylloc.first_column,
|
| 215 |
+
last_column: this.yylloc.last_column
|
| 216 |
+
},
|
| 217 |
+
yytext: this.yytext,
|
| 218 |
+
match: this.match,
|
| 219 |
+
matches: this.matches,
|
| 220 |
+
matched: this.matched,
|
| 221 |
+
yyleng: this.yyleng,
|
| 222 |
+
offset: this.offset,
|
| 223 |
+
_more: this._more,
|
| 224 |
+
_input: this._input,
|
| 225 |
+
yy: this.yy,
|
| 226 |
+
conditionStack: this.conditionStack.slice(0),
|
| 227 |
+
done: this.done
|
| 228 |
+
}, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
|
| 229 |
+
first_line: this.yylloc.last_line,
|
| 230 |
+
last_line: this.yylineno + 1,
|
| 231 |
+
first_column: this.yylloc.last_column,
|
| 232 |
+
last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
|
| 233 |
+
}, this.yytext += i[0], this.match += i[0], this.matches = i, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(i[0].length), this.matched += i[0], l = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), l)
|
| 234 |
+
return l;
|
| 235 |
+
if (this._backtrack) {
|
| 236 |
+
for (var o in p)
|
| 237 |
+
this[o] = p[o];
|
| 238 |
+
return !1;
|
| 239 |
+
}
|
| 240 |
+
return !1;
|
| 241 |
+
}, "test_match"),
|
| 242 |
+
// return next match in input
|
| 243 |
+
next: /* @__PURE__ */ n(function() {
|
| 244 |
+
if (this.done)
|
| 245 |
+
return this.EOF;
|
| 246 |
+
this._input || (this.done = !0);
|
| 247 |
+
var i, a, l, d;
|
| 248 |
+
this._more || (this.yytext = "", this.match = "");
|
| 249 |
+
for (var p = this._currentRules(), o = 0; o < p.length; o++)
|
| 250 |
+
if (l = this._input.match(this.rules[p[o]]), l && (!a || l[0].length > a[0].length)) {
|
| 251 |
+
if (a = l, d = o, this.options.backtrack_lexer) {
|
| 252 |
+
if (i = this.test_match(l, p[o]), i !== !1)
|
| 253 |
+
return i;
|
| 254 |
+
if (this._backtrack) {
|
| 255 |
+
a = !1;
|
| 256 |
+
continue;
|
| 257 |
+
} else
|
| 258 |
+
return !1;
|
| 259 |
+
} else if (!this.options.flex)
|
| 260 |
+
break;
|
| 261 |
+
}
|
| 262 |
+
return a ? (i = this.test_match(a, p[d]), i !== !1 ? i : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
| 263 |
+
` + this.showPosition(), {
|
| 264 |
+
text: "",
|
| 265 |
+
token: null,
|
| 266 |
+
line: this.yylineno
|
| 267 |
+
});
|
| 268 |
+
}, "next"),
|
| 269 |
+
// return next match that has a token
|
| 270 |
+
lex: /* @__PURE__ */ n(function() {
|
| 271 |
+
var a = this.next();
|
| 272 |
+
return a || this.lex();
|
| 273 |
+
}, "lex"),
|
| 274 |
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
| 275 |
+
begin: /* @__PURE__ */ n(function(a) {
|
| 276 |
+
this.conditionStack.push(a);
|
| 277 |
+
}, "begin"),
|
| 278 |
+
// pop the previously active lexer condition state off the condition stack
|
| 279 |
+
popState: /* @__PURE__ */ n(function() {
|
| 280 |
+
var a = this.conditionStack.length - 1;
|
| 281 |
+
return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
| 282 |
+
}, "popState"),
|
| 283 |
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
| 284 |
+
_currentRules: /* @__PURE__ */ n(function() {
|
| 285 |
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
| 286 |
+
}, "_currentRules"),
|
| 287 |
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
| 288 |
+
topState: /* @__PURE__ */ n(function(a) {
|
| 289 |
+
return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
|
| 290 |
+
}, "topState"),
|
| 291 |
+
// alias for begin(condition)
|
| 292 |
+
pushState: /* @__PURE__ */ n(function(a) {
|
| 293 |
+
this.begin(a);
|
| 294 |
+
}, "pushState"),
|
| 295 |
+
// return the number of states currently on the stack
|
| 296 |
+
stateStackSize: /* @__PURE__ */ n(function() {
|
| 297 |
+
return this.conditionStack.length;
|
| 298 |
+
}, "stateStackSize"),
|
| 299 |
+
options: { "case-insensitive": !0 },
|
| 300 |
+
performAction: /* @__PURE__ */ n(function(a, l, d, p) {
|
| 301 |
+
switch (d) {
|
| 302 |
+
case 0:
|
| 303 |
+
break;
|
| 304 |
+
case 1:
|
| 305 |
+
break;
|
| 306 |
+
case 2:
|
| 307 |
+
return 10;
|
| 308 |
+
case 3:
|
| 309 |
+
break;
|
| 310 |
+
case 4:
|
| 311 |
+
break;
|
| 312 |
+
case 5:
|
| 313 |
+
return 4;
|
| 314 |
+
case 6:
|
| 315 |
+
return 11;
|
| 316 |
+
case 7:
|
| 317 |
+
return this.begin("acc_title"), 12;
|
| 318 |
+
case 8:
|
| 319 |
+
return this.popState(), "acc_title_value";
|
| 320 |
+
case 9:
|
| 321 |
+
return this.begin("acc_descr"), 14;
|
| 322 |
+
case 10:
|
| 323 |
+
return this.popState(), "acc_descr_value";
|
| 324 |
+
case 11:
|
| 325 |
+
this.begin("acc_descr_multiline");
|
| 326 |
+
break;
|
| 327 |
+
case 12:
|
| 328 |
+
this.popState();
|
| 329 |
+
break;
|
| 330 |
+
case 13:
|
| 331 |
+
return "acc_descr_multiline_value";
|
| 332 |
+
case 14:
|
| 333 |
+
return 17;
|
| 334 |
+
case 15:
|
| 335 |
+
return 18;
|
| 336 |
+
case 16:
|
| 337 |
+
return 19;
|
| 338 |
+
case 17:
|
| 339 |
+
return ":";
|
| 340 |
+
case 18:
|
| 341 |
+
return 6;
|
| 342 |
+
case 19:
|
| 343 |
+
return "INVALID";
|
| 344 |
+
}
|
| 345 |
+
}, "anonymous"),
|
| 346 |
+
rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/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, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
|
| 347 |
+
conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: !1 }, acc_descr: { rules: [10], inclusive: !1 }, acc_title: { rules: [8], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], inclusive: !0 } }
|
| 348 |
+
};
|
| 349 |
+
return h;
|
| 350 |
+
}();
|
| 351 |
+
g.lexer = m;
|
| 352 |
+
function x() {
|
| 353 |
+
this.yy = {};
|
| 354 |
+
}
|
| 355 |
+
return n(x, "Parser"), x.prototype = g, g.Parser = x, new x();
|
| 356 |
+
}();
|
| 357 |
+
U.parser = U;
|
| 358 |
+
var Et = U, V = "", Z = [], L = [], B = [], Ct = /* @__PURE__ */ n(function() {
|
| 359 |
+
Z.length = 0, L.length = 0, V = "", B.length = 0, Mt();
|
| 360 |
+
}, "clear"), Pt = /* @__PURE__ */ n(function(t) {
|
| 361 |
+
V = t, Z.push(t);
|
| 362 |
+
}, "addSection"), It = /* @__PURE__ */ n(function() {
|
| 363 |
+
return Z;
|
| 364 |
+
}, "getSections"), At = /* @__PURE__ */ n(function() {
|
| 365 |
+
let t = it();
|
| 366 |
+
const e = 100;
|
| 367 |
+
let s = 0;
|
| 368 |
+
for (; !t && s < e; )
|
| 369 |
+
t = it(), s++;
|
| 370 |
+
return L.push(...B), L;
|
| 371 |
+
}, "getTasks"), Ft = /* @__PURE__ */ n(function() {
|
| 372 |
+
const t = [];
|
| 373 |
+
return L.forEach((s) => {
|
| 374 |
+
s.people && t.push(...s.people);
|
| 375 |
+
}), [...new Set(t)].sort();
|
| 376 |
+
}, "updateActors"), Vt = /* @__PURE__ */ n(function(t, e) {
|
| 377 |
+
const s = e.substr(1).split(":");
|
| 378 |
+
let c = 0, r = [];
|
| 379 |
+
s.length === 1 ? (c = Number(s[0]), r = []) : (c = Number(s[0]), r = s[1].split(","));
|
| 380 |
+
const f = r.map((y) => y.trim()), u = {
|
| 381 |
+
section: V,
|
| 382 |
+
type: V,
|
| 383 |
+
people: f,
|
| 384 |
+
task: t,
|
| 385 |
+
score: c
|
| 386 |
+
};
|
| 387 |
+
B.push(u);
|
| 388 |
+
}, "addTask"), Rt = /* @__PURE__ */ n(function(t) {
|
| 389 |
+
const e = {
|
| 390 |
+
section: V,
|
| 391 |
+
type: V,
|
| 392 |
+
description: t,
|
| 393 |
+
task: t,
|
| 394 |
+
classes: []
|
| 395 |
+
};
|
| 396 |
+
L.push(e);
|
| 397 |
+
}, "addTaskOrg"), it = /* @__PURE__ */ n(function() {
|
| 398 |
+
const t = /* @__PURE__ */ n(function(s) {
|
| 399 |
+
return B[s].processed;
|
| 400 |
+
}, "compileTask");
|
| 401 |
+
let e = !0;
|
| 402 |
+
for (const [s, c] of B.entries())
|
| 403 |
+
t(s), e = e && c.processed;
|
| 404 |
+
return e;
|
| 405 |
+
}, "compileTasks"), Lt = /* @__PURE__ */ n(function() {
|
| 406 |
+
return Ft();
|
| 407 |
+
}, "getActors"), rt = {
|
| 408 |
+
getConfig: /* @__PURE__ */ n(() => R().journey, "getConfig"),
|
| 409 |
+
clear: Ct,
|
| 410 |
+
setDiagramTitle: St,
|
| 411 |
+
getDiagramTitle: Tt,
|
| 412 |
+
setAccTitle: wt,
|
| 413 |
+
getAccTitle: bt,
|
| 414 |
+
setAccDescription: vt,
|
| 415 |
+
getAccDescription: _t,
|
| 416 |
+
addSection: Pt,
|
| 417 |
+
getSections: It,
|
| 418 |
+
getTasks: At,
|
| 419 |
+
addTask: Vt,
|
| 420 |
+
addTaskOrg: Rt,
|
| 421 |
+
getActors: Lt
|
| 422 |
+
}, Bt = /* @__PURE__ */ n((t) => `.label {
|
| 423 |
+
font-family: ${t.fontFamily};
|
| 424 |
+
color: ${t.textColor};
|
| 425 |
+
}
|
| 426 |
+
.mouth {
|
| 427 |
+
stroke: #666;
|
| 428 |
+
}
|
| 429 |
+
|
| 430 |
+
line {
|
| 431 |
+
stroke: ${t.textColor}
|
| 432 |
+
}
|
| 433 |
+
|
| 434 |
+
.legend {
|
| 435 |
+
fill: ${t.textColor};
|
| 436 |
+
font-family: ${t.fontFamily};
|
| 437 |
+
}
|
| 438 |
+
|
| 439 |
+
.label text {
|
| 440 |
+
fill: #333;
|
| 441 |
+
}
|
| 442 |
+
.label {
|
| 443 |
+
color: ${t.textColor}
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
.face {
|
| 447 |
+
${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"};
|
| 448 |
+
stroke: #999;
|
| 449 |
+
}
|
| 450 |
+
|
| 451 |
+
.node rect,
|
| 452 |
+
.node circle,
|
| 453 |
+
.node ellipse,
|
| 454 |
+
.node polygon,
|
| 455 |
+
.node path {
|
| 456 |
+
fill: ${t.mainBkg};
|
| 457 |
+
stroke: ${t.nodeBorder};
|
| 458 |
+
stroke-width: 1px;
|
| 459 |
+
}
|
| 460 |
+
|
| 461 |
+
.node .label {
|
| 462 |
+
text-align: center;
|
| 463 |
+
}
|
| 464 |
+
.node.clickable {
|
| 465 |
+
cursor: pointer;
|
| 466 |
+
}
|
| 467 |
+
|
| 468 |
+
.arrowheadPath {
|
| 469 |
+
fill: ${t.arrowheadColor};
|
| 470 |
+
}
|
| 471 |
+
|
| 472 |
+
.edgePath .path {
|
| 473 |
+
stroke: ${t.lineColor};
|
| 474 |
+
stroke-width: 1.5px;
|
| 475 |
+
}
|
| 476 |
+
|
| 477 |
+
.flowchart-link {
|
| 478 |
+
stroke: ${t.lineColor};
|
| 479 |
+
fill: none;
|
| 480 |
+
}
|
| 481 |
+
|
| 482 |
+
.edgeLabel {
|
| 483 |
+
background-color: ${t.edgeLabelBackground};
|
| 484 |
+
rect {
|
| 485 |
+
opacity: 0.5;
|
| 486 |
+
}
|
| 487 |
+
text-align: center;
|
| 488 |
+
}
|
| 489 |
+
|
| 490 |
+
.cluster rect {
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
.cluster text {
|
| 494 |
+
fill: ${t.titleColor};
|
| 495 |
+
}
|
| 496 |
+
|
| 497 |
+
div.mermaidTooltip {
|
| 498 |
+
position: absolute;
|
| 499 |
+
text-align: center;
|
| 500 |
+
max-width: 200px;
|
| 501 |
+
padding: 2px;
|
| 502 |
+
font-family: ${t.fontFamily};
|
| 503 |
+
font-size: 12px;
|
| 504 |
+
background: ${t.tertiaryColor};
|
| 505 |
+
border: 1px solid ${t.border2};
|
| 506 |
+
border-radius: 2px;
|
| 507 |
+
pointer-events: none;
|
| 508 |
+
z-index: 100;
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
.task-type-0, .section-type-0 {
|
| 512 |
+
${t.fillType0 ? `fill: ${t.fillType0}` : ""};
|
| 513 |
+
}
|
| 514 |
+
.task-type-1, .section-type-1 {
|
| 515 |
+
${t.fillType0 ? `fill: ${t.fillType1}` : ""};
|
| 516 |
+
}
|
| 517 |
+
.task-type-2, .section-type-2 {
|
| 518 |
+
${t.fillType0 ? `fill: ${t.fillType2}` : ""};
|
| 519 |
+
}
|
| 520 |
+
.task-type-3, .section-type-3 {
|
| 521 |
+
${t.fillType0 ? `fill: ${t.fillType3}` : ""};
|
| 522 |
+
}
|
| 523 |
+
.task-type-4, .section-type-4 {
|
| 524 |
+
${t.fillType0 ? `fill: ${t.fillType4}` : ""};
|
| 525 |
+
}
|
| 526 |
+
.task-type-5, .section-type-5 {
|
| 527 |
+
${t.fillType0 ? `fill: ${t.fillType5}` : ""};
|
| 528 |
+
}
|
| 529 |
+
.task-type-6, .section-type-6 {
|
| 530 |
+
${t.fillType0 ? `fill: ${t.fillType6}` : ""};
|
| 531 |
+
}
|
| 532 |
+
.task-type-7, .section-type-7 {
|
| 533 |
+
${t.fillType0 ? `fill: ${t.fillType7}` : ""};
|
| 534 |
+
}
|
| 535 |
+
|
| 536 |
+
.actor-0 {
|
| 537 |
+
${t.actor0 ? `fill: ${t.actor0}` : ""};
|
| 538 |
+
}
|
| 539 |
+
.actor-1 {
|
| 540 |
+
${t.actor1 ? `fill: ${t.actor1}` : ""};
|
| 541 |
+
}
|
| 542 |
+
.actor-2 {
|
| 543 |
+
${t.actor2 ? `fill: ${t.actor2}` : ""};
|
| 544 |
+
}
|
| 545 |
+
.actor-3 {
|
| 546 |
+
${t.actor3 ? `fill: ${t.actor3}` : ""};
|
| 547 |
+
}
|
| 548 |
+
.actor-4 {
|
| 549 |
+
${t.actor4 ? `fill: ${t.actor4}` : ""};
|
| 550 |
+
}
|
| 551 |
+
.actor-5 {
|
| 552 |
+
${t.actor5 ? `fill: ${t.actor5}` : ""};
|
| 553 |
+
}
|
| 554 |
+
${kt()}
|
| 555 |
+
`, "getStyles"), jt = Bt, J = /* @__PURE__ */ n(function(t, e) {
|
| 556 |
+
return xt(t, e);
|
| 557 |
+
}, "drawRect"), Nt = /* @__PURE__ */ n(function(t, e) {
|
| 558 |
+
const c = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), r = t.append("g");
|
| 559 |
+
r.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), r.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
|
| 560 |
+
function f(g) {
|
| 561 |
+
const m = et().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
| 562 |
+
g.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
|
| 563 |
+
}
|
| 564 |
+
n(f, "smile");
|
| 565 |
+
function u(g) {
|
| 566 |
+
const m = et().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
|
| 567 |
+
g.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
|
| 568 |
+
}
|
| 569 |
+
n(u, "sad");
|
| 570 |
+
function y(g) {
|
| 571 |
+
g.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", e.cx - 5).attr("y1", e.cy + 7).attr("x2", e.cx + 5).attr("y2", e.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
|
| 572 |
+
}
|
| 573 |
+
return n(y, "ambivalent"), e.score > 3 ? f(r) : e.score < 3 ? u(r) : y(r), c;
|
| 574 |
+
}, "drawFace"), ot = /* @__PURE__ */ n(function(t, e) {
|
| 575 |
+
const s = t.append("circle");
|
| 576 |
+
return s.attr("cx", e.cx), s.attr("cy", e.cy), s.attr("class", "actor-" + e.pos), s.attr("fill", e.fill), s.attr("stroke", e.stroke), s.attr("r", e.r), s.class !== void 0 && s.attr("class", s.class), e.title !== void 0 && s.append("title").text(e.title), s;
|
| 577 |
+
}, "drawCircle"), ct = /* @__PURE__ */ n(function(t, e) {
|
| 578 |
+
return mt(t, e);
|
| 579 |
+
}, "drawText"), zt = /* @__PURE__ */ n(function(t, e) {
|
| 580 |
+
function s(r, f, u, y, g) {
|
| 581 |
+
return r + "," + f + " " + (r + u) + "," + f + " " + (r + u) + "," + (f + y - g) + " " + (r + u - g * 1.2) + "," + (f + y) + " " + r + "," + (f + y);
|
| 582 |
+
}
|
| 583 |
+
n(s, "genPoints");
|
| 584 |
+
const c = t.append("polygon");
|
| 585 |
+
c.attr("points", s(e.x, e.y, 50, 20, 7)), c.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, ct(t, e);
|
| 586 |
+
}, "drawLabel"), Wt = /* @__PURE__ */ n(function(t, e, s) {
|
| 587 |
+
const c = t.append("g"), r = lt();
|
| 588 |
+
r.x = e.x, r.y = e.y, r.fill = e.fill, r.width = s.width * e.taskCount + // width of the tasks
|
| 589 |
+
s.diagramMarginX * (e.taskCount - 1), r.height = s.height, r.class = "journey-section section-type-" + e.num, r.rx = 3, r.ry = 3, J(c, r), ht(s)(
|
| 590 |
+
e.text,
|
| 591 |
+
c,
|
| 592 |
+
r.x,
|
| 593 |
+
r.y,
|
| 594 |
+
r.width,
|
| 595 |
+
r.height,
|
| 596 |
+
{ class: "journey-section section-type-" + e.num },
|
| 597 |
+
s,
|
| 598 |
+
e.colour
|
| 599 |
+
);
|
| 600 |
+
}, "drawSection"), nt = -1, Ot = /* @__PURE__ */ n(function(t, e, s) {
|
| 601 |
+
const c = e.x + s.width / 2, r = t.append("g");
|
| 602 |
+
nt++;
|
| 603 |
+
const f = 300 + 5 * 30;
|
| 604 |
+
r.append("line").attr("id", "task" + nt).attr("x1", c).attr("y1", e.y).attr("x2", c).attr("y2", f).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Nt(r, {
|
| 605 |
+
cx: c,
|
| 606 |
+
cy: 300 + (5 - e.score) * 30,
|
| 607 |
+
score: e.score
|
| 608 |
+
});
|
| 609 |
+
const u = lt();
|
| 610 |
+
u.x = e.x, u.y = e.y, u.fill = e.fill, u.width = s.width, u.height = s.height, u.class = "task task-type-" + e.num, u.rx = 3, u.ry = 3, J(r, u);
|
| 611 |
+
let y = e.x + 14;
|
| 612 |
+
e.people.forEach((g) => {
|
| 613 |
+
const m = e.actors[g].color, x = {
|
| 614 |
+
cx: y,
|
| 615 |
+
cy: e.y,
|
| 616 |
+
r: 7,
|
| 617 |
+
fill: m,
|
| 618 |
+
stroke: "#000",
|
| 619 |
+
title: g,
|
| 620 |
+
pos: e.actors[g].position
|
| 621 |
+
};
|
| 622 |
+
ot(r, x), y += 10;
|
| 623 |
+
}), ht(s)(
|
| 624 |
+
e.task,
|
| 625 |
+
r,
|
| 626 |
+
u.x,
|
| 627 |
+
u.y,
|
| 628 |
+
u.width,
|
| 629 |
+
u.height,
|
| 630 |
+
{ class: "task" },
|
| 631 |
+
s,
|
| 632 |
+
e.colour
|
| 633 |
+
);
|
| 634 |
+
}, "drawTask"), Yt = /* @__PURE__ */ n(function(t, e) {
|
| 635 |
+
gt(t, e);
|
| 636 |
+
}, "drawBackgroundRect"), ht = /* @__PURE__ */ function() {
|
| 637 |
+
function t(r, f, u, y, g, m, x, h) {
|
| 638 |
+
const i = f.append("text").attr("x", u + g / 2).attr("y", y + m / 2 + 5).style("font-color", h).style("text-anchor", "middle").text(r);
|
| 639 |
+
c(i, x);
|
| 640 |
+
}
|
| 641 |
+
n(t, "byText");
|
| 642 |
+
function e(r, f, u, y, g, m, x, h, i) {
|
| 643 |
+
const { taskFontSize: a, taskFontFamily: l } = h, d = r.split(/<br\s*\/?>/gi);
|
| 644 |
+
for (let p = 0; p < d.length; p++) {
|
| 645 |
+
const o = p * a - a * (d.length - 1) / 2, b = f.append("text").attr("x", u + g / 2).attr("y", y).attr("fill", i).style("text-anchor", "middle").style("font-size", a).style("font-family", l);
|
| 646 |
+
b.append("tspan").attr("x", u + g / 2).attr("dy", o).text(d[p]), b.attr("y", y + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), c(b, x);
|
| 647 |
+
}
|
| 648 |
+
}
|
| 649 |
+
n(e, "byTspan");
|
| 650 |
+
function s(r, f, u, y, g, m, x, h) {
|
| 651 |
+
const i = f.append("switch"), l = i.append("foreignObject").attr("x", u).attr("y", y).attr("width", g).attr("height", m).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
|
| 652 |
+
l.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), e(r, i, u, y, g, m, x, h), c(l, x);
|
| 653 |
+
}
|
| 654 |
+
n(s, "byFo");
|
| 655 |
+
function c(r, f) {
|
| 656 |
+
for (const u in f)
|
| 657 |
+
u in f && r.attr(u, f[u]);
|
| 658 |
+
}
|
| 659 |
+
return n(c, "_setTextAttrs"), function(r) {
|
| 660 |
+
return r.textPlacement === "fo" ? s : r.textPlacement === "old" ? t : e;
|
| 661 |
+
};
|
| 662 |
+
}(), qt = /* @__PURE__ */ n(function(t) {
|
| 663 |
+
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");
|
| 664 |
+
}, "initGraphics"), j = {
|
| 665 |
+
drawRect: J,
|
| 666 |
+
drawCircle: ot,
|
| 667 |
+
drawSection: Wt,
|
| 668 |
+
drawText: ct,
|
| 669 |
+
drawLabel: zt,
|
| 670 |
+
drawTask: Ot,
|
| 671 |
+
drawBackgroundRect: Yt,
|
| 672 |
+
initGraphics: qt
|
| 673 |
+
}, Xt = /* @__PURE__ */ n(function(t) {
|
| 674 |
+
Object.keys(t).forEach(function(s) {
|
| 675 |
+
$[s] = t[s];
|
| 676 |
+
});
|
| 677 |
+
}, "setConf"), E = {}, W = 0;
|
| 678 |
+
function ut(t) {
|
| 679 |
+
const e = R().journey, s = e.maxLabelWidth;
|
| 680 |
+
W = 0;
|
| 681 |
+
let c = 60;
|
| 682 |
+
Object.keys(E).forEach((r) => {
|
| 683 |
+
const f = E[r].color, u = {
|
| 684 |
+
cx: 20,
|
| 685 |
+
cy: c,
|
| 686 |
+
r: 7,
|
| 687 |
+
fill: f,
|
| 688 |
+
stroke: "#000",
|
| 689 |
+
pos: E[r].position
|
| 690 |
+
};
|
| 691 |
+
j.drawCircle(t, u);
|
| 692 |
+
let y = t.append("text").attr("visibility", "hidden").text(r);
|
| 693 |
+
const g = y.node().getBoundingClientRect().width;
|
| 694 |
+
y.remove();
|
| 695 |
+
let m = [];
|
| 696 |
+
if (g <= s)
|
| 697 |
+
m = [r];
|
| 698 |
+
else {
|
| 699 |
+
const x = r.split(" ");
|
| 700 |
+
let h = "";
|
| 701 |
+
y = t.append("text").attr("visibility", "hidden"), x.forEach((i) => {
|
| 702 |
+
const a = h ? `${h} ${i}` : i;
|
| 703 |
+
if (y.text(a), y.node().getBoundingClientRect().width > s) {
|
| 704 |
+
if (h && m.push(h), h = i, y.text(i), y.node().getBoundingClientRect().width > s) {
|
| 705 |
+
let d = "";
|
| 706 |
+
for (const p of i)
|
| 707 |
+
d += p, y.text(d + "-"), y.node().getBoundingClientRect().width > s && (m.push(d.slice(0, -1) + "-"), d = p);
|
| 708 |
+
h = d;
|
| 709 |
+
}
|
| 710 |
+
} else
|
| 711 |
+
h = a;
|
| 712 |
+
}), h && m.push(h), y.remove();
|
| 713 |
+
}
|
| 714 |
+
m.forEach((x, h) => {
|
| 715 |
+
const i = {
|
| 716 |
+
x: 40,
|
| 717 |
+
y: c + 7 + h * 20,
|
| 718 |
+
fill: "#666",
|
| 719 |
+
text: x,
|
| 720 |
+
textMargin: e.boxTextMargin ?? 5
|
| 721 |
+
}, l = j.drawText(t, i).node().getBoundingClientRect().width;
|
| 722 |
+
l > W && l > e.leftMargin - l && (W = l);
|
| 723 |
+
}), c += Math.max(20, m.length * 20);
|
| 724 |
+
});
|
| 725 |
+
}
|
| 726 |
+
n(ut, "drawActorLegend");
|
| 727 |
+
var $ = R().journey, P = 0, Gt = /* @__PURE__ */ n(function(t, e, s, c) {
|
| 728 |
+
const r = R(), f = r.journey.titleColor, u = r.journey.titleFontSize, y = r.journey.titleFontFamily, g = r.securityLevel;
|
| 729 |
+
let m;
|
| 730 |
+
g === "sandbox" && (m = G("#i" + e));
|
| 731 |
+
const x = g === "sandbox" ? G(m.nodes()[0].contentDocument.body) : G("body");
|
| 732 |
+
S.init();
|
| 733 |
+
const h = x.select("#" + e);
|
| 734 |
+
j.initGraphics(h);
|
| 735 |
+
const i = c.db.getTasks(), a = c.db.getDiagramTitle(), l = c.db.getActors();
|
| 736 |
+
for (const C in E)
|
| 737 |
+
delete E[C];
|
| 738 |
+
let d = 0;
|
| 739 |
+
l.forEach((C) => {
|
| 740 |
+
E[C] = {
|
| 741 |
+
color: $.actorColours[d % $.actorColours.length],
|
| 742 |
+
position: d
|
| 743 |
+
}, d++;
|
| 744 |
+
}), ut(h), P = $.leftMargin + W, S.insert(0, 0, P, Object.keys(E).length * 50), Ht(h, i, 0);
|
| 745 |
+
const p = S.getBounds();
|
| 746 |
+
a && h.append("text").text(a).attr("x", P).attr("font-size", u).attr("font-weight", "bold").attr("y", 25).attr("fill", f).attr("font-family", y);
|
| 747 |
+
const o = p.stopy - p.starty + 2 * $.diagramMarginY, b = P + p.stopx + 2 * $.diagramMarginX;
|
| 748 |
+
$t(h, o, b, $.useMaxWidth), h.append("line").attr("x1", P).attr("y1", $.height * 4).attr("x2", b - P - 4).attr("y2", $.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
|
| 749 |
+
const k = a ? 70 : 0;
|
| 750 |
+
h.attr("viewBox", `${p.startx} -25 ${b} ${o + k}`), h.attr("preserveAspectRatio", "xMinYMin meet"), h.attr("height", o + k + 25);
|
| 751 |
+
}, "draw"), S = {
|
| 752 |
+
data: {
|
| 753 |
+
startx: void 0,
|
| 754 |
+
stopx: void 0,
|
| 755 |
+
starty: void 0,
|
| 756 |
+
stopy: void 0
|
| 757 |
+
},
|
| 758 |
+
verticalPos: 0,
|
| 759 |
+
sequenceItems: [],
|
| 760 |
+
init: /* @__PURE__ */ n(function() {
|
| 761 |
+
this.sequenceItems = [], this.data = {
|
| 762 |
+
startx: void 0,
|
| 763 |
+
stopx: void 0,
|
| 764 |
+
starty: void 0,
|
| 765 |
+
stopy: void 0
|
| 766 |
+
}, this.verticalPos = 0;
|
| 767 |
+
}, "init"),
|
| 768 |
+
updateVal: /* @__PURE__ */ n(function(t, e, s, c) {
|
| 769 |
+
t[e] === void 0 ? t[e] = s : t[e] = c(s, t[e]);
|
| 770 |
+
}, "updateVal"),
|
| 771 |
+
updateBounds: /* @__PURE__ */ n(function(t, e, s, c) {
|
| 772 |
+
const r = R().journey, f = this;
|
| 773 |
+
let u = 0;
|
| 774 |
+
function y(g) {
|
| 775 |
+
return /* @__PURE__ */ n(function(x) {
|
| 776 |
+
u++;
|
| 777 |
+
const h = f.sequenceItems.length - u + 1;
|
| 778 |
+
f.updateVal(x, "starty", e - h * r.boxMargin, Math.min), f.updateVal(x, "stopy", c + h * r.boxMargin, Math.max), f.updateVal(S.data, "startx", t - h * r.boxMargin, Math.min), f.updateVal(S.data, "stopx", s + h * r.boxMargin, Math.max), g !== "activation" && (f.updateVal(x, "startx", t - h * r.boxMargin, Math.min), f.updateVal(x, "stopx", s + h * r.boxMargin, Math.max), f.updateVal(S.data, "starty", e - h * r.boxMargin, Math.min), f.updateVal(S.data, "stopy", c + h * r.boxMargin, Math.max));
|
| 779 |
+
}, "updateItemBounds");
|
| 780 |
+
}
|
| 781 |
+
n(y, "updateFn"), this.sequenceItems.forEach(y());
|
| 782 |
+
}, "updateBounds"),
|
| 783 |
+
insert: /* @__PURE__ */ n(function(t, e, s, c) {
|
| 784 |
+
const r = Math.min(t, s), f = Math.max(t, s), u = Math.min(e, c), y = Math.max(e, c);
|
| 785 |
+
this.updateVal(S.data, "startx", r, Math.min), this.updateVal(S.data, "starty", u, Math.min), this.updateVal(S.data, "stopx", f, Math.max), this.updateVal(S.data, "stopy", y, Math.max), this.updateBounds(r, u, f, y);
|
| 786 |
+
}, "insert"),
|
| 787 |
+
bumpVerticalPos: /* @__PURE__ */ n(function(t) {
|
| 788 |
+
this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
|
| 789 |
+
}, "bumpVerticalPos"),
|
| 790 |
+
getVerticalPos: /* @__PURE__ */ n(function() {
|
| 791 |
+
return this.verticalPos;
|
| 792 |
+
}, "getVerticalPos"),
|
| 793 |
+
getBounds: /* @__PURE__ */ n(function() {
|
| 794 |
+
return this.data;
|
| 795 |
+
}, "getBounds")
|
| 796 |
+
}, H = $.sectionFills, st = $.sectionColours, Ht = /* @__PURE__ */ n(function(t, e, s) {
|
| 797 |
+
const c = R().journey;
|
| 798 |
+
let r = "";
|
| 799 |
+
const f = c.height * 2 + c.diagramMarginY, u = s + f;
|
| 800 |
+
let y = 0, g = "#CCC", m = "black", x = 0;
|
| 801 |
+
for (const [h, i] of e.entries()) {
|
| 802 |
+
if (r !== i.section) {
|
| 803 |
+
g = H[y % H.length], x = y % H.length, m = st[y % st.length];
|
| 804 |
+
let l = 0;
|
| 805 |
+
const d = i.section;
|
| 806 |
+
for (let o = h; o < e.length && e[o].section == d; o++)
|
| 807 |
+
l = l + 1;
|
| 808 |
+
const p = {
|
| 809 |
+
x: h * c.taskMargin + h * c.width + P,
|
| 810 |
+
y: 50,
|
| 811 |
+
text: i.section,
|
| 812 |
+
fill: g,
|
| 813 |
+
num: x,
|
| 814 |
+
colour: m,
|
| 815 |
+
taskCount: l
|
| 816 |
+
};
|
| 817 |
+
j.drawSection(t, p, c), r = i.section, y++;
|
| 818 |
+
}
|
| 819 |
+
const a = i.people.reduce((l, d) => (E[d] && (l[d] = E[d]), l), {});
|
| 820 |
+
i.x = h * c.taskMargin + h * c.width + P, i.y = u, i.width = c.diagramMarginX, i.height = c.diagramMarginY, i.colour = m, i.fill = g, i.num = x, i.actors = a, j.drawTask(t, i, c), S.insert(i.x, i.y, i.x + i.width + c.taskMargin, 300 + 5 * 30);
|
| 821 |
+
}
|
| 822 |
+
}, "drawTasks"), at = {
|
| 823 |
+
setConf: Xt,
|
| 824 |
+
draw: Gt
|
| 825 |
+
}, Qt = {
|
| 826 |
+
parser: Et,
|
| 827 |
+
db: rt,
|
| 828 |
+
renderer: at,
|
| 829 |
+
styles: jt,
|
| 830 |
+
init: /* @__PURE__ */ n((t) => {
|
|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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { g as fe } from "./chunk-UIWBPB2F-DCnPuFaH.js";
|
| 2 |
+
import { _ as c, l as te, c as W, H as ye, af as be, ag as me, ah as _e, V as Ee, F as K, i as G, t as ke, J as Se, W as Ne, X as le, Y as ce } from "./mermaid.core-CfPtPiLZ.js";
|
| 3 |
+
var $ = function() {
|
| 4 |
+
var t = /* @__PURE__ */ c(function(_, s, n, a) {
|
| 5 |
+
for (n = n || {}, a = _.length; a--; n[_[a]] = s) ;
|
| 6 |
+
return n;
|
| 7 |
+
}, "o"), g = [1, 4], d = [1, 13], r = [1, 12], p = [1, 15], E = [1, 16], f = [1, 20], h = [1, 19], L = [6, 7, 8], C = [1, 26], w = [1, 24], N = [1, 25], i = [6, 7, 11], H = [1, 31], x = [6, 7, 11, 24], P = [1, 6, 13, 16, 17, 20, 23], M = [1, 35], U = [1, 36], A = [1, 6, 7, 11, 13, 16, 17, 20, 23], j = [1, 38], V = {
|
| 8 |
+
trace: /* @__PURE__ */ c(function() {
|
| 9 |
+
}, "trace"),
|
| 10 |
+
yy: {},
|
| 11 |
+
symbols_: { error: 2, start: 3, mindMap: 4, spaceLines: 5, SPACELINE: 6, NL: 7, KANBAN: 8, document: 9, stop: 10, EOF: 11, statement: 12, SPACELIST: 13, node: 14, shapeData: 15, ICON: 16, CLASS: 17, nodeWithId: 18, nodeWithoutId: 19, NODE_DSTART: 20, NODE_DESCR: 21, NODE_DEND: 22, NODE_ID: 23, SHAPE_DATA: 24, $accept: 0, $end: 1 },
|
| 12 |
+
terminals_: { 2: "error", 6: "SPACELINE", 7: "NL", 8: "KANBAN", 11: "EOF", 13: "SPACELIST", 16: "ICON", 17: "CLASS", 20: "NODE_DSTART", 21: "NODE_DESCR", 22: "NODE_DEND", 23: "NODE_ID", 24: "SHAPE_DATA" },
|
| 13 |
+
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, 3], [12, 2], [12, 2], [12, 2], [12, 1], [12, 2], [12, 1], [12, 1], [12, 1], [12, 1], [14, 1], [14, 1], [19, 3], [18, 1], [18, 4], [15, 2], [15, 1]],
|
| 14 |
+
performAction: /* @__PURE__ */ c(function(s, n, a, o, u, e, B) {
|
| 15 |
+
var l = e.length - 1;
|
| 16 |
+
switch (u) {
|
| 17 |
+
case 6:
|
| 18 |
+
case 7:
|
| 19 |
+
return o;
|
| 20 |
+
case 8:
|
| 21 |
+
o.getLogger().trace("Stop NL ");
|
| 22 |
+
break;
|
| 23 |
+
case 9:
|
| 24 |
+
o.getLogger().trace("Stop EOF ");
|
| 25 |
+
break;
|
| 26 |
+
case 11:
|
| 27 |
+
o.getLogger().trace("Stop NL2 ");
|
| 28 |
+
break;
|
| 29 |
+
case 12:
|
| 30 |
+
o.getLogger().trace("Stop EOF2 ");
|
| 31 |
+
break;
|
| 32 |
+
case 15:
|
| 33 |
+
o.getLogger().info("Node: ", e[l - 1].id), o.addNode(e[l - 2].length, e[l - 1].id, e[l - 1].descr, e[l - 1].type, e[l]);
|
| 34 |
+
break;
|
| 35 |
+
case 16:
|
| 36 |
+
o.getLogger().info("Node: ", e[l].id), o.addNode(e[l - 1].length, e[l].id, e[l].descr, e[l].type);
|
| 37 |
+
break;
|
| 38 |
+
case 17:
|
| 39 |
+
o.getLogger().trace("Icon: ", e[l]), o.decorateNode({ icon: e[l] });
|
| 40 |
+
break;
|
| 41 |
+
case 18:
|
| 42 |
+
case 23:
|
| 43 |
+
o.decorateNode({ class: e[l] });
|
| 44 |
+
break;
|
| 45 |
+
case 19:
|
| 46 |
+
o.getLogger().trace("SPACELIST");
|
| 47 |
+
break;
|
| 48 |
+
case 20:
|
| 49 |
+
o.getLogger().trace("Node: ", e[l - 1].id), o.addNode(0, e[l - 1].id, e[l - 1].descr, e[l - 1].type, e[l]);
|
| 50 |
+
break;
|
| 51 |
+
case 21:
|
| 52 |
+
o.getLogger().trace("Node: ", e[l].id), o.addNode(0, e[l].id, e[l].descr, e[l].type);
|
| 53 |
+
break;
|
| 54 |
+
case 22:
|
| 55 |
+
o.decorateNode({ icon: e[l] });
|
| 56 |
+
break;
|
| 57 |
+
case 27:
|
| 58 |
+
o.getLogger().trace("node found ..", e[l - 2]), this.$ = { id: e[l - 1], descr: e[l - 1], type: o.getType(e[l - 2], e[l]) };
|
| 59 |
+
break;
|
| 60 |
+
case 28:
|
| 61 |
+
this.$ = { id: e[l], descr: e[l], type: 0 };
|
| 62 |
+
break;
|
| 63 |
+
case 29:
|
| 64 |
+
o.getLogger().trace("node found ..", e[l - 3]), this.$ = { id: e[l - 3], descr: e[l - 1], type: o.getType(e[l - 2], e[l]) };
|
| 65 |
+
break;
|
| 66 |
+
case 30:
|
| 67 |
+
this.$ = e[l - 1] + e[l];
|
| 68 |
+
break;
|
| 69 |
+
case 31:
|
| 70 |
+
this.$ = e[l];
|
| 71 |
+
break;
|
| 72 |
+
}
|
| 73 |
+
}, "anonymous"),
|
| 74 |
+
table: [{ 3: 1, 4: 2, 5: 3, 6: [1, 5], 8: g }, { 1: [3] }, { 1: [2, 1] }, { 4: 6, 6: [1, 7], 7: [1, 8], 8: g }, { 6: d, 7: [1, 10], 9: 9, 12: 11, 13: r, 14: 14, 16: p, 17: E, 18: 17, 19: 18, 20: f, 23: h }, t(L, [2, 3]), { 1: [2, 2] }, t(L, [2, 4]), t(L, [2, 5]), { 1: [2, 6], 6: d, 12: 21, 13: r, 14: 14, 16: p, 17: E, 18: 17, 19: 18, 20: f, 23: h }, { 6: d, 9: 22, 12: 11, 13: r, 14: 14, 16: p, 17: E, 18: 17, 19: 18, 20: f, 23: h }, { 6: C, 7: w, 10: 23, 11: N }, t(i, [2, 24], { 18: 17, 19: 18, 14: 27, 16: [1, 28], 17: [1, 29], 20: f, 23: h }), t(i, [2, 19]), t(i, [2, 21], { 15: 30, 24: H }), t(i, [2, 22]), t(i, [2, 23]), t(x, [2, 25]), t(x, [2, 26]), t(x, [2, 28], { 20: [1, 32] }), { 21: [1, 33] }, { 6: C, 7: w, 10: 34, 11: N }, { 1: [2, 7], 6: d, 12: 21, 13: r, 14: 14, 16: p, 17: E, 18: 17, 19: 18, 20: f, 23: h }, t(P, [2, 14], { 7: M, 11: U }), t(A, [2, 8]), t(A, [2, 9]), t(A, [2, 10]), t(i, [2, 16], { 15: 37, 24: H }), t(i, [2, 17]), t(i, [2, 18]), t(i, [2, 20], { 24: j }), t(x, [2, 31]), { 21: [1, 39] }, { 22: [1, 40] }, t(P, [2, 13], { 7: M, 11: U }), t(A, [2, 11]), t(A, [2, 12]), t(i, [2, 15], { 24: j }), t(x, [2, 30]), { 22: [1, 41] }, t(x, [2, 27]), t(x, [2, 29])],
|
| 75 |
+
defaultActions: { 2: [2, 1], 6: [2, 2] },
|
| 76 |
+
parseError: /* @__PURE__ */ c(function(s, n) {
|
| 77 |
+
if (n.recoverable)
|
| 78 |
+
this.trace(s);
|
| 79 |
+
else {
|
| 80 |
+
var a = new Error(s);
|
| 81 |
+
throw a.hash = n, a;
|
| 82 |
+
}
|
| 83 |
+
}, "parseError"),
|
| 84 |
+
parse: /* @__PURE__ */ c(function(s) {
|
| 85 |
+
var n = this, a = [0], o = [], u = [null], e = [], B = this.table, l = "", z = 0, ie = 0, ue = 2, re = 1, ge = e.slice.call(arguments, 1), b = Object.create(this.lexer), T = { yy: {} };
|
| 86 |
+
for (var J in this.yy)
|
| 87 |
+
Object.prototype.hasOwnProperty.call(this.yy, J) && (T.yy[J] = this.yy[J]);
|
| 88 |
+
b.setInput(s, T.yy), T.yy.lexer = b, T.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
|
| 89 |
+
var q = b.yylloc;
|
| 90 |
+
e.push(q);
|
| 91 |
+
var de = b.options && b.options.ranges;
|
| 92 |
+
typeof T.yy.parseError == "function" ? this.parseError = T.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
| 93 |
+
function pe(S) {
|
| 94 |
+
a.length = a.length - 2 * S, u.length = u.length - S, e.length = e.length - S;
|
| 95 |
+
}
|
| 96 |
+
c(pe, "popStack");
|
| 97 |
+
function ae() {
|
| 98 |
+
var S;
|
| 99 |
+
return S = o.pop() || b.lex() || re, typeof S != "number" && (S instanceof Array && (o = S, S = o.pop()), S = n.symbols_[S] || S), S;
|
| 100 |
+
}
|
| 101 |
+
c(ae, "lex");
|
| 102 |
+
for (var k, R, v, Q, F = {}, X, I, oe, Y; ; ) {
|
| 103 |
+
if (R = a[a.length - 1], this.defaultActions[R] ? v = this.defaultActions[R] : ((k === null || typeof k > "u") && (k = ae()), v = B[R] && B[R][k]), typeof v > "u" || !v.length || !v[0]) {
|
| 104 |
+
var Z = "";
|
| 105 |
+
Y = [];
|
| 106 |
+
for (X in B[R])
|
| 107 |
+
this.terminals_[X] && X > ue && Y.push("'" + this.terminals_[X] + "'");
|
| 108 |
+
b.showPosition ? Z = "Parse error on line " + (z + 1) + `:
|
| 109 |
+
` + b.showPosition() + `
|
| 110 |
+
Expecting ` + Y.join(", ") + ", got '" + (this.terminals_[k] || k) + "'" : Z = "Parse error on line " + (z + 1) + ": Unexpected " + (k == re ? "end of input" : "'" + (this.terminals_[k] || k) + "'"), this.parseError(Z, {
|
| 111 |
+
text: b.match,
|
| 112 |
+
token: this.terminals_[k] || k,
|
| 113 |
+
line: b.yylineno,
|
| 114 |
+
loc: q,
|
| 115 |
+
expected: Y
|
| 116 |
+
});
|
| 117 |
+
}
|
| 118 |
+
if (v[0] instanceof Array && v.length > 1)
|
| 119 |
+
throw new Error("Parse Error: multiple actions possible at state: " + R + ", token: " + k);
|
| 120 |
+
switch (v[0]) {
|
| 121 |
+
case 1:
|
| 122 |
+
a.push(k), u.push(b.yytext), e.push(b.yylloc), a.push(v[1]), k = null, ie = b.yyleng, l = b.yytext, z = b.yylineno, q = b.yylloc;
|
| 123 |
+
break;
|
| 124 |
+
case 2:
|
| 125 |
+
if (I = this.productions_[v[1]][1], F.$ = u[u.length - I], F._$ = {
|
| 126 |
+
first_line: e[e.length - (I || 1)].first_line,
|
| 127 |
+
last_line: e[e.length - 1].last_line,
|
| 128 |
+
first_column: e[e.length - (I || 1)].first_column,
|
| 129 |
+
last_column: e[e.length - 1].last_column
|
| 130 |
+
}, de && (F._$.range = [
|
| 131 |
+
e[e.length - (I || 1)].range[0],
|
| 132 |
+
e[e.length - 1].range[1]
|
| 133 |
+
]), Q = this.performAction.apply(F, [
|
| 134 |
+
l,
|
| 135 |
+
ie,
|
| 136 |
+
z,
|
| 137 |
+
T.yy,
|
| 138 |
+
v[1],
|
| 139 |
+
u,
|
| 140 |
+
e
|
| 141 |
+
].concat(ge)), typeof Q < "u")
|
| 142 |
+
return Q;
|
| 143 |
+
I && (a = a.slice(0, -1 * I * 2), u = u.slice(0, -1 * I), e = e.slice(0, -1 * I)), a.push(this.productions_[v[1]][0]), u.push(F.$), e.push(F._$), oe = B[a[a.length - 2]][a[a.length - 1]], a.push(oe);
|
| 144 |
+
break;
|
| 145 |
+
case 3:
|
| 146 |
+
return !0;
|
| 147 |
+
}
|
| 148 |
+
}
|
| 149 |
+
return !0;
|
| 150 |
+
}, "parse")
|
| 151 |
+
}, m = /* @__PURE__ */ function() {
|
| 152 |
+
var _ = {
|
| 153 |
+
EOF: 1,
|
| 154 |
+
parseError: /* @__PURE__ */ c(function(n, a) {
|
| 155 |
+
if (this.yy.parser)
|
| 156 |
+
this.yy.parser.parseError(n, a);
|
| 157 |
+
else
|
| 158 |
+
throw new Error(n);
|
| 159 |
+
}, "parseError"),
|
| 160 |
+
// resets the lexer, sets new input
|
| 161 |
+
setInput: /* @__PURE__ */ c(function(s, n) {
|
| 162 |
+
return this.yy = n || this.yy || {}, this._input = s, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
|
| 163 |
+
first_line: 1,
|
| 164 |
+
first_column: 0,
|
| 165 |
+
last_line: 1,
|
| 166 |
+
last_column: 0
|
| 167 |
+
}, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
|
| 168 |
+
}, "setInput"),
|
| 169 |
+
// consumes and returns one char from the input
|
| 170 |
+
input: /* @__PURE__ */ c(function() {
|
| 171 |
+
var s = this._input[0];
|
| 172 |
+
this.yytext += s, this.yyleng++, this.offset++, this.match += s, this.matched += s;
|
| 173 |
+
var n = s.match(/(?:\r\n?|\n).*/g);
|
| 174 |
+
return n ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), s;
|
| 175 |
+
}, "input"),
|
| 176 |
+
// unshifts one char (or a string) into the input
|
| 177 |
+
unput: /* @__PURE__ */ c(function(s) {
|
| 178 |
+
var n = s.length, a = s.split(/(?:\r\n?|\n)/g);
|
| 179 |
+
this._input = s + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - n), this.offset -= n;
|
| 180 |
+
var o = this.match.split(/(?:\r\n?|\n)/g);
|
| 181 |
+
this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), a.length - 1 && (this.yylineno -= a.length - 1);
|
| 182 |
+
var u = this.yylloc.range;
|
| 183 |
+
return this.yylloc = {
|
| 184 |
+
first_line: this.yylloc.first_line,
|
| 185 |
+
last_line: this.yylineno + 1,
|
| 186 |
+
first_column: this.yylloc.first_column,
|
| 187 |
+
last_column: a ? (a.length === o.length ? this.yylloc.first_column : 0) + o[o.length - a.length].length - a[0].length : this.yylloc.first_column - n
|
| 188 |
+
}, this.options.ranges && (this.yylloc.range = [u[0], u[0] + this.yyleng - n]), this.yyleng = this.yytext.length, this;
|
| 189 |
+
}, "unput"),
|
| 190 |
+
// When called from action, caches matched text and appends it on next action
|
| 191 |
+
more: /* @__PURE__ */ c(function() {
|
| 192 |
+
return this._more = !0, this;
|
| 193 |
+
}, "more"),
|
| 194 |
+
// When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
|
| 195 |
+
reject: /* @__PURE__ */ c(function() {
|
| 196 |
+
if (this.options.backtrack_lexer)
|
| 197 |
+
this._backtrack = !0;
|
| 198 |
+
else
|
| 199 |
+
return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
| 200 |
+
` + this.showPosition(), {
|
| 201 |
+
text: "",
|
| 202 |
+
token: null,
|
| 203 |
+
line: this.yylineno
|
| 204 |
+
});
|
| 205 |
+
return this;
|
| 206 |
+
}, "reject"),
|
| 207 |
+
// retain first n characters of the match
|
| 208 |
+
less: /* @__PURE__ */ c(function(s) {
|
| 209 |
+
this.unput(this.match.slice(s));
|
| 210 |
+
}, "less"),
|
| 211 |
+
// displays already matched input, i.e. for error messages
|
| 212 |
+
pastInput: /* @__PURE__ */ c(function() {
|
| 213 |
+
var s = this.matched.substr(0, this.matched.length - this.match.length);
|
| 214 |
+
return (s.length > 20 ? "..." : "") + s.substr(-20).replace(/\n/g, "");
|
| 215 |
+
}, "pastInput"),
|
| 216 |
+
// displays upcoming input, i.e. for error messages
|
| 217 |
+
upcomingInput: /* @__PURE__ */ c(function() {
|
| 218 |
+
var s = this.match;
|
| 219 |
+
return s.length < 20 && (s += this._input.substr(0, 20 - s.length)), (s.substr(0, 20) + (s.length > 20 ? "..." : "")).replace(/\n/g, "");
|
| 220 |
+
}, "upcomingInput"),
|
| 221 |
+
// displays the character position where the lexing error occurred, i.e. for error messages
|
| 222 |
+
showPosition: /* @__PURE__ */ c(function() {
|
| 223 |
+
var s = this.pastInput(), n = new Array(s.length + 1).join("-");
|
| 224 |
+
return s + this.upcomingInput() + `
|
| 225 |
+
` + n + "^";
|
| 226 |
+
}, "showPosition"),
|
| 227 |
+
// test the lexed token: return FALSE when not a match, otherwise return token
|
| 228 |
+
test_match: /* @__PURE__ */ c(function(s, n) {
|
| 229 |
+
var a, o, u;
|
| 230 |
+
if (this.options.backtrack_lexer && (u = {
|
| 231 |
+
yylineno: this.yylineno,
|
| 232 |
+
yylloc: {
|
| 233 |
+
first_line: this.yylloc.first_line,
|
| 234 |
+
last_line: this.last_line,
|
| 235 |
+
first_column: this.yylloc.first_column,
|
| 236 |
+
last_column: this.yylloc.last_column
|
| 237 |
+
},
|
| 238 |
+
yytext: this.yytext,
|
| 239 |
+
match: this.match,
|
| 240 |
+
matches: this.matches,
|
| 241 |
+
matched: this.matched,
|
| 242 |
+
yyleng: this.yyleng,
|
| 243 |
+
offset: this.offset,
|
| 244 |
+
_more: this._more,
|
| 245 |
+
_input: this._input,
|
| 246 |
+
yy: this.yy,
|
| 247 |
+
conditionStack: this.conditionStack.slice(0),
|
| 248 |
+
done: this.done
|
| 249 |
+
}, this.options.ranges && (u.yylloc.range = this.yylloc.range.slice(0))), o = s[0].match(/(?:\r\n?|\n).*/g), o && (this.yylineno += o.length), this.yylloc = {
|
| 250 |
+
first_line: this.yylloc.last_line,
|
| 251 |
+
last_line: this.yylineno + 1,
|
| 252 |
+
first_column: this.yylloc.last_column,
|
| 253 |
+
last_column: o ? o[o.length - 1].length - o[o.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + s[0].length
|
| 254 |
+
}, this.yytext += s[0], this.match += s[0], this.matches = s, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(s[0].length), this.matched += s[0], a = this.performAction.call(this, this.yy, this, n, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), a)
|
| 255 |
+
return a;
|
| 256 |
+
if (this._backtrack) {
|
| 257 |
+
for (var e in u)
|
| 258 |
+
this[e] = u[e];
|
| 259 |
+
return !1;
|
| 260 |
+
}
|
| 261 |
+
return !1;
|
| 262 |
+
}, "test_match"),
|
| 263 |
+
// return next match in input
|
| 264 |
+
next: /* @__PURE__ */ c(function() {
|
| 265 |
+
if (this.done)
|
| 266 |
+
return this.EOF;
|
| 267 |
+
this._input || (this.done = !0);
|
| 268 |
+
var s, n, a, o;
|
| 269 |
+
this._more || (this.yytext = "", this.match = "");
|
| 270 |
+
for (var u = this._currentRules(), e = 0; e < u.length; e++)
|
| 271 |
+
if (a = this._input.match(this.rules[u[e]]), a && (!n || a[0].length > n[0].length)) {
|
| 272 |
+
if (n = a, o = e, this.options.backtrack_lexer) {
|
| 273 |
+
if (s = this.test_match(a, u[e]), s !== !1)
|
| 274 |
+
return s;
|
| 275 |
+
if (this._backtrack) {
|
| 276 |
+
n = !1;
|
| 277 |
+
continue;
|
| 278 |
+
} else
|
| 279 |
+
return !1;
|
| 280 |
+
} else if (!this.options.flex)
|
| 281 |
+
break;
|
| 282 |
+
}
|
| 283 |
+
return n ? (s = this.test_match(n, u[o]), s !== !1 ? s : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
|
| 284 |
+
` + this.showPosition(), {
|
| 285 |
+
text: "",
|
| 286 |
+
token: null,
|
| 287 |
+
line: this.yylineno
|
| 288 |
+
});
|
| 289 |
+
}, "next"),
|
| 290 |
+
// return next match that has a token
|
| 291 |
+
lex: /* @__PURE__ */ c(function() {
|
| 292 |
+
var n = this.next();
|
| 293 |
+
return n || this.lex();
|
| 294 |
+
}, "lex"),
|
| 295 |
+
// activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
|
| 296 |
+
begin: /* @__PURE__ */ c(function(n) {
|
| 297 |
+
this.conditionStack.push(n);
|
| 298 |
+
}, "begin"),
|
| 299 |
+
// pop the previously active lexer condition state off the condition stack
|
| 300 |
+
popState: /* @__PURE__ */ c(function() {
|
| 301 |
+
var n = this.conditionStack.length - 1;
|
| 302 |
+
return n > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
| 303 |
+
}, "popState"),
|
| 304 |
+
// produce the lexer rule set which is active for the currently active lexer condition state
|
| 305 |
+
_currentRules: /* @__PURE__ */ c(function() {
|
| 306 |
+
return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
|
| 307 |
+
}, "_currentRules"),
|
| 308 |
+
// return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
|
| 309 |
+
topState: /* @__PURE__ */ c(function(n) {
|
| 310 |
+
return n = this.conditionStack.length - 1 - Math.abs(n || 0), n >= 0 ? this.conditionStack[n] : "INITIAL";
|
| 311 |
+
}, "topState"),
|
| 312 |
+
// alias for begin(condition)
|
| 313 |
+
pushState: /* @__PURE__ */ c(function(n) {
|
| 314 |
+
this.begin(n);
|
| 315 |
+
}, "pushState"),
|
| 316 |
+
// return the number of states currently on the stack
|
| 317 |
+
stateStackSize: /* @__PURE__ */ c(function() {
|
| 318 |
+
return this.conditionStack.length;
|
| 319 |
+
}, "stateStackSize"),
|
| 320 |
+
options: { "case-insensitive": !0 },
|
| 321 |
+
performAction: /* @__PURE__ */ c(function(n, a, o, u) {
|
| 322 |
+
switch (o) {
|
| 323 |
+
case 0:
|
| 324 |
+
return this.pushState("shapeData"), a.yytext = "", 24;
|
| 325 |
+
case 1:
|
| 326 |
+
return this.pushState("shapeDataStr"), 24;
|
| 327 |
+
case 2:
|
| 328 |
+
return this.popState(), 24;
|
| 329 |
+
case 3:
|
| 330 |
+
const e = /\n\s*/g;
|
| 331 |
+
return a.yytext = a.yytext.replace(e, "<br/>"), 24;
|
| 332 |
+
case 4:
|
| 333 |
+
return 24;
|
| 334 |
+
case 5:
|
| 335 |
+
this.popState();
|
| 336 |
+
break;
|
| 337 |
+
case 6:
|
| 338 |
+
return n.getLogger().trace("Found comment", a.yytext), 6;
|
| 339 |
+
case 7:
|
| 340 |
+
return 8;
|
| 341 |
+
case 8:
|
| 342 |
+
this.begin("CLASS");
|
| 343 |
+
break;
|
| 344 |
+
case 9:
|
| 345 |
+
return this.popState(), 17;
|
| 346 |
+
case 10:
|
| 347 |
+
this.popState();
|
| 348 |
+
break;
|
| 349 |
+
case 11:
|
| 350 |
+
n.getLogger().trace("Begin icon"), this.begin("ICON");
|
| 351 |
+
break;
|
| 352 |
+
case 12:
|
| 353 |
+
return n.getLogger().trace("SPACELINE"), 6;
|
| 354 |
+
case 13:
|
| 355 |
+
return 7;
|
| 356 |
+
case 14:
|
| 357 |
+
return 16;
|
| 358 |
+
case 15:
|
| 359 |
+
n.getLogger().trace("end icon"), this.popState();
|
| 360 |
+
break;
|
| 361 |
+
case 16:
|
| 362 |
+
return n.getLogger().trace("Exploding node"), this.begin("NODE"), 20;
|
| 363 |
+
case 17:
|
| 364 |
+
return n.getLogger().trace("Cloud"), this.begin("NODE"), 20;
|
| 365 |
+
case 18:
|
| 366 |
+
return n.getLogger().trace("Explosion Bang"), this.begin("NODE"), 20;
|
| 367 |
+
case 19:
|
| 368 |
+
return n.getLogger().trace("Cloud Bang"), this.begin("NODE"), 20;
|
| 369 |
+
case 20:
|
| 370 |
+
return this.begin("NODE"), 20;
|
| 371 |
+
case 21:
|
| 372 |
+
return this.begin("NODE"), 20;
|
| 373 |
+
case 22:
|
| 374 |
+
return this.begin("NODE"), 20;
|
| 375 |
+
case 23:
|
| 376 |
+
return this.begin("NODE"), 20;
|
| 377 |
+
case 24:
|
| 378 |
+
return 13;
|
| 379 |
+
case 25:
|
| 380 |
+
return 23;
|
| 381 |
+
case 26:
|
| 382 |
+
return 11;
|
| 383 |
+
case 27:
|
| 384 |
+
this.begin("NSTR2");
|
| 385 |
+
break;
|
| 386 |
+
case 28:
|
| 387 |
+
return "NODE_DESCR";
|
| 388 |
+
case 29:
|
| 389 |
+
this.popState();
|
| 390 |
+
break;
|
| 391 |
+
case 30:
|
| 392 |
+
n.getLogger().trace("Starting NSTR"), this.begin("NSTR");
|
| 393 |
+
break;
|
| 394 |
+
case 31:
|
| 395 |
+
return n.getLogger().trace("description:", a.yytext), "NODE_DESCR";
|
| 396 |
+
case 32:
|
| 397 |
+
this.popState();
|
| 398 |
+
break;
|
| 399 |
+
case 33:
|
| 400 |
+
return this.popState(), n.getLogger().trace("node end ))"), "NODE_DEND";
|
| 401 |
+
case 34:
|
| 402 |
+
return this.popState(), n.getLogger().trace("node end )"), "NODE_DEND";
|
| 403 |
+
case 35:
|
| 404 |
+
return this.popState(), n.getLogger().trace("node end ...", a.yytext), "NODE_DEND";
|
| 405 |
+
case 36:
|
| 406 |
+
return this.popState(), n.getLogger().trace("node end (("), "NODE_DEND";
|
| 407 |
+
case 37:
|
| 408 |
+
return this.popState(), n.getLogger().trace("node end (-"), "NODE_DEND";
|
| 409 |
+
case 38:
|
| 410 |
+
return this.popState(), n.getLogger().trace("node end (-"), "NODE_DEND";
|
| 411 |
+
case 39:
|
| 412 |
+
return this.popState(), n.getLogger().trace("node end (("), "NODE_DEND";
|
| 413 |
+
case 40:
|
| 414 |
+
return this.popState(), n.getLogger().trace("node end (("), "NODE_DEND";
|
| 415 |
+
case 41:
|
| 416 |
+
return n.getLogger().trace("Long description:", a.yytext), 21;
|
| 417 |
+
case 42:
|
| 418 |
+
return n.getLogger().trace("Long description:", a.yytext), 21;
|
| 419 |
+
}
|
| 420 |
+
}, "anonymous"),
|
| 421 |
+
rules: [/^(?:@\{)/i, /^(?:["])/i, /^(?:["])/i, /^(?:[^\"]+)/i, /^(?:[^}^"]+)/i, /^(?:\})/i, /^(?:\s*%%.*)/i, /^(?:kanban\b)/i, /^(?::::)/i, /^(?:.+)/i, /^(?:\n)/i, /^(?:::icon\()/i, /^(?:[\s]+[\n])/i, /^(?:[\n]+)/i, /^(?:[^\)]+)/i, /^(?:\))/i, /^(?:-\))/i, /^(?:\(-)/i, /^(?:\)\))/i, /^(?:\))/i, /^(?:\(\()/i, /^(?:\{\{)/i, /^(?:\()/i, /^(?:\[)/i, /^(?:[\s]+)/i, /^(?:[^\(\[\n\)\{\}@]+)/i, /^(?:$)/i, /^(?:["][`])/i, /^(?:[^`"]+)/i, /^(?:[`]["])/i, /^(?:["])/i, /^(?:[^"]+)/i, /^(?:["])/i, /^(?:[\)]\))/i, /^(?:[\)])/i, /^(?:[\]])/i, /^(?:\}\})/i, /^(?:\(-)/i, /^(?:-\))/i, /^(?:\(\()/i, /^(?:\()/i, /^(?:[^\)\]\(\}]+)/i, /^(?:.+(?!\(\())/i],
|
| 422 |
+
conditions: { shapeDataEndBracket: { rules: [], inclusive: !1 }, shapeDataStr: { rules: [2, 3], inclusive: !1 }, shapeData: { rules: [1, 4, 5], inclusive: !1 }, CLASS: { rules: [9, 10], inclusive: !1 }, ICON: { rules: [14, 15], inclusive: !1 }, NSTR2: { rules: [28, 29], inclusive: !1 }, NSTR: { rules: [31, 32], inclusive: !1 }, NODE: { rules: [27, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42], inclusive: !1 }, INITIAL: { rules: [0, 6, 7, 8, 11, 12, 13, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], inclusive: !0 } }
|
| 423 |
+
};
|
| 424 |
+
return _;
|
| 425 |
+
}();
|
| 426 |
+
V.lexer = m;
|
| 427 |
+
function O() {
|
| 428 |
+
this.yy = {};
|
| 429 |
+
}
|
| 430 |
+
return c(O, "Parser"), O.prototype = V, V.Parser = O, new O();
|
| 431 |
+
}();
|
| 432 |
+
$.parser = $;
|
| 433 |
+
var xe = $, D = [], ne = [], ee = 0, se = {}, ve = /* @__PURE__ */ c(() => {
|
| 434 |
+
D = [], ne = [], ee = 0, se = {};
|
| 435 |
+
}, "clear"), De = /* @__PURE__ */ c((t) => {
|
| 436 |
+
if (D.length === 0)
|
| 437 |
+
return null;
|
| 438 |
+
const g = D[0].level;
|
| 439 |
+
let d = null;
|
| 440 |
+
for (let r = D.length - 1; r >= 0; r--)
|
| 441 |
+
if (D[r].level === g && !d && (d = D[r]), D[r].level < g)
|
| 442 |
+
throw new Error('Items without section detected, found section ("' + D[r].label + '")');
|
| 443 |
+
return t === (d == null ? void 0 : d.level) ? null : d;
|
| 444 |
+
}, "getSection"), he = /* @__PURE__ */ c(function() {
|
| 445 |
+
return ne;
|
| 446 |
+
}, "getSections"), Le = /* @__PURE__ */ c(function() {
|
| 447 |
+
const t = [], g = [], d = he(), r = W();
|
| 448 |
+
for (const p of d) {
|
| 449 |
+
const E = {
|
| 450 |
+
id: p.id,
|
| 451 |
+
label: G(p.label ?? "", r),
|
| 452 |
+
isGroup: !0,
|
| 453 |
+
ticket: p.ticket,
|
| 454 |
+
shape: "kanbanSection",
|
| 455 |
+
level: p.level,
|
| 456 |
+
look: r.look
|
| 457 |
+
};
|
| 458 |
+
g.push(E);
|
| 459 |
+
const f = D.filter((h) => h.parentId === p.id);
|
| 460 |
+
for (const h of f) {
|
| 461 |
+
const L = {
|
| 462 |
+
id: h.id,
|
| 463 |
+
parentId: p.id,
|
| 464 |
+
label: G(h.label ?? "", r),
|
| 465 |
+
isGroup: !1,
|
| 466 |
+
ticket: h == null ? void 0 : h.ticket,
|
| 467 |
+
priority: h == null ? void 0 : h.priority,
|
| 468 |
+
assigned: h == null ? void 0 : h.assigned,
|
| 469 |
+
icon: h == null ? void 0 : h.icon,
|
| 470 |
+
shape: "kanbanItem",
|
| 471 |
+
level: h.level,
|
| 472 |
+
rx: 5,
|
| 473 |
+
ry: 5,
|
| 474 |
+
cssStyles: ["text-align: left"]
|
| 475 |
+
};
|
| 476 |
+
g.push(L);
|
| 477 |
+
}
|
| 478 |
+
}
|
| 479 |
+
return { nodes: g, edges: t, other: {}, config: W() };
|
| 480 |
+
}, "getData"), Oe = /* @__PURE__ */ c((t, g, d, r, p) => {
|
| 481 |
+
var C, w;
|
| 482 |
+
const E = W();
|
| 483 |
+
let f = ((C = E.mindmap) == null ? void 0 : C.padding) ?? K.mindmap.padding;
|
| 484 |
+
switch (r) {
|
| 485 |
+
case y.ROUNDED_RECT:
|
| 486 |
+
case y.RECT:
|
| 487 |
+
case y.HEXAGON:
|
| 488 |
+
f *= 2;
|
| 489 |
+
}
|
| 490 |
+
const h = {
|
| 491 |
+
id: G(g, E) || "kbn" + ee++,
|
| 492 |
+
level: t,
|
| 493 |
+
label: G(d, E),
|
| 494 |
+
width: ((w = E.mindmap) == null ? void 0 : w.maxNodeWidth) ?? K.mindmap.maxNodeWidth,
|
| 495 |
+
padding: f,
|
| 496 |
+
isGroup: !1
|
| 497 |
+
};
|
| 498 |
+
if (p !== void 0) {
|
| 499 |
+
let N;
|
| 500 |
+
p.includes(`
|
| 501 |
+
`) ? N = p + `
|
| 502 |
+
` : N = `{
|
| 503 |
+
` + p + `
|
| 504 |
+
}`;
|
| 505 |
+
const i = ke(N, { schema: Se });
|
| 506 |
+
if (i.shape && (i.shape !== i.shape.toLowerCase() || i.shape.includes("_")))
|
| 507 |
+
throw new Error(`No such shape: ${i.shape}. Shape names should be lowercase.`);
|
| 508 |
+
i != null && i.shape && i.shape === "kanbanItem" && (h.shape = i == null ? void 0 : i.shape), i != null && i.label && (h.label = i == null ? void 0 : i.label), i != null && i.icon && (h.icon = i == null ? void 0 : i.icon.toString()), i != null && i.assigned && (h.assigned = i == null ? void 0 : i.assigned.toString()), i != null && i.ticket && (h.ticket = i == null ? void 0 : i.ticket.toString()), i != null && i.priority && (h.priority = i == null ? void 0 : i.priority);
|
| 509 |
+
}
|
| 510 |
+
const L = De(t);
|
| 511 |
+
L ? h.parentId = L.id || "kbn" + ee++ : ne.push(h), D.push(h);
|
| 512 |
+
}, "addNode"), y = {
|
| 513 |
+
DEFAULT: 0,
|
| 514 |
+
NO_BORDER: 0,
|
| 515 |
+
ROUNDED_RECT: 1,
|
| 516 |
+
RECT: 2,
|
| 517 |
+
CIRCLE: 3,
|
| 518 |
+
CLOUD: 4,
|
| 519 |
+
BANG: 5,
|
| 520 |
+
HEXAGON: 6
|
| 521 |
+
}, Ie = /* @__PURE__ */ c((t, g) => {
|
| 522 |
+
switch (te.debug("In get type", t, g), t) {
|
| 523 |
+
case "[":
|
| 524 |
+
return y.RECT;
|
| 525 |
+
case "(":
|
| 526 |
+
return g === ")" ? y.ROUNDED_RECT : y.CLOUD;
|
| 527 |
+
case "((":
|
| 528 |
+
return y.CIRCLE;
|
| 529 |
+
case ")":
|
| 530 |
+
return y.CLOUD;
|
| 531 |
+
case "))":
|
| 532 |
+
return y.BANG;
|
| 533 |
+
case "{{":
|
| 534 |
+
return y.HEXAGON;
|
| 535 |
+
default:
|
| 536 |
+
return y.DEFAULT;
|
| 537 |
+
}
|
| 538 |
+
}, "getType"), Ce = /* @__PURE__ */ c((t, g) => {
|
| 539 |
+
se[t] = g;
|
| 540 |
+
}, "setElementForId"), we = /* @__PURE__ */ c((t) => {
|
| 541 |
+
if (!t)
|
| 542 |
+
return;
|
| 543 |
+
const g = W(), d = D[D.length - 1];
|
| 544 |
+
t.icon && (d.icon = G(t.icon, g)), t.class && (d.cssClasses = G(t.class, g));
|
| 545 |
+
}, "decorateNode"), Ae = /* @__PURE__ */ c((t) => {
|
| 546 |
+
switch (t) {
|
| 547 |
+
case y.DEFAULT:
|
| 548 |
+
return "no-border";
|
| 549 |
+
case y.RECT:
|
| 550 |
+
return "rect";
|
| 551 |
+
case y.ROUNDED_RECT:
|
| 552 |
+
return "rounded-rect";
|
| 553 |
+
case y.CIRCLE:
|
| 554 |
+
return "circle";
|
| 555 |
+
case y.CLOUD:
|
| 556 |
+
return "cloud";
|
| 557 |
+
case y.BANG:
|
| 558 |
+
return "bang";
|
| 559 |
+
case y.HEXAGON:
|
| 560 |
+
return "hexgon";
|
| 561 |
+
default:
|
| 562 |
+
return "no-border";
|
| 563 |
+
}
|
| 564 |
+
}, "type2Str"), Te = /* @__PURE__ */ c(() => te, "getLogger"), Re = /* @__PURE__ */ c((t) => se[t], "getElementById"), Pe = {
|
| 565 |
+
clear: ve,
|
| 566 |
+
addNode: Oe,
|
| 567 |
+
getSections: he,
|
| 568 |
+
getData: Le,
|
| 569 |
+
nodeType: y,
|
| 570 |
+
getType: Ie,
|
| 571 |
+
setElementForId: Ce,
|
| 572 |
+
decorateNode: we,
|
| 573 |
+
type2Str: Ae,
|
| 574 |
+
getLogger: Te,
|
| 575 |
+
getElementById: Re
|
| 576 |
+
}, Ve = Pe, Be = /* @__PURE__ */ c(async (t, g, d, r) => {
|
| 577 |
+
var M, U, A, j, V;
|
| 578 |
+
te.debug(`Rendering kanban diagram
|
| 579 |
+
` + t);
|
| 580 |
+
const E = r.db.getData(), f = W();
|
| 581 |
+
f.htmlLabels = !1;
|
| 582 |
+
const h = ye(g), L = h.append("g");
|
| 583 |
+
L.attr("class", "sections");
|
| 584 |
+
const C = h.append("g");
|
| 585 |
+
C.attr("class", "items");
|
| 586 |
+
const w = E.nodes.filter(
|
| 587 |
+
// TODO: TypeScript 5.5 will infer this predicate automatically
|
| 588 |
+
(m) => m.isGroup
|
| 589 |
+
);
|
| 590 |
+
let N = 0;
|
| 591 |
+
const i = 10, H = [];
|
| 592 |
+
let x = 25;
|
| 593 |
+
for (const m of w) {
|
| 594 |
+
const O = ((M = f == null ? void 0 : f.kanban) == null ? void 0 : M.sectionWidth) || 200;
|
| 595 |
+
N = N + 1, m.x = O * N + (N - 1) * i / 2, m.width = O, m.y = 0, m.height = O * 3, m.rx = 5, m.ry = 5, m.cssClasses = m.cssClasses + " section-" + N;
|
| 596 |
+
const _ = await be(L, m);
|
| 597 |
+
x = Math.max(x, (U = _ == null ? void 0 : _.labelBBox) == null ? void 0 : U.height), H.push(_);
|
| 598 |
+
}
|
| 599 |
+
let P = 0;
|
| 600 |
+
for (const m of w) {
|
| 601 |
+
const O = H[P];
|
| 602 |
+
P = P + 1;
|
| 603 |
+
const _ = ((A = f == null ? void 0 : f.kanban) == null ? void 0 : A.sectionWidth) || 200, s = -_ * 3 / 2 + x;
|
| 604 |
+
let n = s;
|
| 605 |
+
const a = E.nodes.filter((e) => e.parentId === m.id);
|
| 606 |
+
for (const e of a) {
|
| 607 |
+
if (e.isGroup)
|
| 608 |
+
throw new Error("Groups within groups are not allowed in Kanban diagrams");
|
| 609 |
+
e.x = m.x, e.width = _ - 1.5 * i;
|
| 610 |
+
const l = (await me(C, e, { config: f })).node().getBBox();
|
| 611 |
+
e.y = n + l.height / 2, await _e(e), n = e.y + l.height / 2 + i / 2;
|
| 612 |
+
}
|
| 613 |
+
const o = O.cluster.select("rect"), u = Math.max(n - s + 3 * i, 50) + (x - 25);
|
| 614 |
+
o.attr("height", u);
|
| 615 |
+
}
|
| 616 |
+
Ee(
|
| 617 |
+
void 0,
|
| 618 |
+
h,
|
| 619 |
+
((j = f.mindmap) == null ? void 0 : j.padding) ?? K.kanban.padding,
|
| 620 |
+
((V = f.mindmap) == null ? void 0 : V.useMaxWidth) ?? K.kanban.useMaxWidth
|
| 621 |
+
);
|
| 622 |
+
}, "draw"), Fe = {
|
| 623 |
+
draw: Be
|
| 624 |
+
}, Ge = /* @__PURE__ */ c((t) => {
|
| 625 |
+
let g = "";
|
| 626 |
+
for (let r = 0; r < t.THEME_COLOR_LIMIT; r++)
|
| 627 |
+
t["lineColor" + r] = t["lineColor" + r] || t["cScaleInv" + r], Ne(t["lineColor" + r]) ? t["lineColor" + r] = le(t["lineColor" + r], 20) : t["lineColor" + r] = ce(t["lineColor" + r], 20);
|
| 628 |
+
const d = /* @__PURE__ */ c((r, p) => t.darkMode ? ce(r, p) : le(r, p), "adjuster");
|
| 629 |
+
for (let r = 0; r < t.THEME_COLOR_LIMIT; r++) {
|
| 630 |
+
const p = "" + (17 - 3 * r);
|
| 631 |
+
g += `
|
| 632 |
+
.section-${r - 1} rect, .section-${r - 1} path, .section-${r - 1} circle, .section-${r - 1} polygon, .section-${r - 1} path {
|
| 633 |
+
fill: ${d(t["cScale" + r], 10)};
|
| 634 |
+
stroke: ${d(t["cScale" + r], 10)};
|
| 635 |
+
|
| 636 |
+
}
|
| 637 |
+
.section-${r - 1} text {
|
| 638 |
+
fill: ${t["cScaleLabel" + r]};
|
| 639 |
+
}
|
| 640 |
+
.node-icon-${r - 1} {
|
| 641 |
+
font-size: 40px;
|
| 642 |
+
color: ${t["cScaleLabel" + r]};
|
| 643 |
+
}
|
| 644 |
+
.section-edge-${r - 1}{
|
| 645 |
+
stroke: ${t["cScale" + r]};
|
| 646 |
+
}
|
| 647 |
+
.edge-depth-${r - 1}{
|
| 648 |
+
stroke-width: ${p};
|
| 649 |
+
}
|
| 650 |
+
.section-${r - 1} line {
|
| 651 |
+
stroke: ${t["cScaleInv" + r]} ;
|
| 652 |
+
stroke-width: 3;
|
| 653 |
+
}
|
| 654 |
+
|
| 655 |
+
.disabled, .disabled circle, .disabled text {
|
| 656 |
+
fill: lightgray;
|
| 657 |
+
}
|
| 658 |
+
.disabled text {
|
| 659 |
+
fill: #efefef;
|
| 660 |
+
}
|
| 661 |
+
|
| 662 |
+
.node rect,
|
| 663 |
+
.node circle,
|
| 664 |
+
.node ellipse,
|
| 665 |
+
.node polygon,
|
| 666 |
+
.node path {
|
| 667 |
+
fill: ${t.background};
|
| 668 |
+
stroke: ${t.nodeBorder};
|
| 669 |
+
stroke-width: 1px;
|
| 670 |
+
}
|
| 671 |
+
|
| 672 |
+
.kanban-ticket-link {
|
| 673 |
+
fill: ${t.background};
|
| 674 |
+
stroke: ${t.nodeBorder};
|
| 675 |
+
text-decoration: underline;
|
| 676 |
+
}
|
| 677 |
+
`;
|
| 678 |
+
}
|
| 679 |
+
return g;
|
| 680 |
+
}, "genSections"), He = /* @__PURE__ */ c((t) => `
|
| 681 |
+
.edge {
|
| 682 |
+
stroke-width: 3;
|
| 683 |
+
}
|
| 684 |
+
${Ge(t)}
|
| 685 |
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
| 686 |
+
fill: ${t.git0};
|
| 687 |
+
}
|
| 688 |
+
.section-root text {
|
| 689 |
+
fill: ${t.gitBranchLabel0};
|
| 690 |
+
}
|
| 691 |
+
.icon-container {
|
| 692 |
+
height:100%;
|
| 693 |
+
display: flex;
|
| 694 |
+
justify-content: center;
|
| 695 |
+
align-items: center;
|
| 696 |
+
}
|
| 697 |
+
.edge {
|
| 698 |
+
fill: none;
|
| 699 |
+
}
|
| 700 |
+
.cluster-label, .label {
|
| 701 |
+
color: ${t.textColor};
|
| 702 |
+
fill: ${t.textColor};
|
| 703 |
+
}
|
| 704 |
+
.kanban-label {
|
| 705 |
+
dy: 1em;
|
| 706 |
+
alignment-baseline: middle;
|
| 707 |
+
text-anchor: middle;
|
| 708 |
+
dominant-baseline: middle;
|
| 709 |
+
text-align: center;
|
| 710 |
+
}
|
| 711 |
+
${fe()}
|
| 712 |
+
`, "getStyles"), Me = He, We = {
|
| 713 |
+
db: Ve,
|
| 714 |
+
renderer: Fe,
|
| 715 |
+
parser: xe,
|
| 716 |
+
styles: Me
|
| 717 |
+
};
|
| 718 |
+
export {
|
| 719 |
+
We as diagram
|
| 720 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/layout-By9VfgKH.js
ADDED
|
@@ -0,0 +1,1324 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { G as g } from "./graph-By8AcOsS.js";
|
| 2 |
+
import { b as Te, p as ce, q as le, g as z, e as ee, l as j, o as Me, s as Ie, c as Se, u as Fe, d as f, i as m, f as _, v as x, r as I } from "./_baseUniq-_084E1r1.js";
|
| 3 |
+
import { f as O, b as he, a as je, c as Ve, d as Ae, t as V, m as w, e as P, h as ve, g as X, l as T, i as Be } from "./_basePickBy-CApE71AJ.js";
|
| 4 |
+
import { b4 as Ge, b5 as Ye, b6 as De, aM as qe, b7 as $e, aQ as pe, aP as we, b8 as We, aL as q, aA as ze, aS as Xe, aC as Ue, b9 as $ } from "./mermaid.core-CfPtPiLZ.js";
|
| 5 |
+
function He(e) {
|
| 6 |
+
return Ge(Ye(e, void 0, O), e + "");
|
| 7 |
+
}
|
| 8 |
+
var Je = 1, Qe = 4;
|
| 9 |
+
function Ze(e) {
|
| 10 |
+
return Te(e, Je | Qe);
|
| 11 |
+
}
|
| 12 |
+
function Ke(e, n) {
|
| 13 |
+
return e == null ? e : De(e, ce(n), qe);
|
| 14 |
+
}
|
| 15 |
+
function en(e, n) {
|
| 16 |
+
return e && le(e, ce(n));
|
| 17 |
+
}
|
| 18 |
+
function nn(e, n) {
|
| 19 |
+
return e > n;
|
| 20 |
+
}
|
| 21 |
+
function S(e, n) {
|
| 22 |
+
var r = {};
|
| 23 |
+
return n = z(n), le(e, function(t, a, i) {
|
| 24 |
+
$e(r, a, n(t, a, i));
|
| 25 |
+
}), r;
|
| 26 |
+
}
|
| 27 |
+
function y(e) {
|
| 28 |
+
return e && e.length ? he(e, pe, nn) : void 0;
|
| 29 |
+
}
|
| 30 |
+
function U(e, n) {
|
| 31 |
+
return e && e.length ? he(e, z(n), je) : void 0;
|
| 32 |
+
}
|
| 33 |
+
function rn(e, n) {
|
| 34 |
+
var r = e.length;
|
| 35 |
+
for (e.sort(n); r--; )
|
| 36 |
+
e[r] = e[r].value;
|
| 37 |
+
return e;
|
| 38 |
+
}
|
| 39 |
+
function tn(e, n) {
|
| 40 |
+
if (e !== n) {
|
| 41 |
+
var r = e !== void 0, t = e === null, a = e === e, i = ee(e), o = n !== void 0, u = n === null, d = n === n, s = ee(n);
|
| 42 |
+
if (!u && !s && !i && e > n || i && o && d && !u && !s || t && o && d || !r && d || !a)
|
| 43 |
+
return 1;
|
| 44 |
+
if (!t && !i && !s && e < n || s && r && a && !t && !i || u && r && a || !o && a || !d)
|
| 45 |
+
return -1;
|
| 46 |
+
}
|
| 47 |
+
return 0;
|
| 48 |
+
}
|
| 49 |
+
function an(e, n, r) {
|
| 50 |
+
for (var t = -1, a = e.criteria, i = n.criteria, o = a.length, u = r.length; ++t < o; ) {
|
| 51 |
+
var d = tn(a[t], i[t]);
|
| 52 |
+
if (d) {
|
| 53 |
+
if (t >= u)
|
| 54 |
+
return d;
|
| 55 |
+
var s = r[t];
|
| 56 |
+
return d * (s == "desc" ? -1 : 1);
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
return e.index - n.index;
|
| 60 |
+
}
|
| 61 |
+
function on(e, n, r) {
|
| 62 |
+
n.length ? n = j(n, function(i) {
|
| 63 |
+
return we(i) ? function(o) {
|
| 64 |
+
return Me(o, i.length === 1 ? i[0] : i);
|
| 65 |
+
} : i;
|
| 66 |
+
}) : n = [pe];
|
| 67 |
+
var t = -1;
|
| 68 |
+
n = j(n, We(z));
|
| 69 |
+
var a = Ve(e, function(i, o, u) {
|
| 70 |
+
var d = j(n, function(s) {
|
| 71 |
+
return s(i);
|
| 72 |
+
});
|
| 73 |
+
return { criteria: d, index: ++t, value: i };
|
| 74 |
+
});
|
| 75 |
+
return rn(a, function(i, o) {
|
| 76 |
+
return an(i, o, r);
|
| 77 |
+
});
|
| 78 |
+
}
|
| 79 |
+
function un(e, n) {
|
| 80 |
+
return Ae(e, n, function(r, t) {
|
| 81 |
+
return Ie(e, t);
|
| 82 |
+
});
|
| 83 |
+
}
|
| 84 |
+
var M = He(function(e, n) {
|
| 85 |
+
return e == null ? {} : un(e, n);
|
| 86 |
+
}), dn = Math.ceil, sn = Math.max;
|
| 87 |
+
function fn(e, n, r, t) {
|
| 88 |
+
for (var a = -1, i = sn(dn((n - e) / (r || 1)), 0), o = Array(i); i--; )
|
| 89 |
+
o[++a] = e, e += r;
|
| 90 |
+
return o;
|
| 91 |
+
}
|
| 92 |
+
function cn(e) {
|
| 93 |
+
return function(n, r, t) {
|
| 94 |
+
return t && typeof t != "number" && q(n, r, t) && (r = t = void 0), n = V(n), r === void 0 ? (r = n, n = 0) : r = V(r), t = t === void 0 ? n < r ? 1 : -1 : V(t), fn(n, r, t);
|
| 95 |
+
};
|
| 96 |
+
}
|
| 97 |
+
var E = cn(), R = ze(function(e, n) {
|
| 98 |
+
if (e == null)
|
| 99 |
+
return [];
|
| 100 |
+
var r = n.length;
|
| 101 |
+
return r > 1 && q(e, n[0], n[1]) ? n = [] : r > 2 && q(n[0], n[1], n[2]) && (n = [n[0]]), on(e, Se(n), []);
|
| 102 |
+
}), ln = 0;
|
| 103 |
+
function H(e) {
|
| 104 |
+
var n = ++ln;
|
| 105 |
+
return Fe(e) + n;
|
| 106 |
+
}
|
| 107 |
+
function hn(e, n, r) {
|
| 108 |
+
for (var t = -1, a = e.length, i = n.length, o = {}; ++t < a; ) {
|
| 109 |
+
var u = t < i ? n[t] : void 0;
|
| 110 |
+
r(o, e[t], u);
|
| 111 |
+
}
|
| 112 |
+
return o;
|
| 113 |
+
}
|
| 114 |
+
function vn(e, n) {
|
| 115 |
+
return hn(e || [], n || [], Xe);
|
| 116 |
+
}
|
| 117 |
+
class pn {
|
| 118 |
+
constructor() {
|
| 119 |
+
var n = {};
|
| 120 |
+
n._next = n._prev = n, this._sentinel = n;
|
| 121 |
+
}
|
| 122 |
+
dequeue() {
|
| 123 |
+
var n = this._sentinel, r = n._prev;
|
| 124 |
+
if (r !== n)
|
| 125 |
+
return ne(r), r;
|
| 126 |
+
}
|
| 127 |
+
enqueue(n) {
|
| 128 |
+
var r = this._sentinel;
|
| 129 |
+
n._prev && n._next && ne(n), n._next = r._next, r._next._prev = n, r._next = n, n._prev = r;
|
| 130 |
+
}
|
| 131 |
+
toString() {
|
| 132 |
+
for (var n = [], r = this._sentinel, t = r._prev; t !== r; )
|
| 133 |
+
n.push(JSON.stringify(t, wn)), t = t._prev;
|
| 134 |
+
return "[" + n.join(", ") + "]";
|
| 135 |
+
}
|
| 136 |
+
}
|
| 137 |
+
function ne(e) {
|
| 138 |
+
e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
|
| 139 |
+
}
|
| 140 |
+
function wn(e, n) {
|
| 141 |
+
if (e !== "_next" && e !== "_prev")
|
| 142 |
+
return n;
|
| 143 |
+
}
|
| 144 |
+
var bn = Ue(1);
|
| 145 |
+
function mn(e, n) {
|
| 146 |
+
if (e.nodeCount() <= 1)
|
| 147 |
+
return [];
|
| 148 |
+
var r = yn(e, n || bn), t = gn(r.graph, r.buckets, r.zeroIdx);
|
| 149 |
+
return O(
|
| 150 |
+
w(t, function(a) {
|
| 151 |
+
return e.outEdges(a.v, a.w);
|
| 152 |
+
})
|
| 153 |
+
);
|
| 154 |
+
}
|
| 155 |
+
function gn(e, n, r) {
|
| 156 |
+
for (var t = [], a = n[n.length - 1], i = n[0], o; e.nodeCount(); ) {
|
| 157 |
+
for (; o = i.dequeue(); )
|
| 158 |
+
A(e, n, r, o);
|
| 159 |
+
for (; o = a.dequeue(); )
|
| 160 |
+
A(e, n, r, o);
|
| 161 |
+
if (e.nodeCount()) {
|
| 162 |
+
for (var u = n.length - 2; u > 0; --u)
|
| 163 |
+
if (o = n[u].dequeue(), o) {
|
| 164 |
+
t = t.concat(A(e, n, r, o, !0));
|
| 165 |
+
break;
|
| 166 |
+
}
|
| 167 |
+
}
|
| 168 |
+
}
|
| 169 |
+
return t;
|
| 170 |
+
}
|
| 171 |
+
function A(e, n, r, t, a) {
|
| 172 |
+
var i = a ? [] : void 0;
|
| 173 |
+
return f(e.inEdges(t.v), function(o) {
|
| 174 |
+
var u = e.edge(o), d = e.node(o.v);
|
| 175 |
+
a && i.push({ v: o.v, w: o.w }), d.out -= u, W(n, r, d);
|
| 176 |
+
}), f(e.outEdges(t.v), function(o) {
|
| 177 |
+
var u = e.edge(o), d = o.w, s = e.node(d);
|
| 178 |
+
s.in -= u, W(n, r, s);
|
| 179 |
+
}), e.removeNode(t.v), i;
|
| 180 |
+
}
|
| 181 |
+
function yn(e, n) {
|
| 182 |
+
var r = new g(), t = 0, a = 0;
|
| 183 |
+
f(e.nodes(), function(u) {
|
| 184 |
+
r.setNode(u, { v: u, in: 0, out: 0 });
|
| 185 |
+
}), f(e.edges(), function(u) {
|
| 186 |
+
var d = r.edge(u.v, u.w) || 0, s = n(u), c = d + s;
|
| 187 |
+
r.setEdge(u.v, u.w, c), a = Math.max(a, r.node(u.v).out += s), t = Math.max(t, r.node(u.w).in += s);
|
| 188 |
+
});
|
| 189 |
+
var i = E(a + t + 3).map(function() {
|
| 190 |
+
return new pn();
|
| 191 |
+
}), o = t + 1;
|
| 192 |
+
return f(r.nodes(), function(u) {
|
| 193 |
+
W(i, o, r.node(u));
|
| 194 |
+
}), { graph: r, buckets: i, zeroIdx: o };
|
| 195 |
+
}
|
| 196 |
+
function W(e, n, r) {
|
| 197 |
+
r.out ? r.in ? e[r.out - r.in + n].enqueue(r) : e[e.length - 1].enqueue(r) : e[0].enqueue(r);
|
| 198 |
+
}
|
| 199 |
+
function kn(e) {
|
| 200 |
+
var n = e.graph().acyclicer === "greedy" ? mn(e, r(e)) : xn(e);
|
| 201 |
+
f(n, function(t) {
|
| 202 |
+
var a = e.edge(t);
|
| 203 |
+
e.removeEdge(t), a.forwardName = t.name, a.reversed = !0, e.setEdge(t.w, t.v, a, H("rev"));
|
| 204 |
+
});
|
| 205 |
+
function r(t) {
|
| 206 |
+
return function(a) {
|
| 207 |
+
return t.edge(a).weight;
|
| 208 |
+
};
|
| 209 |
+
}
|
| 210 |
+
}
|
| 211 |
+
function xn(e) {
|
| 212 |
+
var n = [], r = {}, t = {};
|
| 213 |
+
function a(i) {
|
| 214 |
+
Object.prototype.hasOwnProperty.call(t, i) || (t[i] = !0, r[i] = !0, f(e.outEdges(i), function(o) {
|
| 215 |
+
Object.prototype.hasOwnProperty.call(r, o.w) ? n.push(o) : a(o.w);
|
| 216 |
+
}), delete r[i]);
|
| 217 |
+
}
|
| 218 |
+
return f(e.nodes(), a), n;
|
| 219 |
+
}
|
| 220 |
+
function En(e) {
|
| 221 |
+
f(e.edges(), function(n) {
|
| 222 |
+
var r = e.edge(n);
|
| 223 |
+
if (r.reversed) {
|
| 224 |
+
e.removeEdge(n);
|
| 225 |
+
var t = r.forwardName;
|
| 226 |
+
delete r.reversed, delete r.forwardName, e.setEdge(n.w, n.v, r, t);
|
| 227 |
+
}
|
| 228 |
+
});
|
| 229 |
+
}
|
| 230 |
+
function L(e, n, r, t) {
|
| 231 |
+
var a;
|
| 232 |
+
do
|
| 233 |
+
a = H(t);
|
| 234 |
+
while (e.hasNode(a));
|
| 235 |
+
return r.dummy = n, e.setNode(a, r), a;
|
| 236 |
+
}
|
| 237 |
+
function On(e) {
|
| 238 |
+
var n = new g().setGraph(e.graph());
|
| 239 |
+
return f(e.nodes(), function(r) {
|
| 240 |
+
n.setNode(r, e.node(r));
|
| 241 |
+
}), f(e.edges(), function(r) {
|
| 242 |
+
var t = n.edge(r.v, r.w) || { weight: 0, minlen: 1 }, a = e.edge(r);
|
| 243 |
+
n.setEdge(r.v, r.w, {
|
| 244 |
+
weight: t.weight + a.weight,
|
| 245 |
+
minlen: Math.max(t.minlen, a.minlen)
|
| 246 |
+
});
|
| 247 |
+
}), n;
|
| 248 |
+
}
|
| 249 |
+
function be(e) {
|
| 250 |
+
var n = new g({ multigraph: e.isMultigraph() }).setGraph(e.graph());
|
| 251 |
+
return f(e.nodes(), function(r) {
|
| 252 |
+
e.children(r).length || n.setNode(r, e.node(r));
|
| 253 |
+
}), f(e.edges(), function(r) {
|
| 254 |
+
n.setEdge(r, e.edge(r));
|
| 255 |
+
}), n;
|
| 256 |
+
}
|
| 257 |
+
function re(e, n) {
|
| 258 |
+
var r = e.x, t = e.y, a = n.x - r, i = n.y - t, o = e.width / 2, u = e.height / 2;
|
| 259 |
+
if (!a && !i)
|
| 260 |
+
throw new Error("Not possible to find intersection inside of the rectangle");
|
| 261 |
+
var d, s;
|
| 262 |
+
return Math.abs(i) * o > Math.abs(a) * u ? (i < 0 && (u = -u), d = u * a / i, s = u) : (a < 0 && (o = -o), d = o, s = o * i / a), { x: r + d, y: t + s };
|
| 263 |
+
}
|
| 264 |
+
function F(e) {
|
| 265 |
+
var n = w(E(me(e) + 1), function() {
|
| 266 |
+
return [];
|
| 267 |
+
});
|
| 268 |
+
return f(e.nodes(), function(r) {
|
| 269 |
+
var t = e.node(r), a = t.rank;
|
| 270 |
+
m(a) || (n[a][t.order] = r);
|
| 271 |
+
}), n;
|
| 272 |
+
}
|
| 273 |
+
function Ln(e) {
|
| 274 |
+
var n = P(
|
| 275 |
+
w(e.nodes(), function(r) {
|
| 276 |
+
return e.node(r).rank;
|
| 277 |
+
})
|
| 278 |
+
);
|
| 279 |
+
f(e.nodes(), function(r) {
|
| 280 |
+
var t = e.node(r);
|
| 281 |
+
ve(t, "rank") && (t.rank -= n);
|
| 282 |
+
});
|
| 283 |
+
}
|
| 284 |
+
function Nn(e) {
|
| 285 |
+
var n = P(
|
| 286 |
+
w(e.nodes(), function(i) {
|
| 287 |
+
return e.node(i).rank;
|
| 288 |
+
})
|
| 289 |
+
), r = [];
|
| 290 |
+
f(e.nodes(), function(i) {
|
| 291 |
+
var o = e.node(i).rank - n;
|
| 292 |
+
r[o] || (r[o] = []), r[o].push(i);
|
| 293 |
+
});
|
| 294 |
+
var t = 0, a = e.graph().nodeRankFactor;
|
| 295 |
+
f(r, function(i, o) {
|
| 296 |
+
m(i) && o % a !== 0 ? --t : t && f(i, function(u) {
|
| 297 |
+
e.node(u).rank += t;
|
| 298 |
+
});
|
| 299 |
+
});
|
| 300 |
+
}
|
| 301 |
+
function te(e, n, r, t) {
|
| 302 |
+
var a = {
|
| 303 |
+
width: 0,
|
| 304 |
+
height: 0
|
| 305 |
+
};
|
| 306 |
+
return arguments.length >= 4 && (a.rank = r, a.order = t), L(e, "border", a, n);
|
| 307 |
+
}
|
| 308 |
+
function me(e) {
|
| 309 |
+
return y(
|
| 310 |
+
w(e.nodes(), function(n) {
|
| 311 |
+
var r = e.node(n).rank;
|
| 312 |
+
if (!m(r))
|
| 313 |
+
return r;
|
| 314 |
+
})
|
| 315 |
+
);
|
| 316 |
+
}
|
| 317 |
+
function Pn(e, n) {
|
| 318 |
+
var r = { lhs: [], rhs: [] };
|
| 319 |
+
return f(e, function(t) {
|
| 320 |
+
n(t) ? r.lhs.push(t) : r.rhs.push(t);
|
| 321 |
+
}), r;
|
| 322 |
+
}
|
| 323 |
+
function Cn(e, n) {
|
| 324 |
+
return n();
|
| 325 |
+
}
|
| 326 |
+
function _n(e) {
|
| 327 |
+
function n(r) {
|
| 328 |
+
var t = e.children(r), a = e.node(r);
|
| 329 |
+
if (t.length && f(t, n), Object.prototype.hasOwnProperty.call(a, "minRank")) {
|
| 330 |
+
a.borderLeft = [], a.borderRight = [];
|
| 331 |
+
for (var i = a.minRank, o = a.maxRank + 1; i < o; ++i)
|
| 332 |
+
ae(e, "borderLeft", "_bl", r, a, i), ae(e, "borderRight", "_br", r, a, i);
|
| 333 |
+
}
|
| 334 |
+
}
|
| 335 |
+
f(e.children(), n);
|
| 336 |
+
}
|
| 337 |
+
function ae(e, n, r, t, a, i) {
|
| 338 |
+
var o = { width: 0, height: 0, rank: i, borderType: n }, u = a[n][i - 1], d = L(e, "border", o, r);
|
| 339 |
+
a[n][i] = d, e.setParent(d, t), u && e.setEdge(u, d, { weight: 1 });
|
| 340 |
+
}
|
| 341 |
+
function Rn(e) {
|
| 342 |
+
var n = e.graph().rankdir.toLowerCase();
|
| 343 |
+
(n === "lr" || n === "rl") && ge(e);
|
| 344 |
+
}
|
| 345 |
+
function Tn(e) {
|
| 346 |
+
var n = e.graph().rankdir.toLowerCase();
|
| 347 |
+
(n === "bt" || n === "rl") && Mn(e), (n === "lr" || n === "rl") && (In(e), ge(e));
|
| 348 |
+
}
|
| 349 |
+
function ge(e) {
|
| 350 |
+
f(e.nodes(), function(n) {
|
| 351 |
+
ie(e.node(n));
|
| 352 |
+
}), f(e.edges(), function(n) {
|
| 353 |
+
ie(e.edge(n));
|
| 354 |
+
});
|
| 355 |
+
}
|
| 356 |
+
function ie(e) {
|
| 357 |
+
var n = e.width;
|
| 358 |
+
e.width = e.height, e.height = n;
|
| 359 |
+
}
|
| 360 |
+
function Mn(e) {
|
| 361 |
+
f(e.nodes(), function(n) {
|
| 362 |
+
B(e.node(n));
|
| 363 |
+
}), f(e.edges(), function(n) {
|
| 364 |
+
var r = e.edge(n);
|
| 365 |
+
f(r.points, B), Object.prototype.hasOwnProperty.call(r, "y") && B(r);
|
| 366 |
+
});
|
| 367 |
+
}
|
| 368 |
+
function B(e) {
|
| 369 |
+
e.y = -e.y;
|
| 370 |
+
}
|
| 371 |
+
function In(e) {
|
| 372 |
+
f(e.nodes(), function(n) {
|
| 373 |
+
G(e.node(n));
|
| 374 |
+
}), f(e.edges(), function(n) {
|
| 375 |
+
var r = e.edge(n);
|
| 376 |
+
f(r.points, G), Object.prototype.hasOwnProperty.call(r, "x") && G(r);
|
| 377 |
+
});
|
| 378 |
+
}
|
| 379 |
+
function G(e) {
|
| 380 |
+
var n = e.x;
|
| 381 |
+
e.x = e.y, e.y = n;
|
| 382 |
+
}
|
| 383 |
+
function Sn(e) {
|
| 384 |
+
e.graph().dummyChains = [], f(e.edges(), function(n) {
|
| 385 |
+
Fn(e, n);
|
| 386 |
+
});
|
| 387 |
+
}
|
| 388 |
+
function Fn(e, n) {
|
| 389 |
+
var r = n.v, t = e.node(r).rank, a = n.w, i = e.node(a).rank, o = n.name, u = e.edge(n), d = u.labelRank;
|
| 390 |
+
if (i !== t + 1) {
|
| 391 |
+
e.removeEdge(n);
|
| 392 |
+
var s = void 0, c, l;
|
| 393 |
+
for (l = 0, ++t; t < i; ++l, ++t)
|
| 394 |
+
u.points = [], s = {
|
| 395 |
+
width: 0,
|
| 396 |
+
height: 0,
|
| 397 |
+
edgeLabel: u,
|
| 398 |
+
edgeObj: n,
|
| 399 |
+
rank: t
|
| 400 |
+
}, c = L(e, "edge", s, "_d"), t === d && (s.width = u.width, s.height = u.height, s.dummy = "edge-label", s.labelpos = u.labelpos), e.setEdge(r, c, { weight: u.weight }, o), l === 0 && e.graph().dummyChains.push(c), r = c;
|
| 401 |
+
e.setEdge(r, a, { weight: u.weight }, o);
|
| 402 |
+
}
|
| 403 |
+
}
|
| 404 |
+
function jn(e) {
|
| 405 |
+
f(e.graph().dummyChains, function(n) {
|
| 406 |
+
var r = e.node(n), t = r.edgeLabel, a;
|
| 407 |
+
for (e.setEdge(r.edgeObj, t); r.dummy; )
|
| 408 |
+
a = e.successors(n)[0], e.removeNode(n), t.points.push({ x: r.x, y: r.y }), r.dummy === "edge-label" && (t.x = r.x, t.y = r.y, t.width = r.width, t.height = r.height), n = a, r = e.node(n);
|
| 409 |
+
});
|
| 410 |
+
}
|
| 411 |
+
function J(e) {
|
| 412 |
+
var n = {};
|
| 413 |
+
function r(t) {
|
| 414 |
+
var a = e.node(t);
|
| 415 |
+
if (Object.prototype.hasOwnProperty.call(n, t))
|
| 416 |
+
return a.rank;
|
| 417 |
+
n[t] = !0;
|
| 418 |
+
var i = P(
|
| 419 |
+
w(e.outEdges(t), function(o) {
|
| 420 |
+
return r(o.w) - e.edge(o).minlen;
|
| 421 |
+
})
|
| 422 |
+
);
|
| 423 |
+
return (i === Number.POSITIVE_INFINITY || // return value of _.map([]) for Lodash 3
|
| 424 |
+
i === void 0 || // return value of _.map([]) for Lodash 4
|
| 425 |
+
i === null) && (i = 0), a.rank = i;
|
| 426 |
+
}
|
| 427 |
+
f(e.sources(), r);
|
| 428 |
+
}
|
| 429 |
+
function C(e, n) {
|
| 430 |
+
return e.node(n.w).rank - e.node(n.v).rank - e.edge(n).minlen;
|
| 431 |
+
}
|
| 432 |
+
function ye(e) {
|
| 433 |
+
var n = new g({ directed: !1 }), r = e.nodes()[0], t = e.nodeCount();
|
| 434 |
+
n.setNode(r, {});
|
| 435 |
+
for (var a, i; Vn(n, e) < t; )
|
| 436 |
+
a = An(n, e), i = n.hasNode(a.v) ? C(e, a) : -C(e, a), Bn(n, e, i);
|
| 437 |
+
return n;
|
| 438 |
+
}
|
| 439 |
+
function Vn(e, n) {
|
| 440 |
+
function r(t) {
|
| 441 |
+
f(n.nodeEdges(t), function(a) {
|
| 442 |
+
var i = a.v, o = t === i ? a.w : i;
|
| 443 |
+
!e.hasNode(o) && !C(n, a) && (e.setNode(o, {}), e.setEdge(t, o, {}), r(o));
|
| 444 |
+
});
|
| 445 |
+
}
|
| 446 |
+
return f(e.nodes(), r), e.nodeCount();
|
| 447 |
+
}
|
| 448 |
+
function An(e, n) {
|
| 449 |
+
return U(n.edges(), function(r) {
|
| 450 |
+
if (e.hasNode(r.v) !== e.hasNode(r.w))
|
| 451 |
+
return C(n, r);
|
| 452 |
+
});
|
| 453 |
+
}
|
| 454 |
+
function Bn(e, n, r) {
|
| 455 |
+
f(e.nodes(), function(t) {
|
| 456 |
+
n.node(t).rank += r;
|
| 457 |
+
});
|
| 458 |
+
}
|
| 459 |
+
function Gn() {
|
| 460 |
+
}
|
| 461 |
+
Gn.prototype = new Error();
|
| 462 |
+
function ke(e, n, r) {
|
| 463 |
+
we(n) || (n = [n]);
|
| 464 |
+
var t = (e.isDirected() ? e.successors : e.neighbors).bind(e), a = [], i = {};
|
| 465 |
+
return f(n, function(o) {
|
| 466 |
+
if (!e.hasNode(o))
|
| 467 |
+
throw new Error("Graph does not have node: " + o);
|
| 468 |
+
xe(e, o, r === "post", i, t, a);
|
| 469 |
+
}), a;
|
| 470 |
+
}
|
| 471 |
+
function xe(e, n, r, t, a, i) {
|
| 472 |
+
Object.prototype.hasOwnProperty.call(t, n) || (t[n] = !0, r || i.push(n), f(a(n), function(o) {
|
| 473 |
+
xe(e, o, r, t, a, i);
|
| 474 |
+
}), r && i.push(n));
|
| 475 |
+
}
|
| 476 |
+
function Yn(e, n) {
|
| 477 |
+
return ke(e, n, "post");
|
| 478 |
+
}
|
| 479 |
+
function Dn(e, n) {
|
| 480 |
+
return ke(e, n, "pre");
|
| 481 |
+
}
|
| 482 |
+
k.initLowLimValues = Z;
|
| 483 |
+
k.initCutValues = Q;
|
| 484 |
+
k.calcCutValue = Ee;
|
| 485 |
+
k.leaveEdge = Le;
|
| 486 |
+
k.enterEdge = Ne;
|
| 487 |
+
k.exchangeEdges = Pe;
|
| 488 |
+
function k(e) {
|
| 489 |
+
e = On(e), J(e);
|
| 490 |
+
var n = ye(e);
|
| 491 |
+
Z(n), Q(n, e);
|
| 492 |
+
for (var r, t; r = Le(n); )
|
| 493 |
+
t = Ne(n, e, r), Pe(n, e, r, t);
|
| 494 |
+
}
|
| 495 |
+
function Q(e, n) {
|
| 496 |
+
var r = Yn(e, e.nodes());
|
| 497 |
+
r = r.slice(0, r.length - 1), f(r, function(t) {
|
| 498 |
+
qn(e, n, t);
|
| 499 |
+
});
|
| 500 |
+
}
|
| 501 |
+
function qn(e, n, r) {
|
| 502 |
+
var t = e.node(r), a = t.parent;
|
| 503 |
+
e.edge(r, a).cutvalue = Ee(e, n, r);
|
| 504 |
+
}
|
| 505 |
+
function Ee(e, n, r) {
|
| 506 |
+
var t = e.node(r), a = t.parent, i = !0, o = n.edge(r, a), u = 0;
|
| 507 |
+
return o || (i = !1, o = n.edge(a, r)), u = o.weight, f(n.nodeEdges(r), function(d) {
|
| 508 |
+
var s = d.v === r, c = s ? d.w : d.v;
|
| 509 |
+
if (c !== a) {
|
| 510 |
+
var l = s === i, h = n.edge(d).weight;
|
| 511 |
+
if (u += l ? h : -h, Wn(e, r, c)) {
|
| 512 |
+
var v = e.edge(r, c).cutvalue;
|
| 513 |
+
u += l ? -v : v;
|
| 514 |
+
}
|
| 515 |
+
}
|
| 516 |
+
}), u;
|
| 517 |
+
}
|
| 518 |
+
function Z(e, n) {
|
| 519 |
+
arguments.length < 2 && (n = e.nodes()[0]), Oe(e, {}, 1, n);
|
| 520 |
+
}
|
| 521 |
+
function Oe(e, n, r, t, a) {
|
| 522 |
+
var i = r, o = e.node(t);
|
| 523 |
+
return n[t] = !0, f(e.neighbors(t), function(u) {
|
| 524 |
+
Object.prototype.hasOwnProperty.call(n, u) || (r = Oe(e, n, r, u, t));
|
| 525 |
+
}), o.low = i, o.lim = r++, a ? o.parent = a : delete o.parent, r;
|
| 526 |
+
}
|
| 527 |
+
function Le(e) {
|
| 528 |
+
return X(e.edges(), function(n) {
|
| 529 |
+
return e.edge(n).cutvalue < 0;
|
| 530 |
+
});
|
| 531 |
+
}
|
| 532 |
+
function Ne(e, n, r) {
|
| 533 |
+
var t = r.v, a = r.w;
|
| 534 |
+
n.hasEdge(t, a) || (t = r.w, a = r.v);
|
| 535 |
+
var i = e.node(t), o = e.node(a), u = i, d = !1;
|
| 536 |
+
i.lim > o.lim && (u = o, d = !0);
|
| 537 |
+
var s = _(n.edges(), function(c) {
|
| 538 |
+
return d === oe(e, e.node(c.v), u) && d !== oe(e, e.node(c.w), u);
|
| 539 |
+
});
|
| 540 |
+
return U(s, function(c) {
|
| 541 |
+
return C(n, c);
|
| 542 |
+
});
|
| 543 |
+
}
|
| 544 |
+
function Pe(e, n, r, t) {
|
| 545 |
+
var a = r.v, i = r.w;
|
| 546 |
+
e.removeEdge(a, i), e.setEdge(t.v, t.w, {}), Z(e), Q(e, n), $n(e, n);
|
| 547 |
+
}
|
| 548 |
+
function $n(e, n) {
|
| 549 |
+
var r = X(e.nodes(), function(a) {
|
| 550 |
+
return !n.node(a).parent;
|
| 551 |
+
}), t = Dn(e, r);
|
| 552 |
+
t = t.slice(1), f(t, function(a) {
|
| 553 |
+
var i = e.node(a).parent, o = n.edge(a, i), u = !1;
|
| 554 |
+
o || (o = n.edge(i, a), u = !0), n.node(a).rank = n.node(i).rank + (u ? o.minlen : -o.minlen);
|
| 555 |
+
});
|
| 556 |
+
}
|
| 557 |
+
function Wn(e, n, r) {
|
| 558 |
+
return e.hasEdge(n, r);
|
| 559 |
+
}
|
| 560 |
+
function oe(e, n, r) {
|
| 561 |
+
return r.low <= n.lim && n.lim <= r.lim;
|
| 562 |
+
}
|
| 563 |
+
function zn(e) {
|
| 564 |
+
switch (e.graph().ranker) {
|
| 565 |
+
case "network-simplex":
|
| 566 |
+
ue(e);
|
| 567 |
+
break;
|
| 568 |
+
case "tight-tree":
|
| 569 |
+
Un(e);
|
| 570 |
+
break;
|
| 571 |
+
case "longest-path":
|
| 572 |
+
Xn(e);
|
| 573 |
+
break;
|
| 574 |
+
default:
|
| 575 |
+
ue(e);
|
| 576 |
+
}
|
| 577 |
+
}
|
| 578 |
+
var Xn = J;
|
| 579 |
+
function Un(e) {
|
| 580 |
+
J(e), ye(e);
|
| 581 |
+
}
|
| 582 |
+
function ue(e) {
|
| 583 |
+
k(e);
|
| 584 |
+
}
|
| 585 |
+
function Hn(e) {
|
| 586 |
+
var n = L(e, "root", {}, "_root"), r = Jn(e), t = y(x(r)) - 1, a = 2 * t + 1;
|
| 587 |
+
e.graph().nestingRoot = n, f(e.edges(), function(o) {
|
| 588 |
+
e.edge(o).minlen *= a;
|
| 589 |
+
});
|
| 590 |
+
var i = Qn(e) + 1;
|
| 591 |
+
f(e.children(), function(o) {
|
| 592 |
+
Ce(e, n, a, i, t, r, o);
|
| 593 |
+
}), e.graph().nodeRankFactor = a;
|
| 594 |
+
}
|
| 595 |
+
function Ce(e, n, r, t, a, i, o) {
|
| 596 |
+
var u = e.children(o);
|
| 597 |
+
if (!u.length) {
|
| 598 |
+
o !== n && e.setEdge(n, o, { weight: 0, minlen: r });
|
| 599 |
+
return;
|
| 600 |
+
}
|
| 601 |
+
var d = te(e, "_bt"), s = te(e, "_bb"), c = e.node(o);
|
| 602 |
+
e.setParent(d, o), c.borderTop = d, e.setParent(s, o), c.borderBottom = s, f(u, function(l) {
|
| 603 |
+
Ce(e, n, r, t, a, i, l);
|
| 604 |
+
var h = e.node(l), v = h.borderTop ? h.borderTop : l, p = h.borderBottom ? h.borderBottom : l, b = h.borderTop ? t : 2 * t, N = v !== p ? 1 : a - i[o] + 1;
|
| 605 |
+
e.setEdge(d, v, {
|
| 606 |
+
weight: b,
|
| 607 |
+
minlen: N,
|
| 608 |
+
nestingEdge: !0
|
| 609 |
+
}), e.setEdge(p, s, {
|
| 610 |
+
weight: b,
|
| 611 |
+
minlen: N,
|
| 612 |
+
nestingEdge: !0
|
| 613 |
+
});
|
| 614 |
+
}), e.parent(o) || e.setEdge(n, d, { weight: 0, minlen: a + i[o] });
|
| 615 |
+
}
|
| 616 |
+
function Jn(e) {
|
| 617 |
+
var n = {};
|
| 618 |
+
function r(t, a) {
|
| 619 |
+
var i = e.children(t);
|
| 620 |
+
i && i.length && f(i, function(o) {
|
| 621 |
+
r(o, a + 1);
|
| 622 |
+
}), n[t] = a;
|
| 623 |
+
}
|
| 624 |
+
return f(e.children(), function(t) {
|
| 625 |
+
r(t, 1);
|
| 626 |
+
}), n;
|
| 627 |
+
}
|
| 628 |
+
function Qn(e) {
|
| 629 |
+
return I(
|
| 630 |
+
e.edges(),
|
| 631 |
+
function(n, r) {
|
| 632 |
+
return n + e.edge(r).weight;
|
| 633 |
+
},
|
| 634 |
+
0
|
| 635 |
+
);
|
| 636 |
+
}
|
| 637 |
+
function Zn(e) {
|
| 638 |
+
var n = e.graph();
|
| 639 |
+
e.removeNode(n.nestingRoot), delete n.nestingRoot, f(e.edges(), function(r) {
|
| 640 |
+
var t = e.edge(r);
|
| 641 |
+
t.nestingEdge && e.removeEdge(r);
|
| 642 |
+
});
|
| 643 |
+
}
|
| 644 |
+
function Kn(e, n, r) {
|
| 645 |
+
var t = {}, a;
|
| 646 |
+
f(r, function(i) {
|
| 647 |
+
for (var o = e.parent(i), u, d; o; ) {
|
| 648 |
+
if (u = e.parent(o), u ? (d = t[u], t[u] = o) : (d = a, a = o), d && d !== o) {
|
| 649 |
+
n.setEdge(d, o);
|
| 650 |
+
return;
|
| 651 |
+
}
|
| 652 |
+
o = u;
|
| 653 |
+
}
|
| 654 |
+
});
|
| 655 |
+
}
|
| 656 |
+
function er(e, n, r) {
|
| 657 |
+
var t = nr(e), a = new g({ compound: !0 }).setGraph({ root: t }).setDefaultNodeLabel(function(i) {
|
| 658 |
+
return e.node(i);
|
| 659 |
+
});
|
| 660 |
+
return f(e.nodes(), function(i) {
|
| 661 |
+
var o = e.node(i), u = e.parent(i);
|
| 662 |
+
(o.rank === n || o.minRank <= n && n <= o.maxRank) && (a.setNode(i), a.setParent(i, u || t), f(e[r](i), function(d) {
|
| 663 |
+
var s = d.v === i ? d.w : d.v, c = a.edge(s, i), l = m(c) ? 0 : c.weight;
|
| 664 |
+
a.setEdge(s, i, { weight: e.edge(d).weight + l });
|
| 665 |
+
}), Object.prototype.hasOwnProperty.call(o, "minRank") && a.setNode(i, {
|
| 666 |
+
borderLeft: o.borderLeft[n],
|
| 667 |
+
borderRight: o.borderRight[n]
|
| 668 |
+
}));
|
| 669 |
+
}), a;
|
| 670 |
+
}
|
| 671 |
+
function nr(e) {
|
| 672 |
+
for (var n; e.hasNode(n = H("_root")); ) ;
|
| 673 |
+
return n;
|
| 674 |
+
}
|
| 675 |
+
function rr(e, n) {
|
| 676 |
+
for (var r = 0, t = 1; t < n.length; ++t)
|
| 677 |
+
r += tr(e, n[t - 1], n[t]);
|
| 678 |
+
return r;
|
| 679 |
+
}
|
| 680 |
+
function tr(e, n, r) {
|
| 681 |
+
for (var t = vn(
|
| 682 |
+
r,
|
| 683 |
+
w(r, function(s, c) {
|
| 684 |
+
return c;
|
| 685 |
+
})
|
| 686 |
+
), a = O(
|
| 687 |
+
w(n, function(s) {
|
| 688 |
+
return R(
|
| 689 |
+
w(e.outEdges(s), function(c) {
|
| 690 |
+
return { pos: t[c.w], weight: e.edge(c).weight };
|
| 691 |
+
}),
|
| 692 |
+
"pos"
|
| 693 |
+
);
|
| 694 |
+
})
|
| 695 |
+
), i = 1; i < r.length; ) i <<= 1;
|
| 696 |
+
var o = 2 * i - 1;
|
| 697 |
+
i -= 1;
|
| 698 |
+
var u = w(new Array(o), function() {
|
| 699 |
+
return 0;
|
| 700 |
+
}), d = 0;
|
| 701 |
+
return f(
|
| 702 |
+
// @ts-expect-error
|
| 703 |
+
a.forEach(function(s) {
|
| 704 |
+
var c = s.pos + i;
|
| 705 |
+
u[c] += s.weight;
|
| 706 |
+
for (var l = 0; c > 0; )
|
| 707 |
+
c % 2 && (l += u[c + 1]), c = c - 1 >> 1, u[c] += s.weight;
|
| 708 |
+
d += s.weight * l;
|
| 709 |
+
})
|
| 710 |
+
), d;
|
| 711 |
+
}
|
| 712 |
+
function ar(e) {
|
| 713 |
+
var n = {}, r = _(e.nodes(), function(u) {
|
| 714 |
+
return !e.children(u).length;
|
| 715 |
+
}), t = y(
|
| 716 |
+
w(r, function(u) {
|
| 717 |
+
return e.node(u).rank;
|
| 718 |
+
})
|
| 719 |
+
), a = w(E(t + 1), function() {
|
| 720 |
+
return [];
|
| 721 |
+
});
|
| 722 |
+
function i(u) {
|
| 723 |
+
if (!ve(n, u)) {
|
| 724 |
+
n[u] = !0;
|
| 725 |
+
var d = e.node(u);
|
| 726 |
+
a[d.rank].push(u), f(e.successors(u), i);
|
| 727 |
+
}
|
| 728 |
+
}
|
| 729 |
+
var o = R(r, function(u) {
|
| 730 |
+
return e.node(u).rank;
|
| 731 |
+
});
|
| 732 |
+
return f(o, i), a;
|
| 733 |
+
}
|
| 734 |
+
function ir(e, n) {
|
| 735 |
+
return w(n, function(r) {
|
| 736 |
+
var t = e.inEdges(r);
|
| 737 |
+
if (t.length) {
|
| 738 |
+
var a = I(
|
| 739 |
+
t,
|
| 740 |
+
function(i, o) {
|
| 741 |
+
var u = e.edge(o), d = e.node(o.v);
|
| 742 |
+
return {
|
| 743 |
+
sum: i.sum + u.weight * d.order,
|
| 744 |
+
weight: i.weight + u.weight
|
| 745 |
+
};
|
| 746 |
+
},
|
| 747 |
+
{ sum: 0, weight: 0 }
|
| 748 |
+
);
|
| 749 |
+
return {
|
| 750 |
+
v: r,
|
| 751 |
+
barycenter: a.sum / a.weight,
|
| 752 |
+
weight: a.weight
|
| 753 |
+
};
|
| 754 |
+
} else
|
| 755 |
+
return { v: r };
|
| 756 |
+
});
|
| 757 |
+
}
|
| 758 |
+
function or(e, n) {
|
| 759 |
+
var r = {};
|
| 760 |
+
f(e, function(a, i) {
|
| 761 |
+
var o = r[a.v] = {
|
| 762 |
+
indegree: 0,
|
| 763 |
+
in: [],
|
| 764 |
+
out: [],
|
| 765 |
+
vs: [a.v],
|
| 766 |
+
i
|
| 767 |
+
};
|
| 768 |
+
m(a.barycenter) || (o.barycenter = a.barycenter, o.weight = a.weight);
|
| 769 |
+
}), f(n.edges(), function(a) {
|
| 770 |
+
var i = r[a.v], o = r[a.w];
|
| 771 |
+
!m(i) && !m(o) && (o.indegree++, i.out.push(r[a.w]));
|
| 772 |
+
});
|
| 773 |
+
var t = _(r, function(a) {
|
| 774 |
+
return !a.indegree;
|
| 775 |
+
});
|
| 776 |
+
return ur(t);
|
| 777 |
+
}
|
| 778 |
+
function ur(e) {
|
| 779 |
+
var n = [];
|
| 780 |
+
function r(i) {
|
| 781 |
+
return function(o) {
|
| 782 |
+
o.merged || (m(o.barycenter) || m(i.barycenter) || o.barycenter >= i.barycenter) && dr(i, o);
|
| 783 |
+
};
|
| 784 |
+
}
|
| 785 |
+
function t(i) {
|
| 786 |
+
return function(o) {
|
| 787 |
+
o.in.push(i), --o.indegree === 0 && e.push(o);
|
| 788 |
+
};
|
| 789 |
+
}
|
| 790 |
+
for (; e.length; ) {
|
| 791 |
+
var a = e.pop();
|
| 792 |
+
n.push(a), f(a.in.reverse(), r(a)), f(a.out, t(a));
|
| 793 |
+
}
|
| 794 |
+
return w(
|
| 795 |
+
_(n, function(i) {
|
| 796 |
+
return !i.merged;
|
| 797 |
+
}),
|
| 798 |
+
function(i) {
|
| 799 |
+
return M(i, ["vs", "i", "barycenter", "weight"]);
|
| 800 |
+
}
|
| 801 |
+
);
|
| 802 |
+
}
|
| 803 |
+
function dr(e, n) {
|
| 804 |
+
var r = 0, t = 0;
|
| 805 |
+
e.weight && (r += e.barycenter * e.weight, t += e.weight), n.weight && (r += n.barycenter * n.weight, t += n.weight), e.vs = n.vs.concat(e.vs), e.barycenter = r / t, e.weight = t, e.i = Math.min(n.i, e.i), n.merged = !0;
|
| 806 |
+
}
|
| 807 |
+
function sr(e, n) {
|
| 808 |
+
var r = Pn(e, function(c) {
|
| 809 |
+
return Object.prototype.hasOwnProperty.call(c, "barycenter");
|
| 810 |
+
}), t = r.lhs, a = R(r.rhs, function(c) {
|
| 811 |
+
return -c.i;
|
| 812 |
+
}), i = [], o = 0, u = 0, d = 0;
|
| 813 |
+
t.sort(fr(!!n)), d = de(i, a, d), f(t, function(c) {
|
| 814 |
+
d += c.vs.length, i.push(c.vs), o += c.barycenter * c.weight, u += c.weight, d = de(i, a, d);
|
| 815 |
+
});
|
| 816 |
+
var s = { vs: O(i) };
|
| 817 |
+
return u && (s.barycenter = o / u, s.weight = u), s;
|
| 818 |
+
}
|
| 819 |
+
function de(e, n, r) {
|
| 820 |
+
for (var t; n.length && (t = T(n)).i <= r; )
|
| 821 |
+
n.pop(), e.push(t.vs), r++;
|
| 822 |
+
return r;
|
| 823 |
+
}
|
| 824 |
+
function fr(e) {
|
| 825 |
+
return function(n, r) {
|
| 826 |
+
return n.barycenter < r.barycenter ? -1 : n.barycenter > r.barycenter ? 1 : e ? r.i - n.i : n.i - r.i;
|
| 827 |
+
};
|
| 828 |
+
}
|
| 829 |
+
function _e(e, n, r, t) {
|
| 830 |
+
var a = e.children(n), i = e.node(n), o = i ? i.borderLeft : void 0, u = i ? i.borderRight : void 0, d = {};
|
| 831 |
+
o && (a = _(a, function(p) {
|
| 832 |
+
return p !== o && p !== u;
|
| 833 |
+
}));
|
| 834 |
+
var s = ir(e, a);
|
| 835 |
+
f(s, function(p) {
|
| 836 |
+
if (e.children(p.v).length) {
|
| 837 |
+
var b = _e(e, p.v, r, t);
|
| 838 |
+
d[p.v] = b, Object.prototype.hasOwnProperty.call(b, "barycenter") && lr(p, b);
|
| 839 |
+
}
|
| 840 |
+
});
|
| 841 |
+
var c = or(s, r);
|
| 842 |
+
cr(c, d);
|
| 843 |
+
var l = sr(c, t);
|
| 844 |
+
if (o && (l.vs = O([o, l.vs, u]), e.predecessors(o).length)) {
|
| 845 |
+
var h = e.node(e.predecessors(o)[0]), v = e.node(e.predecessors(u)[0]);
|
| 846 |
+
Object.prototype.hasOwnProperty.call(l, "barycenter") || (l.barycenter = 0, l.weight = 0), l.barycenter = (l.barycenter * l.weight + h.order + v.order) / (l.weight + 2), l.weight += 2;
|
| 847 |
+
}
|
| 848 |
+
return l;
|
| 849 |
+
}
|
| 850 |
+
function cr(e, n) {
|
| 851 |
+
f(e, function(r) {
|
| 852 |
+
r.vs = O(
|
| 853 |
+
r.vs.map(function(t) {
|
| 854 |
+
return n[t] ? n[t].vs : t;
|
| 855 |
+
})
|
| 856 |
+
);
|
| 857 |
+
});
|
| 858 |
+
}
|
| 859 |
+
function lr(e, n) {
|
| 860 |
+
m(e.barycenter) ? (e.barycenter = n.barycenter, e.weight = n.weight) : (e.barycenter = (e.barycenter * e.weight + n.barycenter * n.weight) / (e.weight + n.weight), e.weight += n.weight);
|
| 861 |
+
}
|
| 862 |
+
function hr(e) {
|
| 863 |
+
var n = me(e), r = se(e, E(1, n + 1), "inEdges"), t = se(e, E(n - 1, -1, -1), "outEdges"), a = ar(e);
|
| 864 |
+
fe(e, a);
|
| 865 |
+
for (var i = Number.POSITIVE_INFINITY, o, u = 0, d = 0; d < 4; ++u, ++d) {
|
| 866 |
+
vr(u % 2 ? r : t, u % 4 >= 2), a = F(e);
|
| 867 |
+
var s = rr(e, a);
|
| 868 |
+
s < i && (d = 0, o = Ze(a), i = s);
|
| 869 |
+
}
|
| 870 |
+
fe(e, o);
|
| 871 |
+
}
|
| 872 |
+
function se(e, n, r) {
|
| 873 |
+
return w(n, function(t) {
|
| 874 |
+
return er(e, t, r);
|
| 875 |
+
});
|
| 876 |
+
}
|
| 877 |
+
function vr(e, n) {
|
| 878 |
+
var r = new g();
|
| 879 |
+
f(e, function(t) {
|
| 880 |
+
var a = t.graph().root, i = _e(t, a, r, n);
|
| 881 |
+
f(i.vs, function(o, u) {
|
| 882 |
+
t.node(o).order = u;
|
| 883 |
+
}), Kn(t, r, i.vs);
|
| 884 |
+
});
|
| 885 |
+
}
|
| 886 |
+
function fe(e, n) {
|
| 887 |
+
f(n, function(r) {
|
| 888 |
+
f(r, function(t, a) {
|
| 889 |
+
e.node(t).order = a;
|
| 890 |
+
});
|
| 891 |
+
});
|
| 892 |
+
}
|
| 893 |
+
function pr(e) {
|
| 894 |
+
var n = br(e);
|
| 895 |
+
f(e.graph().dummyChains, function(r) {
|
| 896 |
+
for (var t = e.node(r), a = t.edgeObj, i = wr(e, n, a.v, a.w), o = i.path, u = i.lca, d = 0, s = o[d], c = !0; r !== a.w; ) {
|
| 897 |
+
if (t = e.node(r), c) {
|
| 898 |
+
for (; (s = o[d]) !== u && e.node(s).maxRank < t.rank; )
|
| 899 |
+
d++;
|
| 900 |
+
s === u && (c = !1);
|
| 901 |
+
}
|
| 902 |
+
if (!c) {
|
| 903 |
+
for (; d < o.length - 1 && e.node(s = o[d + 1]).minRank <= t.rank; )
|
| 904 |
+
d++;
|
| 905 |
+
s = o[d];
|
| 906 |
+
}
|
| 907 |
+
e.setParent(r, s), r = e.successors(r)[0];
|
| 908 |
+
}
|
| 909 |
+
});
|
| 910 |
+
}
|
| 911 |
+
function wr(e, n, r, t) {
|
| 912 |
+
var a = [], i = [], o = Math.min(n[r].low, n[t].low), u = Math.max(n[r].lim, n[t].lim), d, s;
|
| 913 |
+
d = r;
|
| 914 |
+
do
|
| 915 |
+
d = e.parent(d), a.push(d);
|
| 916 |
+
while (d && (n[d].low > o || u > n[d].lim));
|
| 917 |
+
for (s = d, d = t; (d = e.parent(d)) !== s; )
|
| 918 |
+
i.push(d);
|
| 919 |
+
return { path: a.concat(i.reverse()), lca: s };
|
| 920 |
+
}
|
| 921 |
+
function br(e) {
|
| 922 |
+
var n = {}, r = 0;
|
| 923 |
+
function t(a) {
|
| 924 |
+
var i = r;
|
| 925 |
+
f(e.children(a), t), n[a] = { low: i, lim: r++ };
|
| 926 |
+
}
|
| 927 |
+
return f(e.children(), t), n;
|
| 928 |
+
}
|
| 929 |
+
function mr(e, n) {
|
| 930 |
+
var r = {};
|
| 931 |
+
function t(a, i) {
|
| 932 |
+
var o = 0, u = 0, d = a.length, s = T(i);
|
| 933 |
+
return f(i, function(c, l) {
|
| 934 |
+
var h = yr(e, c), v = h ? e.node(h).order : d;
|
| 935 |
+
(h || c === s) && (f(i.slice(u, l + 1), function(p) {
|
| 936 |
+
f(e.predecessors(p), function(b) {
|
| 937 |
+
var N = e.node(b), K = N.order;
|
| 938 |
+
(K < o || v < K) && !(N.dummy && e.node(p).dummy) && Re(r, b, p);
|
| 939 |
+
});
|
| 940 |
+
}), u = l + 1, o = v);
|
| 941 |
+
}), i;
|
| 942 |
+
}
|
| 943 |
+
return I(n, t), r;
|
| 944 |
+
}
|
| 945 |
+
function gr(e, n) {
|
| 946 |
+
var r = {};
|
| 947 |
+
function t(i, o, u, d, s) {
|
| 948 |
+
var c;
|
| 949 |
+
f(E(o, u), function(l) {
|
| 950 |
+
c = i[l], e.node(c).dummy && f(e.predecessors(c), function(h) {
|
| 951 |
+
var v = e.node(h);
|
| 952 |
+
v.dummy && (v.order < d || v.order > s) && Re(r, h, c);
|
| 953 |
+
});
|
| 954 |
+
});
|
| 955 |
+
}
|
| 956 |
+
function a(i, o) {
|
| 957 |
+
var u = -1, d, s = 0;
|
| 958 |
+
return f(o, function(c, l) {
|
| 959 |
+
if (e.node(c).dummy === "border") {
|
| 960 |
+
var h = e.predecessors(c);
|
| 961 |
+
h.length && (d = e.node(h[0]).order, t(o, s, l, u, d), s = l, u = d);
|
| 962 |
+
}
|
| 963 |
+
t(o, s, o.length, d, i.length);
|
| 964 |
+
}), o;
|
| 965 |
+
}
|
| 966 |
+
return I(n, a), r;
|
| 967 |
+
}
|
| 968 |
+
function yr(e, n) {
|
| 969 |
+
if (e.node(n).dummy)
|
| 970 |
+
return X(e.predecessors(n), function(r) {
|
| 971 |
+
return e.node(r).dummy;
|
| 972 |
+
});
|
| 973 |
+
}
|
| 974 |
+
function Re(e, n, r) {
|
| 975 |
+
if (n > r) {
|
| 976 |
+
var t = n;
|
| 977 |
+
n = r, r = t;
|
| 978 |
+
}
|
| 979 |
+
var a = e[n];
|
| 980 |
+
a || (e[n] = a = {}), a[r] = !0;
|
| 981 |
+
}
|
| 982 |
+
function kr(e, n, r) {
|
| 983 |
+
if (n > r) {
|
| 984 |
+
var t = n;
|
| 985 |
+
n = r, r = t;
|
| 986 |
+
}
|
| 987 |
+
return !!e[n] && Object.prototype.hasOwnProperty.call(e[n], r);
|
| 988 |
+
}
|
| 989 |
+
function xr(e, n, r, t) {
|
| 990 |
+
var a = {}, i = {}, o = {};
|
| 991 |
+
return f(n, function(u) {
|
| 992 |
+
f(u, function(d, s) {
|
| 993 |
+
a[d] = d, i[d] = d, o[d] = s;
|
| 994 |
+
});
|
| 995 |
+
}), f(n, function(u) {
|
| 996 |
+
var d = -1;
|
| 997 |
+
f(u, function(s) {
|
| 998 |
+
var c = t(s);
|
| 999 |
+
if (c.length) {
|
| 1000 |
+
c = R(c, function(b) {
|
| 1001 |
+
return o[b];
|
| 1002 |
+
});
|
| 1003 |
+
for (var l = (c.length - 1) / 2, h = Math.floor(l), v = Math.ceil(l); h <= v; ++h) {
|
| 1004 |
+
var p = c[h];
|
| 1005 |
+
i[s] === s && d < o[p] && !kr(r, s, p) && (i[p] = s, i[s] = a[s] = a[p], d = o[p]);
|
| 1006 |
+
}
|
| 1007 |
+
}
|
| 1008 |
+
});
|
| 1009 |
+
}), { root: a, align: i };
|
| 1010 |
+
}
|
| 1011 |
+
function Er(e, n, r, t, a) {
|
| 1012 |
+
var i = {}, o = Or(e, n, r, a), u = a ? "borderLeft" : "borderRight";
|
| 1013 |
+
function d(l, h) {
|
| 1014 |
+
for (var v = o.nodes(), p = v.pop(), b = {}; p; )
|
| 1015 |
+
b[p] ? l(p) : (b[p] = !0, v.push(p), v = v.concat(h(p))), p = v.pop();
|
| 1016 |
+
}
|
| 1017 |
+
function s(l) {
|
| 1018 |
+
i[l] = o.inEdges(l).reduce(function(h, v) {
|
| 1019 |
+
return Math.max(h, i[v.v] + o.edge(v));
|
| 1020 |
+
}, 0);
|
| 1021 |
+
}
|
| 1022 |
+
function c(l) {
|
| 1023 |
+
var h = o.outEdges(l).reduce(function(p, b) {
|
| 1024 |
+
return Math.min(p, i[b.w] - o.edge(b));
|
| 1025 |
+
}, Number.POSITIVE_INFINITY), v = e.node(l);
|
| 1026 |
+
h !== Number.POSITIVE_INFINITY && v.borderType !== u && (i[l] = Math.max(i[l], h));
|
| 1027 |
+
}
|
| 1028 |
+
return d(s, o.predecessors.bind(o)), d(c, o.successors.bind(o)), f(t, function(l) {
|
| 1029 |
+
i[l] = i[r[l]];
|
| 1030 |
+
}), i;
|
| 1031 |
+
}
|
| 1032 |
+
function Or(e, n, r, t) {
|
| 1033 |
+
var a = new g(), i = e.graph(), o = _r(i.nodesep, i.edgesep, t);
|
| 1034 |
+
return f(n, function(u) {
|
| 1035 |
+
var d;
|
| 1036 |
+
f(u, function(s) {
|
| 1037 |
+
var c = r[s];
|
| 1038 |
+
if (a.setNode(c), d) {
|
| 1039 |
+
var l = r[d], h = a.edge(l, c);
|
| 1040 |
+
a.setEdge(l, c, Math.max(o(e, s, d), h || 0));
|
| 1041 |
+
}
|
| 1042 |
+
d = s;
|
| 1043 |
+
});
|
| 1044 |
+
}), a;
|
| 1045 |
+
}
|
| 1046 |
+
function Lr(e, n) {
|
| 1047 |
+
return U(x(n), function(r) {
|
| 1048 |
+
var t = Number.NEGATIVE_INFINITY, a = Number.POSITIVE_INFINITY;
|
| 1049 |
+
return Ke(r, function(i, o) {
|
| 1050 |
+
var u = Rr(e, o) / 2;
|
| 1051 |
+
t = Math.max(i + u, t), a = Math.min(i - u, a);
|
| 1052 |
+
}), t - a;
|
| 1053 |
+
});
|
| 1054 |
+
}
|
| 1055 |
+
function Nr(e, n) {
|
| 1056 |
+
var r = x(n), t = P(r), a = y(r);
|
| 1057 |
+
f(["u", "d"], function(i) {
|
| 1058 |
+
f(["l", "r"], function(o) {
|
| 1059 |
+
var u = i + o, d = e[u], s;
|
| 1060 |
+
if (d !== n) {
|
| 1061 |
+
var c = x(d);
|
| 1062 |
+
s = o === "l" ? t - P(c) : a - y(c), s && (e[u] = S(d, function(l) {
|
| 1063 |
+
return l + s;
|
| 1064 |
+
}));
|
| 1065 |
+
}
|
| 1066 |
+
});
|
| 1067 |
+
});
|
| 1068 |
+
}
|
| 1069 |
+
function Pr(e, n) {
|
| 1070 |
+
return S(e.ul, function(r, t) {
|
| 1071 |
+
if (n)
|
| 1072 |
+
return e[n.toLowerCase()][t];
|
| 1073 |
+
var a = R(w(e, t));
|
| 1074 |
+
return (a[1] + a[2]) / 2;
|
| 1075 |
+
});
|
| 1076 |
+
}
|
| 1077 |
+
function Cr(e) {
|
| 1078 |
+
var n = F(e), r = $(mr(e, n), gr(e, n)), t = {}, a;
|
| 1079 |
+
f(["u", "d"], function(o) {
|
| 1080 |
+
a = o === "u" ? n : x(n).reverse(), f(["l", "r"], function(u) {
|
| 1081 |
+
u === "r" && (a = w(a, function(l) {
|
| 1082 |
+
return x(l).reverse();
|
| 1083 |
+
}));
|
| 1084 |
+
var d = (o === "u" ? e.predecessors : e.successors).bind(e), s = xr(e, a, r, d), c = Er(e, a, s.root, s.align, u === "r");
|
| 1085 |
+
u === "r" && (c = S(c, function(l) {
|
| 1086 |
+
return -l;
|
| 1087 |
+
})), t[o + u] = c;
|
| 1088 |
+
});
|
| 1089 |
+
});
|
| 1090 |
+
var i = Lr(e, t);
|
| 1091 |
+
return Nr(t, i), Pr(t, e.graph().align);
|
| 1092 |
+
}
|
| 1093 |
+
function _r(e, n, r) {
|
| 1094 |
+
return function(t, a, i) {
|
| 1095 |
+
var o = t.node(a), u = t.node(i), d = 0, s;
|
| 1096 |
+
if (d += o.width / 2, Object.prototype.hasOwnProperty.call(o, "labelpos"))
|
| 1097 |
+
switch (o.labelpos.toLowerCase()) {
|
| 1098 |
+
case "l":
|
| 1099 |
+
s = -o.width / 2;
|
| 1100 |
+
break;
|
| 1101 |
+
case "r":
|
| 1102 |
+
s = o.width / 2;
|
| 1103 |
+
break;
|
| 1104 |
+
}
|
| 1105 |
+
if (s && (d += r ? s : -s), s = 0, d += (o.dummy ? n : e) / 2, d += (u.dummy ? n : e) / 2, d += u.width / 2, Object.prototype.hasOwnProperty.call(u, "labelpos"))
|
| 1106 |
+
switch (u.labelpos.toLowerCase()) {
|
| 1107 |
+
case "l":
|
| 1108 |
+
s = u.width / 2;
|
| 1109 |
+
break;
|
| 1110 |
+
case "r":
|
| 1111 |
+
s = -u.width / 2;
|
| 1112 |
+
break;
|
| 1113 |
+
}
|
| 1114 |
+
return s && (d += r ? s : -s), s = 0, d;
|
| 1115 |
+
};
|
| 1116 |
+
}
|
| 1117 |
+
function Rr(e, n) {
|
| 1118 |
+
return e.node(n).width;
|
| 1119 |
+
}
|
| 1120 |
+
function Tr(e) {
|
| 1121 |
+
e = be(e), Mr(e), en(Cr(e), function(n, r) {
|
| 1122 |
+
e.node(r).x = n;
|
| 1123 |
+
});
|
| 1124 |
+
}
|
| 1125 |
+
function Mr(e) {
|
| 1126 |
+
var n = F(e), r = e.graph().ranksep, t = 0;
|
| 1127 |
+
f(n, function(a) {
|
| 1128 |
+
var i = y(
|
| 1129 |
+
w(a, function(o) {
|
| 1130 |
+
return e.node(o).height;
|
| 1131 |
+
})
|
| 1132 |
+
);
|
| 1133 |
+
f(a, function(o) {
|
| 1134 |
+
e.node(o).y = t + i / 2;
|
| 1135 |
+
}), t += i + r;
|
| 1136 |
+
});
|
| 1137 |
+
}
|
| 1138 |
+
function ot(e, n) {
|
| 1139 |
+
var r = Cn;
|
| 1140 |
+
r("layout", () => {
|
| 1141 |
+
var t = r(" buildLayoutGraph", () => qr(e));
|
| 1142 |
+
r(" runLayout", () => Ir(t, r)), r(" updateInputGraph", () => Sr(e, t));
|
| 1143 |
+
});
|
| 1144 |
+
}
|
| 1145 |
+
function Ir(e, n) {
|
| 1146 |
+
n(" makeSpaceForEdgeLabels", () => $r(e)), n(" removeSelfEdges", () => Kr(e)), n(" acyclic", () => kn(e)), n(" nestingGraph.run", () => Hn(e)), n(" rank", () => zn(be(e))), n(" injectEdgeLabelProxies", () => Wr(e)), n(" removeEmptyRanks", () => Nn(e)), n(" nestingGraph.cleanup", () => Zn(e)), n(" normalizeRanks", () => Ln(e)), n(" assignRankMinMax", () => zr(e)), n(" removeEdgeLabelProxies", () => Xr(e)), n(" normalize.run", () => Sn(e)), n(" parentDummyChains", () => pr(e)), n(" addBorderSegments", () => _n(e)), n(" order", () => hr(e)), n(" insertSelfEdges", () => et(e)), n(" adjustCoordinateSystem", () => Rn(e)), n(" position", () => Tr(e)), n(" positionSelfEdges", () => nt(e)), n(" removeBorderNodes", () => Zr(e)), n(" normalize.undo", () => jn(e)), n(" fixupEdgeLabelCoords", () => Jr(e)), n(" undoCoordinateSystem", () => Tn(e)), n(" translateGraph", () => Ur(e)), n(" assignNodeIntersects", () => Hr(e)), n(" reversePoints", () => Qr(e)), n(" acyclic.undo", () => En(e));
|
| 1147 |
+
}
|
| 1148 |
+
function Sr(e, n) {
|
| 1149 |
+
f(e.nodes(), function(r) {
|
| 1150 |
+
var t = e.node(r), a = n.node(r);
|
| 1151 |
+
t && (t.x = a.x, t.y = a.y, n.children(r).length && (t.width = a.width, t.height = a.height));
|
| 1152 |
+
}), f(e.edges(), function(r) {
|
| 1153 |
+
var t = e.edge(r), a = n.edge(r);
|
| 1154 |
+
t.points = a.points, Object.prototype.hasOwnProperty.call(a, "x") && (t.x = a.x, t.y = a.y);
|
| 1155 |
+
}), e.graph().width = n.graph().width, e.graph().height = n.graph().height;
|
| 1156 |
+
}
|
| 1157 |
+
var Fr = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], jr = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, Vr = ["acyclicer", "ranker", "rankdir", "align"], Ar = ["width", "height"], Br = { width: 0, height: 0 }, Gr = ["minlen", "weight", "width", "height", "labeloffset"], Yr = {
|
| 1158 |
+
minlen: 1,
|
| 1159 |
+
weight: 1,
|
| 1160 |
+
width: 0,
|
| 1161 |
+
height: 0,
|
| 1162 |
+
labeloffset: 10,
|
| 1163 |
+
labelpos: "r"
|
| 1164 |
+
}, Dr = ["labelpos"];
|
| 1165 |
+
function qr(e) {
|
| 1166 |
+
var n = new g({ multigraph: !0, compound: !0 }), r = D(e.graph());
|
| 1167 |
+
return n.setGraph(
|
| 1168 |
+
$({}, jr, Y(r, Fr), M(r, Vr))
|
| 1169 |
+
), f(e.nodes(), function(t) {
|
| 1170 |
+
var a = D(e.node(t));
|
| 1171 |
+
n.setNode(t, Be(Y(a, Ar), Br)), n.setParent(t, e.parent(t));
|
| 1172 |
+
}), f(e.edges(), function(t) {
|
| 1173 |
+
var a = D(e.edge(t));
|
| 1174 |
+
n.setEdge(
|
| 1175 |
+
t,
|
| 1176 |
+
$({}, Yr, Y(a, Gr), M(a, Dr))
|
| 1177 |
+
);
|
| 1178 |
+
}), n;
|
| 1179 |
+
}
|
| 1180 |
+
function $r(e) {
|
| 1181 |
+
var n = e.graph();
|
| 1182 |
+
n.ranksep /= 2, f(e.edges(), function(r) {
|
| 1183 |
+
var t = e.edge(r);
|
| 1184 |
+
t.minlen *= 2, t.labelpos.toLowerCase() !== "c" && (n.rankdir === "TB" || n.rankdir === "BT" ? t.width += t.labeloffset : t.height += t.labeloffset);
|
| 1185 |
+
});
|
| 1186 |
+
}
|
| 1187 |
+
function Wr(e) {
|
| 1188 |
+
f(e.edges(), function(n) {
|
| 1189 |
+
var r = e.edge(n);
|
| 1190 |
+
if (r.width && r.height) {
|
| 1191 |
+
var t = e.node(n.v), a = e.node(n.w), i = { rank: (a.rank - t.rank) / 2 + t.rank, e: n };
|
| 1192 |
+
L(e, "edge-proxy", i, "_ep");
|
| 1193 |
+
}
|
| 1194 |
+
});
|
| 1195 |
+
}
|
| 1196 |
+
function zr(e) {
|
| 1197 |
+
var n = 0;
|
| 1198 |
+
f(e.nodes(), function(r) {
|
| 1199 |
+
var t = e.node(r);
|
| 1200 |
+
t.borderTop && (t.minRank = e.node(t.borderTop).rank, t.maxRank = e.node(t.borderBottom).rank, n = y(n, t.maxRank));
|
| 1201 |
+
}), e.graph().maxRank = n;
|
| 1202 |
+
}
|
| 1203 |
+
function Xr(e) {
|
| 1204 |
+
f(e.nodes(), function(n) {
|
| 1205 |
+
var r = e.node(n);
|
| 1206 |
+
r.dummy === "edge-proxy" && (e.edge(r.e).labelRank = r.rank, e.removeNode(n));
|
| 1207 |
+
});
|
| 1208 |
+
}
|
| 1209 |
+
function Ur(e) {
|
| 1210 |
+
var n = Number.POSITIVE_INFINITY, r = 0, t = Number.POSITIVE_INFINITY, a = 0, i = e.graph(), o = i.marginx || 0, u = i.marginy || 0;
|
| 1211 |
+
function d(s) {
|
| 1212 |
+
var c = s.x, l = s.y, h = s.width, v = s.height;
|
| 1213 |
+
n = Math.min(n, c - h / 2), r = Math.max(r, c + h / 2), t = Math.min(t, l - v / 2), a = Math.max(a, l + v / 2);
|
| 1214 |
+
}
|
| 1215 |
+
f(e.nodes(), function(s) {
|
| 1216 |
+
d(e.node(s));
|
| 1217 |
+
}), f(e.edges(), function(s) {
|
| 1218 |
+
var c = e.edge(s);
|
| 1219 |
+
Object.prototype.hasOwnProperty.call(c, "x") && d(c);
|
| 1220 |
+
}), n -= o, t -= u, f(e.nodes(), function(s) {
|
| 1221 |
+
var c = e.node(s);
|
| 1222 |
+
c.x -= n, c.y -= t;
|
| 1223 |
+
}), f(e.edges(), function(s) {
|
| 1224 |
+
var c = e.edge(s);
|
| 1225 |
+
f(c.points, function(l) {
|
| 1226 |
+
l.x -= n, l.y -= t;
|
| 1227 |
+
}), Object.prototype.hasOwnProperty.call(c, "x") && (c.x -= n), Object.prototype.hasOwnProperty.call(c, "y") && (c.y -= t);
|
| 1228 |
+
}), i.width = r - n + o, i.height = a - t + u;
|
| 1229 |
+
}
|
| 1230 |
+
function Hr(e) {
|
| 1231 |
+
f(e.edges(), function(n) {
|
| 1232 |
+
var r = e.edge(n), t = e.node(n.v), a = e.node(n.w), i, o;
|
| 1233 |
+
r.points ? (i = r.points[0], o = r.points[r.points.length - 1]) : (r.points = [], i = a, o = t), r.points.unshift(re(t, i)), r.points.push(re(a, o));
|
| 1234 |
+
});
|
| 1235 |
+
}
|
| 1236 |
+
function Jr(e) {
|
| 1237 |
+
f(e.edges(), function(n) {
|
| 1238 |
+
var r = e.edge(n);
|
| 1239 |
+
if (Object.prototype.hasOwnProperty.call(r, "x"))
|
| 1240 |
+
switch ((r.labelpos === "l" || r.labelpos === "r") && (r.width -= r.labeloffset), r.labelpos) {
|
| 1241 |
+
case "l":
|
| 1242 |
+
r.x -= r.width / 2 + r.labeloffset;
|
| 1243 |
+
break;
|
| 1244 |
+
case "r":
|
| 1245 |
+
r.x += r.width / 2 + r.labeloffset;
|
| 1246 |
+
break;
|
| 1247 |
+
}
|
| 1248 |
+
});
|
| 1249 |
+
}
|
| 1250 |
+
function Qr(e) {
|
| 1251 |
+
f(e.edges(), function(n) {
|
| 1252 |
+
var r = e.edge(n);
|
| 1253 |
+
r.reversed && r.points.reverse();
|
| 1254 |
+
});
|
| 1255 |
+
}
|
| 1256 |
+
function Zr(e) {
|
| 1257 |
+
f(e.nodes(), function(n) {
|
| 1258 |
+
if (e.children(n).length) {
|
| 1259 |
+
var r = e.node(n), t = e.node(r.borderTop), a = e.node(r.borderBottom), i = e.node(T(r.borderLeft)), o = e.node(T(r.borderRight));
|
| 1260 |
+
r.width = Math.abs(o.x - i.x), r.height = Math.abs(a.y - t.y), r.x = i.x + r.width / 2, r.y = t.y + r.height / 2;
|
| 1261 |
+
}
|
| 1262 |
+
}), f(e.nodes(), function(n) {
|
| 1263 |
+
e.node(n).dummy === "border" && e.removeNode(n);
|
| 1264 |
+
});
|
| 1265 |
+
}
|
| 1266 |
+
function Kr(e) {
|
| 1267 |
+
f(e.edges(), function(n) {
|
| 1268 |
+
if (n.v === n.w) {
|
| 1269 |
+
var r = e.node(n.v);
|
| 1270 |
+
r.selfEdges || (r.selfEdges = []), r.selfEdges.push({ e: n, label: e.edge(n) }), e.removeEdge(n);
|
| 1271 |
+
}
|
| 1272 |
+
});
|
| 1273 |
+
}
|
| 1274 |
+
function et(e) {
|
| 1275 |
+
var n = F(e);
|
| 1276 |
+
f(n, function(r) {
|
| 1277 |
+
var t = 0;
|
| 1278 |
+
f(r, function(a, i) {
|
| 1279 |
+
var o = e.node(a);
|
| 1280 |
+
o.order = i + t, f(o.selfEdges, function(u) {
|
| 1281 |
+
L(
|
| 1282 |
+
e,
|
| 1283 |
+
"selfedge",
|
| 1284 |
+
{
|
| 1285 |
+
width: u.label.width,
|
| 1286 |
+
height: u.label.height,
|
| 1287 |
+
rank: o.rank,
|
| 1288 |
+
order: i + ++t,
|
| 1289 |
+
e: u.e,
|
| 1290 |
+
label: u.label
|
| 1291 |
+
},
|
| 1292 |
+
"_se"
|
| 1293 |
+
);
|
| 1294 |
+
}), delete o.selfEdges;
|
| 1295 |
+
});
|
| 1296 |
+
});
|
| 1297 |
+
}
|
| 1298 |
+
function nt(e) {
|
| 1299 |
+
f(e.nodes(), function(n) {
|
| 1300 |
+
var r = e.node(n);
|
| 1301 |
+
if (r.dummy === "selfedge") {
|
| 1302 |
+
var t = e.node(r.e.v), a = t.x + t.width / 2, i = t.y, o = r.x - a, u = t.height / 2;
|
| 1303 |
+
e.setEdge(r.e, r.label), e.removeNode(n), r.label.points = [
|
| 1304 |
+
{ x: a + 2 * o / 3, y: i - u },
|
| 1305 |
+
{ x: a + 5 * o / 6, y: i - u },
|
| 1306 |
+
{ x: a + o, y: i },
|
| 1307 |
+
{ x: a + 5 * o / 6, y: i + u },
|
| 1308 |
+
{ x: a + 2 * o / 3, y: i + u }
|
| 1309 |
+
], r.label.x = r.x, r.label.y = r.y;
|
| 1310 |
+
}
|
| 1311 |
+
});
|
| 1312 |
+
}
|
| 1313 |
+
function Y(e, n) {
|
| 1314 |
+
return S(M(e, n), Number);
|
| 1315 |
+
}
|
| 1316 |
+
function D(e) {
|
| 1317 |
+
var n = {};
|
| 1318 |
+
return f(e, function(r, t) {
|
| 1319 |
+
n[t.toLowerCase()] = r;
|
| 1320 |
+
}), n;
|
| 1321 |
+
}
|
| 1322 |
+
export {
|
| 1323 |
+
ot as l
|
| 1324 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/linear-Cldj0_Rh.js
ADDED
|
@@ -0,0 +1,423 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { a$ as un, b0 as I, b1 as U, b2 as fn, b3 as Y } from "./mermaid.core-CfPtPiLZ.js";
|
| 2 |
+
import { i as cn } from "./init-DjUOC4st.js";
|
| 3 |
+
function F(n, t) {
|
| 4 |
+
return n == null || t == null ? NaN : n < t ? -1 : n > t ? 1 : n >= t ? 0 : NaN;
|
| 5 |
+
}
|
| 6 |
+
function hn(n, t) {
|
| 7 |
+
return n == null || t == null ? NaN : t < n ? -1 : t > n ? 1 : t >= n ? 0 : NaN;
|
| 8 |
+
}
|
| 9 |
+
function _(n) {
|
| 10 |
+
let t, e, r;
|
| 11 |
+
n.length !== 2 ? (t = F, e = (u, c) => F(n(u), c), r = (u, c) => n(u) - c) : (t = n === F || n === hn ? n : mn, e = n, r = n);
|
| 12 |
+
function i(u, c, o = 0, s = u.length) {
|
| 13 |
+
if (o < s) {
|
| 14 |
+
if (t(c, c) !== 0) return s;
|
| 15 |
+
do {
|
| 16 |
+
const h = o + s >>> 1;
|
| 17 |
+
e(u[h], c) < 0 ? o = h + 1 : s = h;
|
| 18 |
+
} while (o < s);
|
| 19 |
+
}
|
| 20 |
+
return o;
|
| 21 |
+
}
|
| 22 |
+
function f(u, c, o = 0, s = u.length) {
|
| 23 |
+
if (o < s) {
|
| 24 |
+
if (t(c, c) !== 0) return s;
|
| 25 |
+
do {
|
| 26 |
+
const h = o + s >>> 1;
|
| 27 |
+
e(u[h], c) <= 0 ? o = h + 1 : s = h;
|
| 28 |
+
} while (o < s);
|
| 29 |
+
}
|
| 30 |
+
return o;
|
| 31 |
+
}
|
| 32 |
+
function a(u, c, o = 0, s = u.length) {
|
| 33 |
+
const h = i(u, c, o, s - 1);
|
| 34 |
+
return h > o && r(u[h - 1], c) > -r(u[h], c) ? h - 1 : h;
|
| 35 |
+
}
|
| 36 |
+
return { left: i, center: a, right: f };
|
| 37 |
+
}
|
| 38 |
+
function mn() {
|
| 39 |
+
return 0;
|
| 40 |
+
}
|
| 41 |
+
function ln(n) {
|
| 42 |
+
return n === null ? NaN : +n;
|
| 43 |
+
}
|
| 44 |
+
const sn = _(F), dn = sn.right;
|
| 45 |
+
_(ln).center;
|
| 46 |
+
const gn = Math.sqrt(50), yn = Math.sqrt(10), Mn = Math.sqrt(2);
|
| 47 |
+
function R(n, t, e) {
|
| 48 |
+
const r = (t - n) / Math.max(0, e), i = Math.floor(Math.log10(r)), f = r / Math.pow(10, i), a = f >= gn ? 10 : f >= yn ? 5 : f >= Mn ? 2 : 1;
|
| 49 |
+
let u, c, o;
|
| 50 |
+
return i < 0 ? (o = Math.pow(10, -i) / a, u = Math.round(n * o), c = Math.round(t * o), u / o < n && ++u, c / o > t && --c, o = -o) : (o = Math.pow(10, i) * a, u = Math.round(n / o), c = Math.round(t / o), u * o < n && ++u, c * o > t && --c), c < u && 0.5 <= e && e < 2 ? R(n, t, e * 2) : [u, c, o];
|
| 51 |
+
}
|
| 52 |
+
function pn(n, t, e) {
|
| 53 |
+
if (t = +t, n = +n, e = +e, !(e > 0)) return [];
|
| 54 |
+
if (n === t) return [n];
|
| 55 |
+
const r = t < n, [i, f, a] = r ? R(t, n, e) : R(n, t, e);
|
| 56 |
+
if (!(f >= i)) return [];
|
| 57 |
+
const u = f - i + 1, c = new Array(u);
|
| 58 |
+
if (r)
|
| 59 |
+
if (a < 0) for (let o = 0; o < u; ++o) c[o] = (f - o) / -a;
|
| 60 |
+
else for (let o = 0; o < u; ++o) c[o] = (f - o) * a;
|
| 61 |
+
else if (a < 0) for (let o = 0; o < u; ++o) c[o] = (i + o) / -a;
|
| 62 |
+
else for (let o = 0; o < u; ++o) c[o] = (i + o) * a;
|
| 63 |
+
return c;
|
| 64 |
+
}
|
| 65 |
+
function L(n, t, e) {
|
| 66 |
+
return t = +t, n = +n, e = +e, R(n, t, e)[2];
|
| 67 |
+
}
|
| 68 |
+
function wn(n, t, e) {
|
| 69 |
+
t = +t, n = +n, e = +e;
|
| 70 |
+
const r = t < n, i = r ? L(t, n, e) : L(n, t, e);
|
| 71 |
+
return (r ? -1 : 1) * (i < 0 ? 1 / -i : i);
|
| 72 |
+
}
|
| 73 |
+
function Nn(n, t) {
|
| 74 |
+
t || (t = []);
|
| 75 |
+
var e = n ? Math.min(t.length, n.length) : 0, r = t.slice(), i;
|
| 76 |
+
return function(f) {
|
| 77 |
+
for (i = 0; i < e; ++i) r[i] = n[i] * (1 - f) + t[i] * f;
|
| 78 |
+
return r;
|
| 79 |
+
};
|
| 80 |
+
}
|
| 81 |
+
function kn(n) {
|
| 82 |
+
return ArrayBuffer.isView(n) && !(n instanceof DataView);
|
| 83 |
+
}
|
| 84 |
+
function xn(n, t) {
|
| 85 |
+
var e = t ? t.length : 0, r = n ? Math.min(e, n.length) : 0, i = new Array(r), f = new Array(e), a;
|
| 86 |
+
for (a = 0; a < r; ++a) i[a] = C(n[a], t[a]);
|
| 87 |
+
for (; a < e; ++a) f[a] = t[a];
|
| 88 |
+
return function(u) {
|
| 89 |
+
for (a = 0; a < r; ++a) f[a] = i[a](u);
|
| 90 |
+
return f;
|
| 91 |
+
};
|
| 92 |
+
}
|
| 93 |
+
function An(n, t) {
|
| 94 |
+
var e = /* @__PURE__ */ new Date();
|
| 95 |
+
return n = +n, t = +t, function(r) {
|
| 96 |
+
return e.setTime(n * (1 - r) + t * r), e;
|
| 97 |
+
};
|
| 98 |
+
}
|
| 99 |
+
function vn(n, t) {
|
| 100 |
+
var e = {}, r = {}, i;
|
| 101 |
+
(n === null || typeof n != "object") && (n = {}), (t === null || typeof t != "object") && (t = {});
|
| 102 |
+
for (i in t)
|
| 103 |
+
i in n ? e[i] = C(n[i], t[i]) : r[i] = t[i];
|
| 104 |
+
return function(f) {
|
| 105 |
+
for (i in e) r[i] = e[i](f);
|
| 106 |
+
return r;
|
| 107 |
+
};
|
| 108 |
+
}
|
| 109 |
+
function C(n, t) {
|
| 110 |
+
var e = typeof t, r;
|
| 111 |
+
return t == null || e === "boolean" ? un(t) : (e === "number" ? I : e === "string" ? (r = Y(t)) ? (t = r, U) : fn : t instanceof Y ? U : t instanceof Date ? An : kn(t) ? Nn : Array.isArray(t) ? xn : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? vn : I)(n, t);
|
| 112 |
+
}
|
| 113 |
+
function Sn(n, t) {
|
| 114 |
+
return n = +n, t = +t, function(e) {
|
| 115 |
+
return Math.round(n * (1 - e) + t * e);
|
| 116 |
+
};
|
| 117 |
+
}
|
| 118 |
+
function bn(n) {
|
| 119 |
+
return Math.abs(n = Math.round(n)) >= 1e21 ? n.toLocaleString("en").replace(/,/g, "") : n.toString(10);
|
| 120 |
+
}
|
| 121 |
+
function E(n, t) {
|
| 122 |
+
if ((e = (n = t ? n.toExponential(t - 1) : n.toExponential()).indexOf("e")) < 0) return null;
|
| 123 |
+
var e, r = n.slice(0, e);
|
| 124 |
+
return [
|
| 125 |
+
r.length > 1 ? r[0] + r.slice(2) : r,
|
| 126 |
+
+n.slice(e + 1)
|
| 127 |
+
];
|
| 128 |
+
}
|
| 129 |
+
function v(n) {
|
| 130 |
+
return n = E(Math.abs(n)), n ? n[1] : NaN;
|
| 131 |
+
}
|
| 132 |
+
function jn(n, t) {
|
| 133 |
+
return function(e, r) {
|
| 134 |
+
for (var i = e.length, f = [], a = 0, u = n[0], c = 0; i > 0 && u > 0 && (c + u + 1 > r && (u = Math.max(1, r - c)), f.push(e.substring(i -= u, i + u)), !((c += u + 1) > r)); )
|
| 135 |
+
u = n[a = (a + 1) % n.length];
|
| 136 |
+
return f.reverse().join(t);
|
| 137 |
+
};
|
| 138 |
+
}
|
| 139 |
+
function Pn(n) {
|
| 140 |
+
return function(t) {
|
| 141 |
+
return t.replace(/[0-9]/g, function(e) {
|
| 142 |
+
return n[+e];
|
| 143 |
+
});
|
| 144 |
+
};
|
| 145 |
+
}
|
| 146 |
+
var zn = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
| 147 |
+
function D(n) {
|
| 148 |
+
if (!(t = zn.exec(n))) throw new Error("invalid format: " + n);
|
| 149 |
+
var t;
|
| 150 |
+
return new B({
|
| 151 |
+
fill: t[1],
|
| 152 |
+
align: t[2],
|
| 153 |
+
sign: t[3],
|
| 154 |
+
symbol: t[4],
|
| 155 |
+
zero: t[5],
|
| 156 |
+
width: t[6],
|
| 157 |
+
comma: t[7],
|
| 158 |
+
precision: t[8] && t[8].slice(1),
|
| 159 |
+
trim: t[9],
|
| 160 |
+
type: t[10]
|
| 161 |
+
});
|
| 162 |
+
}
|
| 163 |
+
D.prototype = B.prototype;
|
| 164 |
+
function B(n) {
|
| 165 |
+
this.fill = n.fill === void 0 ? " " : n.fill + "", this.align = n.align === void 0 ? ">" : n.align + "", this.sign = n.sign === void 0 ? "-" : n.sign + "", this.symbol = n.symbol === void 0 ? "" : n.symbol + "", this.zero = !!n.zero, this.width = n.width === void 0 ? void 0 : +n.width, this.comma = !!n.comma, this.precision = n.precision === void 0 ? void 0 : +n.precision, this.trim = !!n.trim, this.type = n.type === void 0 ? "" : n.type + "";
|
| 166 |
+
}
|
| 167 |
+
B.prototype.toString = function() {
|
| 168 |
+
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
|
| 169 |
+
};
|
| 170 |
+
function $n(n) {
|
| 171 |
+
n: for (var t = n.length, e = 1, r = -1, i; e < t; ++e)
|
| 172 |
+
switch (n[e]) {
|
| 173 |
+
case ".":
|
| 174 |
+
r = i = e;
|
| 175 |
+
break;
|
| 176 |
+
case "0":
|
| 177 |
+
r === 0 && (r = e), i = e;
|
| 178 |
+
break;
|
| 179 |
+
default:
|
| 180 |
+
if (!+n[e]) break n;
|
| 181 |
+
r > 0 && (r = 0);
|
| 182 |
+
break;
|
| 183 |
+
}
|
| 184 |
+
return r > 0 ? n.slice(0, r) + n.slice(i + 1) : n;
|
| 185 |
+
}
|
| 186 |
+
var nn;
|
| 187 |
+
function Fn(n, t) {
|
| 188 |
+
var e = E(n, t);
|
| 189 |
+
if (!e) return n + "";
|
| 190 |
+
var r = e[0], i = e[1], f = i - (nn = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, a = r.length;
|
| 191 |
+
return f === a ? r : f > a ? r + new Array(f - a + 1).join("0") : f > 0 ? r.slice(0, f) + "." + r.slice(f) : "0." + new Array(1 - f).join("0") + E(n, Math.max(0, t + f - 1))[0];
|
| 192 |
+
}
|
| 193 |
+
function Z(n, t) {
|
| 194 |
+
var e = E(n, t);
|
| 195 |
+
if (!e) return n + "";
|
| 196 |
+
var r = e[0], i = e[1];
|
| 197 |
+
return i < 0 ? "0." + new Array(-i).join("0") + r : r.length > i + 1 ? r.slice(0, i + 1) + "." + r.slice(i + 1) : r + new Array(i - r.length + 2).join("0");
|
| 198 |
+
}
|
| 199 |
+
const H = {
|
| 200 |
+
"%": (n, t) => (n * 100).toFixed(t),
|
| 201 |
+
b: (n) => Math.round(n).toString(2),
|
| 202 |
+
c: (n) => n + "",
|
| 203 |
+
d: bn,
|
| 204 |
+
e: (n, t) => n.toExponential(t),
|
| 205 |
+
f: (n, t) => n.toFixed(t),
|
| 206 |
+
g: (n, t) => n.toPrecision(t),
|
| 207 |
+
o: (n) => Math.round(n).toString(8),
|
| 208 |
+
p: (n, t) => Z(n * 100, t),
|
| 209 |
+
r: Z,
|
| 210 |
+
s: Fn,
|
| 211 |
+
X: (n) => Math.round(n).toString(16).toUpperCase(),
|
| 212 |
+
x: (n) => Math.round(n).toString(16)
|
| 213 |
+
};
|
| 214 |
+
function J(n) {
|
| 215 |
+
return n;
|
| 216 |
+
}
|
| 217 |
+
var K = Array.prototype.map, Q = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
| 218 |
+
function Rn(n) {
|
| 219 |
+
var t = n.grouping === void 0 || n.thousands === void 0 ? J : jn(K.call(n.grouping, Number), n.thousands + ""), e = n.currency === void 0 ? "" : n.currency[0] + "", r = n.currency === void 0 ? "" : n.currency[1] + "", i = n.decimal === void 0 ? "." : n.decimal + "", f = n.numerals === void 0 ? J : Pn(K.call(n.numerals, String)), a = n.percent === void 0 ? "%" : n.percent + "", u = n.minus === void 0 ? "−" : n.minus + "", c = n.nan === void 0 ? "NaN" : n.nan + "";
|
| 220 |
+
function o(h) {
|
| 221 |
+
h = D(h);
|
| 222 |
+
var l = h.fill, p = h.align, y = h.sign, S = h.symbol, k = h.zero, b = h.width, T = h.comma, w = h.precision, G = h.trim, d = h.type;
|
| 223 |
+
d === "n" ? (T = !0, d = "g") : H[d] || (w === void 0 && (w = 12), G = !0, d = "g"), (k || l === "0" && p === "=") && (k = !0, l = "0", p = "=");
|
| 224 |
+
var en = S === "$" ? e : S === "#" && /[boxX]/.test(d) ? "0" + d.toLowerCase() : "", on = S === "$" ? r : /[%p]/.test(d) ? a : "", O = H[d], an = /[defgprs%]/.test(d);
|
| 225 |
+
w = w === void 0 ? 6 : /[gprs]/.test(d) ? Math.max(1, Math.min(21, w)) : Math.max(0, Math.min(20, w));
|
| 226 |
+
function V(m) {
|
| 227 |
+
var N = en, g = on, x, X, j;
|
| 228 |
+
if (d === "c")
|
| 229 |
+
g = O(m) + g, m = "";
|
| 230 |
+
else {
|
| 231 |
+
m = +m;
|
| 232 |
+
var P = m < 0 || 1 / m < 0;
|
| 233 |
+
if (m = isNaN(m) ? c : O(Math.abs(m), w), G && (m = $n(m)), P && +m == 0 && y !== "+" && (P = !1), N = (P ? y === "(" ? y : u : y === "-" || y === "(" ? "" : y) + N, g = (d === "s" ? Q[8 + nn / 3] : "") + g + (P && y === "(" ? ")" : ""), an) {
|
| 234 |
+
for (x = -1, X = m.length; ++x < X; )
|
| 235 |
+
if (j = m.charCodeAt(x), 48 > j || j > 57) {
|
| 236 |
+
g = (j === 46 ? i + m.slice(x + 1) : m.slice(x)) + g, m = m.slice(0, x);
|
| 237 |
+
break;
|
| 238 |
+
}
|
| 239 |
+
}
|
| 240 |
+
}
|
| 241 |
+
T && !k && (m = t(m, 1 / 0));
|
| 242 |
+
var z = N.length + m.length + g.length, M = z < b ? new Array(b - z + 1).join(l) : "";
|
| 243 |
+
switch (T && k && (m = t(M + m, M.length ? b - g.length : 1 / 0), M = ""), p) {
|
| 244 |
+
case "<":
|
| 245 |
+
m = N + m + g + M;
|
| 246 |
+
break;
|
| 247 |
+
case "=":
|
| 248 |
+
m = N + M + m + g;
|
| 249 |
+
break;
|
| 250 |
+
case "^":
|
| 251 |
+
m = M.slice(0, z = M.length >> 1) + N + m + g + M.slice(z);
|
| 252 |
+
break;
|
| 253 |
+
default:
|
| 254 |
+
m = M + N + m + g;
|
| 255 |
+
break;
|
| 256 |
+
}
|
| 257 |
+
return f(m);
|
| 258 |
+
}
|
| 259 |
+
return V.toString = function() {
|
| 260 |
+
return h + "";
|
| 261 |
+
}, V;
|
| 262 |
+
}
|
| 263 |
+
function s(h, l) {
|
| 264 |
+
var p = o((h = D(h), h.type = "f", h)), y = Math.max(-8, Math.min(8, Math.floor(v(l) / 3))) * 3, S = Math.pow(10, -y), k = Q[8 + y / 3];
|
| 265 |
+
return function(b) {
|
| 266 |
+
return p(S * b) + k;
|
| 267 |
+
};
|
| 268 |
+
}
|
| 269 |
+
return {
|
| 270 |
+
format: o,
|
| 271 |
+
formatPrefix: s
|
| 272 |
+
};
|
| 273 |
+
}
|
| 274 |
+
var $, tn, rn;
|
| 275 |
+
En({
|
| 276 |
+
thousands: ",",
|
| 277 |
+
grouping: [3],
|
| 278 |
+
currency: ["$", ""]
|
| 279 |
+
});
|
| 280 |
+
function En(n) {
|
| 281 |
+
return $ = Rn(n), tn = $.format, rn = $.formatPrefix, $;
|
| 282 |
+
}
|
| 283 |
+
function Dn(n) {
|
| 284 |
+
return Math.max(0, -v(Math.abs(n)));
|
| 285 |
+
}
|
| 286 |
+
function Tn(n, t) {
|
| 287 |
+
return Math.max(0, Math.max(-8, Math.min(8, Math.floor(v(t) / 3))) * 3 - v(Math.abs(n)));
|
| 288 |
+
}
|
| 289 |
+
function In(n, t) {
|
| 290 |
+
return n = Math.abs(n), t = Math.abs(t) - n, Math.max(0, v(t) - v(n)) + 1;
|
| 291 |
+
}
|
| 292 |
+
function Ln(n) {
|
| 293 |
+
return function() {
|
| 294 |
+
return n;
|
| 295 |
+
};
|
| 296 |
+
}
|
| 297 |
+
function qn(n) {
|
| 298 |
+
return +n;
|
| 299 |
+
}
|
| 300 |
+
var W = [0, 1];
|
| 301 |
+
function A(n) {
|
| 302 |
+
return n;
|
| 303 |
+
}
|
| 304 |
+
function q(n, t) {
|
| 305 |
+
return (t -= n = +n) ? function(e) {
|
| 306 |
+
return (e - n) / t;
|
| 307 |
+
} : Ln(isNaN(t) ? NaN : 0.5);
|
| 308 |
+
}
|
| 309 |
+
function Cn(n, t) {
|
| 310 |
+
var e;
|
| 311 |
+
return n > t && (e = n, n = t, t = e), function(r) {
|
| 312 |
+
return Math.max(n, Math.min(t, r));
|
| 313 |
+
};
|
| 314 |
+
}
|
| 315 |
+
function Bn(n, t, e) {
|
| 316 |
+
var r = n[0], i = n[1], f = t[0], a = t[1];
|
| 317 |
+
return i < r ? (r = q(i, r), f = e(a, f)) : (r = q(r, i), f = e(f, a)), function(u) {
|
| 318 |
+
return f(r(u));
|
| 319 |
+
};
|
| 320 |
+
}
|
| 321 |
+
function Gn(n, t, e) {
|
| 322 |
+
var r = Math.min(n.length, t.length) - 1, i = new Array(r), f = new Array(r), a = -1;
|
| 323 |
+
for (n[r] < n[0] && (n = n.slice().reverse(), t = t.slice().reverse()); ++a < r; )
|
| 324 |
+
i[a] = q(n[a], n[a + 1]), f[a] = e(t[a], t[a + 1]);
|
| 325 |
+
return function(u) {
|
| 326 |
+
var c = dn(n, u, 1, r) - 1;
|
| 327 |
+
return f[c](i[c](u));
|
| 328 |
+
};
|
| 329 |
+
}
|
| 330 |
+
function On(n, t) {
|
| 331 |
+
return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown());
|
| 332 |
+
}
|
| 333 |
+
function Vn() {
|
| 334 |
+
var n = W, t = W, e = C, r, i, f, a = A, u, c, o;
|
| 335 |
+
function s() {
|
| 336 |
+
var l = Math.min(n.length, t.length);
|
| 337 |
+
return a !== A && (a = Cn(n[0], n[l - 1])), u = l > 2 ? Gn : Bn, c = o = null, h;
|
| 338 |
+
}
|
| 339 |
+
function h(l) {
|
| 340 |
+
return l == null || isNaN(l = +l) ? f : (c || (c = u(n.map(r), t, e)))(r(a(l)));
|
| 341 |
+
}
|
| 342 |
+
return h.invert = function(l) {
|
| 343 |
+
return a(i((o || (o = u(t, n.map(r), I)))(l)));
|
| 344 |
+
}, h.domain = function(l) {
|
| 345 |
+
return arguments.length ? (n = Array.from(l, qn), s()) : n.slice();
|
| 346 |
+
}, h.range = function(l) {
|
| 347 |
+
return arguments.length ? (t = Array.from(l), s()) : t.slice();
|
| 348 |
+
}, h.rangeRound = function(l) {
|
| 349 |
+
return t = Array.from(l), e = Sn, s();
|
| 350 |
+
}, h.clamp = function(l) {
|
| 351 |
+
return arguments.length ? (a = l ? !0 : A, s()) : a !== A;
|
| 352 |
+
}, h.interpolate = function(l) {
|
| 353 |
+
return arguments.length ? (e = l, s()) : e;
|
| 354 |
+
}, h.unknown = function(l) {
|
| 355 |
+
return arguments.length ? (f = l, h) : f;
|
| 356 |
+
}, function(l, p) {
|
| 357 |
+
return r = l, i = p, s();
|
| 358 |
+
};
|
| 359 |
+
}
|
| 360 |
+
function Xn() {
|
| 361 |
+
return Vn()(A, A);
|
| 362 |
+
}
|
| 363 |
+
function Un(n, t, e, r) {
|
| 364 |
+
var i = wn(n, t, e), f;
|
| 365 |
+
switch (r = D(r ?? ",f"), r.type) {
|
| 366 |
+
case "s": {
|
| 367 |
+
var a = Math.max(Math.abs(n), Math.abs(t));
|
| 368 |
+
return r.precision == null && !isNaN(f = Tn(i, a)) && (r.precision = f), rn(r, a);
|
| 369 |
+
}
|
| 370 |
+
case "":
|
| 371 |
+
case "e":
|
| 372 |
+
case "g":
|
| 373 |
+
case "p":
|
| 374 |
+
case "r": {
|
| 375 |
+
r.precision == null && !isNaN(f = In(i, Math.max(Math.abs(n), Math.abs(t)))) && (r.precision = f - (r.type === "e"));
|
| 376 |
+
break;
|
| 377 |
+
}
|
| 378 |
+
case "f":
|
| 379 |
+
case "%": {
|
| 380 |
+
r.precision == null && !isNaN(f = Dn(i)) && (r.precision = f - (r.type === "%") * 2);
|
| 381 |
+
break;
|
| 382 |
+
}
|
| 383 |
+
}
|
| 384 |
+
return tn(r);
|
| 385 |
+
}
|
| 386 |
+
function Yn(n) {
|
| 387 |
+
var t = n.domain;
|
| 388 |
+
return n.ticks = function(e) {
|
| 389 |
+
var r = t();
|
| 390 |
+
return pn(r[0], r[r.length - 1], e ?? 10);
|
| 391 |
+
}, n.tickFormat = function(e, r) {
|
| 392 |
+
var i = t();
|
| 393 |
+
return Un(i[0], i[i.length - 1], e ?? 10, r);
|
| 394 |
+
}, n.nice = function(e) {
|
| 395 |
+
e == null && (e = 10);
|
| 396 |
+
var r = t(), i = 0, f = r.length - 1, a = r[i], u = r[f], c, o, s = 10;
|
| 397 |
+
for (u < a && (o = a, a = u, u = o, o = i, i = f, f = o); s-- > 0; ) {
|
| 398 |
+
if (o = L(a, u, e), o === c)
|
| 399 |
+
return r[i] = a, r[f] = u, t(r);
|
| 400 |
+
if (o > 0)
|
| 401 |
+
a = Math.floor(a / o) * o, u = Math.ceil(u / o) * o;
|
| 402 |
+
else if (o < 0)
|
| 403 |
+
a = Math.ceil(a * o) / o, u = Math.floor(u * o) / o;
|
| 404 |
+
else
|
| 405 |
+
break;
|
| 406 |
+
c = o;
|
| 407 |
+
}
|
| 408 |
+
return n;
|
| 409 |
+
}, n;
|
| 410 |
+
}
|
| 411 |
+
function Zn() {
|
| 412 |
+
var n = Xn();
|
| 413 |
+
return n.copy = function() {
|
| 414 |
+
return On(n, Zn());
|
| 415 |
+
}, cn.apply(n, arguments), Yn(n);
|
| 416 |
+
}
|
| 417 |
+
export {
|
| 418 |
+
On as a,
|
| 419 |
+
_ as b,
|
| 420 |
+
Xn as c,
|
| 421 |
+
Zn as l,
|
| 422 |
+
wn as t
|
| 423 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/mermaid.core-CfPtPiLZ.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
src/backend/gradio_tokenizertextbox/templates/component/mindmap-definition-RDSO3R44-CF6GctCt.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
src/backend/gradio_tokenizertextbox/templates/component/ordinal-DfAQgscy.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { i as a } from "./init-DjUOC4st.js";
|
| 2 |
+
class o extends Map {
|
| 3 |
+
constructor(n, t = g) {
|
| 4 |
+
if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: t } }), n != null) for (const [r, s] of n) this.set(r, s);
|
| 5 |
+
}
|
| 6 |
+
get(n) {
|
| 7 |
+
return super.get(c(this, n));
|
| 8 |
+
}
|
| 9 |
+
has(n) {
|
| 10 |
+
return super.has(c(this, n));
|
| 11 |
+
}
|
| 12 |
+
set(n, t) {
|
| 13 |
+
return super.set(l(this, n), t);
|
| 14 |
+
}
|
| 15 |
+
delete(n) {
|
| 16 |
+
return super.delete(p(this, n));
|
| 17 |
+
}
|
| 18 |
+
}
|
| 19 |
+
function c({ _intern: e, _key: n }, t) {
|
| 20 |
+
const r = n(t);
|
| 21 |
+
return e.has(r) ? e.get(r) : t;
|
| 22 |
+
}
|
| 23 |
+
function l({ _intern: e, _key: n }, t) {
|
| 24 |
+
const r = n(t);
|
| 25 |
+
return e.has(r) ? e.get(r) : (e.set(r, t), t);
|
| 26 |
+
}
|
| 27 |
+
function p({ _intern: e, _key: n }, t) {
|
| 28 |
+
const r = n(t);
|
| 29 |
+
return e.has(r) && (t = e.get(r), e.delete(r)), t;
|
| 30 |
+
}
|
| 31 |
+
function g(e) {
|
| 32 |
+
return e !== null && typeof e == "object" ? e.valueOf() : e;
|
| 33 |
+
}
|
| 34 |
+
const f = Symbol("implicit");
|
| 35 |
+
function h() {
|
| 36 |
+
var e = new o(), n = [], t = [], r = f;
|
| 37 |
+
function s(u) {
|
| 38 |
+
let i = e.get(u);
|
| 39 |
+
if (i === void 0) {
|
| 40 |
+
if (r !== f) return r;
|
| 41 |
+
e.set(u, i = n.push(u) - 1);
|
| 42 |
+
}
|
| 43 |
+
return t[i % t.length];
|
| 44 |
+
}
|
| 45 |
+
return s.domain = function(u) {
|
| 46 |
+
if (!arguments.length) return n.slice();
|
| 47 |
+
n = [], e = new o();
|
| 48 |
+
for (const i of u)
|
| 49 |
+
e.has(i) || e.set(i, n.push(i) - 1);
|
| 50 |
+
return s;
|
| 51 |
+
}, s.range = function(u) {
|
| 52 |
+
return arguments.length ? (t = Array.from(u), s) : t.slice();
|
| 53 |
+
}, s.unknown = function(u) {
|
| 54 |
+
return arguments.length ? (r = u, s) : r;
|
| 55 |
+
}, s.copy = function() {
|
| 56 |
+
return h(n, t).unknown(r);
|
| 57 |
+
}, a.apply(s, arguments), s;
|
| 58 |
+
}
|
| 59 |
+
export {
|
| 60 |
+
h as o
|
| 61 |
+
};
|
src/backend/gradio_tokenizertextbox/templates/component/pieDiagram-JVH3GP2A-KTfGFEz1.js
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { p as V } from "./chunk-44GW5IO5-I0mkHKCJ.js";
|
| 2 |
+
import { a4 as S, a7 as z, aG as U, _ as u, g as j, s as q, a as H, b as Z, q as J, p as K, l as F, c as Q, D as X, H as Y, N as tt, e as et, y as at, F as rt } from "./mermaid.core-CfPtPiLZ.js";
|
| 3 |
+
import { p as nt } from "./radar-VG2SY3DT-zUt99CZd.js";
|
| 4 |
+
import { d as P } from "./arc-CD-swOK-.js";
|
| 5 |
+
import { o as it } from "./ordinal-DfAQgscy.js";
|
| 6 |
+
function st(t, a) {
|
| 7 |
+
return a < t ? -1 : a > t ? 1 : a >= t ? 0 : NaN;
|
| 8 |
+
}
|
| 9 |
+
function ot(t) {
|
| 10 |
+
return t;
|
| 11 |
+
}
|
| 12 |
+
function lt() {
|
| 13 |
+
var t = ot, a = st, h = null, o = S(0), p = S(z), x = S(0);
|
| 14 |
+
function i(e) {
|
| 15 |
+
var r, l = (e = U(e)).length, g, A, m = 0, c = new Array(l), n = new Array(l), v = +o.apply(this, arguments), w = Math.min(z, Math.max(-z, p.apply(this, arguments) - v)), f, T = Math.min(Math.abs(w) / l, x.apply(this, arguments)), $ = T * (w < 0 ? -1 : 1), d;
|
| 16 |
+
for (r = 0; r < l; ++r)
|
| 17 |
+
(d = n[c[r] = r] = +t(e[r], r, e)) > 0 && (m += d);
|
| 18 |
+
for (a != null ? c.sort(function(y, D) {
|
| 19 |
+
return a(n[y], n[D]);
|
| 20 |
+
}) : h != null && c.sort(function(y, D) {
|
| 21 |
+
return h(e[y], e[D]);
|
| 22 |
+
}), r = 0, A = m ? (w - l * $) / m : 0; r < l; ++r, v = f)
|
| 23 |
+
g = c[r], d = n[g], f = v + (d > 0 ? d * A : 0) + $, n[g] = {
|
| 24 |
+
data: e[g],
|
| 25 |
+
index: r,
|
| 26 |
+
value: d,
|
| 27 |
+
startAngle: v,
|
| 28 |
+
endAngle: f,
|
| 29 |
+
padAngle: T
|
| 30 |
+
};
|
| 31 |
+
return n;
|
| 32 |
+
}
|
| 33 |
+
return i.value = function(e) {
|
| 34 |
+
return arguments.length ? (t = typeof e == "function" ? e : S(+e), i) : t;
|
| 35 |
+
}, i.sortValues = function(e) {
|
| 36 |
+
return arguments.length ? (a = e, h = null, i) : a;
|
| 37 |
+
}, i.sort = function(e) {
|
| 38 |
+
return arguments.length ? (h = e, a = null, i) : h;
|
| 39 |
+
}, i.startAngle = function(e) {
|
| 40 |
+
return arguments.length ? (o = typeof e == "function" ? e : S(+e), i) : o;
|
| 41 |
+
}, i.endAngle = function(e) {
|
| 42 |
+
return arguments.length ? (p = typeof e == "function" ? e : S(+e), i) : p;
|
| 43 |
+
}, i.padAngle = function(e) {
|
| 44 |
+
return arguments.length ? (x = typeof e == "function" ? e : S(+e), i) : x;
|
| 45 |
+
}, i;
|
| 46 |
+
}
|
| 47 |
+
var ct = rt.pie, G = {
|
| 48 |
+
sections: /* @__PURE__ */ new Map(),
|
| 49 |
+
showData: !1
|
| 50 |
+
}, b = G.sections, N = G.showData, ut = structuredClone(ct), pt = /* @__PURE__ */ u(() => structuredClone(ut), "getConfig"), gt = /* @__PURE__ */ u(() => {
|
| 51 |
+
b = /* @__PURE__ */ new Map(), N = G.showData, at();
|
| 52 |
+
}, "clear"), dt = /* @__PURE__ */ u(({ label: t, value: a }) => {
|
| 53 |
+
b.has(t) || (b.set(t, a), F.debug(`added new section: ${t}, with value: ${a}`));
|
| 54 |
+
}, "addSection"), ft = /* @__PURE__ */ u(() => b, "getSections"), ht = /* @__PURE__ */ u((t) => {
|
| 55 |
+
N = t;
|
| 56 |
+
}, "setShowData"), mt = /* @__PURE__ */ u(() => N, "getShowData"), R = {
|
| 57 |
+
getConfig: pt,
|
| 58 |
+
clear: gt,
|
| 59 |
+
setDiagramTitle: K,
|
| 60 |
+
getDiagramTitle: J,
|
| 61 |
+
setAccTitle: Z,
|
| 62 |
+
getAccTitle: H,
|
| 63 |
+
setAccDescription: q,
|
| 64 |
+
getAccDescription: j,
|
| 65 |
+
addSection: dt,
|
| 66 |
+
getSections: ft,
|
| 67 |
+
setShowData: ht,
|
| 68 |
+
getShowData: mt
|
| 69 |
+
}, vt = /* @__PURE__ */ u((t, a) => {
|
| 70 |
+
V(t, a), a.setShowData(t.showData), t.sections.map(a.addSection);
|
| 71 |
+
}, "populateDb"), yt = {
|
| 72 |
+
parse: /* @__PURE__ */ u(async (t) => {
|
| 73 |
+
const a = await nt("pie", t);
|
| 74 |
+
F.debug(a), vt(a, R);
|
| 75 |
+
}, "parse")
|
| 76 |
+
}, St = /* @__PURE__ */ u((t) => `
|
| 77 |
+
.pieCircle{
|
| 78 |
+
stroke: ${t.pieStrokeColor};
|
| 79 |
+
stroke-width : ${t.pieStrokeWidth};
|
| 80 |
+
opacity : ${t.pieOpacity};
|
| 81 |
+
}
|
| 82 |
+
.pieOuterCircle{
|
| 83 |
+
stroke: ${t.pieOuterStrokeColor};
|
| 84 |
+
stroke-width: ${t.pieOuterStrokeWidth};
|
| 85 |
+
fill: none;
|
| 86 |
+
}
|
| 87 |
+
.pieTitleText {
|
| 88 |
+
text-anchor: middle;
|
| 89 |
+
font-size: ${t.pieTitleTextSize};
|
| 90 |
+
fill: ${t.pieTitleTextColor};
|
| 91 |
+
font-family: ${t.fontFamily};
|
| 92 |
+
}
|
| 93 |
+
.slice {
|
| 94 |
+
font-family: ${t.fontFamily};
|
| 95 |
+
fill: ${t.pieSectionTextColor};
|
| 96 |
+
font-size:${t.pieSectionTextSize};
|
| 97 |
+
// fill: white;
|
| 98 |
+
}
|
| 99 |
+
.legend text {
|
| 100 |
+
fill: ${t.pieLegendTextColor};
|
| 101 |
+
font-family: ${t.fontFamily};
|
| 102 |
+
font-size: ${t.pieLegendTextSize};
|
| 103 |
+
}
|
| 104 |
+
`, "getStyles"), xt = St, At = /* @__PURE__ */ u((t) => {
|
| 105 |
+
const a = [...t.entries()].map((o) => ({
|
| 106 |
+
label: o[0],
|
| 107 |
+
value: o[1]
|
| 108 |
+
})).sort((o, p) => p.value - o.value);
|
| 109 |
+
return lt().value(
|
| 110 |
+
(o) => o.value
|
| 111 |
+
)(a);
|
| 112 |
+
}, "createPieArcs"), wt = /* @__PURE__ */ u((t, a, h, o) => {
|
| 113 |
+
F.debug(`rendering pie chart
|
| 114 |
+
` + t);
|
| 115 |
+
const p = o.db, x = Q(), i = X(p.getConfig(), x.pie), e = 40, r = 18, l = 4, g = 450, A = g, m = Y(a), c = m.append("g");
|
| 116 |
+
c.attr("transform", "translate(" + A / 2 + "," + g / 2 + ")");
|
| 117 |
+
const { themeVariables: n } = x;
|
| 118 |
+
let [v] = tt(n.pieOuterStrokeWidth);
|
| 119 |
+
v ?? (v = 2);
|
| 120 |
+
const w = i.textPosition, f = Math.min(A, g) / 2 - e, T = P().innerRadius(0).outerRadius(f), $ = P().innerRadius(f * w).outerRadius(f * w);
|
| 121 |
+
c.append("circle").attr("cx", 0).attr("cy", 0).attr("r", f + v / 2).attr("class", "pieOuterCircle");
|
| 122 |
+
const d = p.getSections(), y = At(d), D = [
|
| 123 |
+
n.pie1,
|
| 124 |
+
n.pie2,
|
| 125 |
+
n.pie3,
|
| 126 |
+
n.pie4,
|
| 127 |
+
n.pie5,
|
| 128 |
+
n.pie6,
|
| 129 |
+
n.pie7,
|
| 130 |
+
n.pie8,
|
| 131 |
+
n.pie9,
|
| 132 |
+
n.pie10,
|
| 133 |
+
n.pie11,
|
| 134 |
+
n.pie12
|
| 135 |
+
], C = it(D);
|
| 136 |
+
c.selectAll("mySlices").data(y).enter().append("path").attr("d", T).attr("fill", (s) => C(s.data.label)).attr("class", "pieCircle");
|
| 137 |
+
let W = 0;
|
| 138 |
+
d.forEach((s) => {
|
| 139 |
+
W += s;
|
| 140 |
+
}), c.selectAll("mySlices").data(y).enter().append("text").text((s) => (s.data.value / W * 100).toFixed(0) + "%").attr("transform", (s) => "translate(" + $.centroid(s) + ")").style("text-anchor", "middle").attr("class", "slice"), c.append("text").text(p.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
|
| 141 |
+
const M = c.selectAll(".legend").data(C.domain()).enter().append("g").attr("class", "legend").attr("transform", (s, k) => {
|
| 142 |
+
const E = r + l, L = E * C.domain().length / 2, _ = 12 * r, B = k * E - L;
|
| 143 |
+
return "translate(" + _ + "," + B + ")";
|
| 144 |
+
});
|
| 145 |
+
M.append("rect").attr("width", r).attr("height", r).style("fill", C).style("stroke", C), M.data(y).append("text").attr("x", r + l).attr("y", r - l).text((s) => {
|
| 146 |
+
const { label: k, value: E } = s.data;
|
| 147 |
+
return p.getShowData() ? `${k} [${E}]` : k;
|
| 148 |
+
});
|
| 149 |
+
const I = Math.max(
|
| 150 |
+
...M.selectAll("text").nodes().map((s) => (s == null ? void 0 : s.getBoundingClientRect().width) ?? 0)
|
| 151 |
+
), O = A + e + r + l + I;
|
| 152 |
+
m.attr("viewBox", `0 0 ${O} ${g}`), et(m, g, O, i.useMaxWidth);
|
| 153 |
+
}, "draw"), Dt = { draw: wt }, bt = {
|
| 154 |
+
parser: yt,
|
| 155 |
+
db: R,
|
| 156 |
+
renderer: Dt,
|
| 157 |
+
styles: xt
|
| 158 |
+
};
|
| 159 |
+
export {
|
| 160 |
+
bt as diagram
|
| 161 |
+
};
|